diff --git a/theme/src/client/components/BlogExtract.vue b/theme/src/client/components/BlogExtract.vue index f9150a89..a07870b7 100644 --- a/theme/src/client/components/BlogExtract.vue +++ b/theme/src/client/components/BlogExtract.vue @@ -15,6 +15,7 @@ const route = useRoute() const avatar = computed(() => theme.value.avatar) const { hasBlogExtract, tags, archives } = useBlogExtract() const open = ref(false) +const lazyOpen = ref(false) const isLocked = useScrollLock(inBrowser ? document.body : null) @@ -22,6 +23,15 @@ watch(() => route.path, () => { open.value = false }) +watch(open, async () => { + if (open.value) { + setTimeout(() => { + lazyOpen.value = true + }, 200) + } + else { lazyOpen.value = false } +}) + watch( [() => open.value], () => { @@ -39,34 +49,38 @@ const showBlogExtract = computed(() => {