From b00e2bf548f41979d062b7705e99ffe2a08c12a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=91=9E?= <2896402717@qq.com> Date: Thu, 16 Jan 2025 22:58:08 +0800 Subject: [PATCH] fix(components):update --- .../components/VPLocalNavOutlineDropdown.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue index 5b14cdd4..526a196e 100644 --- a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue +++ b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue @@ -17,6 +17,7 @@ const open = ref(false) const vh = ref(0) const main = ref() const items = ref() +const {hasSidebar} = useSidebar() function closeOnClickOutside(e: Event) { if (!main.value?.contains(e.target as Node)) { @@ -61,13 +62,6 @@ function scrollToTop() { open.value = false window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }) } - -onMounted(()=>{ - const {hasSidebar} = useSidebar() - if(!hasSidebar.value){ - document.documentElement.style.setProperty("--vp-sidebar-width","0px") - } -})