Skip to content

Commit e5b2607

Browse files
committed
fix: 修复 article drawer 文章目录无法更新的问题
1 parent 0036ec2 commit e5b2607

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/article/Drawer.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<script setup lang="ts">
22
import type { Toc } from '@nuxt/content'
33
4-
const props = defineProps<{ toc: Toc, prev?: { title: string, path: string }, next?: { title: string, path: string } }>()
4+
const props = defineProps<{
5+
toc: Toc
6+
prev?: { title: string, path: string }
7+
next?: { title: string, path: string }
8+
}>()
9+
510
const visible = defineModel<boolean>()
611
7-
const links = props.toc.links || []
12+
const links = computed(() => props.toc.links || [])
813
914
const route = useRoute()
1015
const { hash } = toRefs(route)

0 commit comments

Comments
 (0)