diff --git a/docs/components/DocumentLayout.vue b/docs/components/DocumentLayout.vue index 39c25e6c..8e8dc0d4 100644 --- a/docs/components/DocumentLayout.vue +++ b/docs/components/DocumentLayout.vue @@ -10,8 +10,8 @@ import Layout from 'vitepress/dist/client/theme-default/Layout.vue'; import { useSidebar } from 'vitepress/theme'; const layout = ref(null); - const { toggle } = useSidebar() - setInterval(()=>{ - toggle() - }, 5000) + const { toggle, isOpen , close} = useSidebar() + if (isOpen.value) { + close() + }