perf: default editor's toc supports showing empty states (#864)

#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

默认编辑器的大纲在没有内容的时候支持显示空状态的提示。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3335

#### Screenshots:

<img width="1420" alt="image" src="https://user-images.githubusercontent.com/21301288/220002675-e16829f0-1c33-4030-a76b-4720dc7d7a69.png">

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
Console 端默认编辑器的大纲列表支持显示空状态
```
pull/867/head^2
Ryan Wang 2023-02-20 14:30:18 +08:00 committed by GitHub
parent 194ff7f4ad
commit 2705fc35d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -532,7 +532,7 @@ watch(
<VTabs v-model:active-id="extraActiveId" type="outline">
<VTabItem id="toc" label="大纲">
<div class="p-1 pt-0">
<ul class="space-y-1">
<ul v-if="headingNodes?.length" class="space-y-1">
<li
v-for="(node, index) in headingNodes"
:key="index"
@ -559,6 +559,9 @@ watch(
</div>
</li>
</ul>
<div v-else class="flex flex-col items-center py-10">
<span class="text-sm text-gray-600">暂无大纲</span>
</div>
</div>
</VTabItem>
<VTabItem id="information" label="详情">