Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
perf: default editor's toc supports showing empty states (#864)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/kind improvement

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

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

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

Fixes halo-dev/halo#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 端默认编辑器的大纲列表支持显示空状态
```
  • Loading branch information
ruibaby authored Feb 20, 2023
1 parent 194ff7f commit 2705fc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/editor/DefaultEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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="详情">
Expand Down

1 comment on commit 2705fc3

@vercel
Copy link

@vercel vercel bot commented on 2705fc3 Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui-halo-dev.vercel.app
halo-admin-ui.vercel.app
ui-git-main-halo-dev.vercel.app

Please sign in to comment.