From 2137205bdc24280b00b1573edd1b8dcb153d35b9 Mon Sep 17 00:00:00 2001 From: Vitaly Raicheu Date: Wed, 26 Apr 2023 15:27:10 +0300 Subject: [PATCH] fix: sidebar state on initial loading for default layout --- packages/docs/layouts/default.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docs/layouts/default.vue b/packages/docs/layouts/default.vue index 7112e02d9f..ca22820f7f 100644 --- a/packages/docs/layouts/default.vue +++ b/packages/docs/layouts/default.vue @@ -31,7 +31,7 @@ const cookie = useCookie('vuestic-theme') const { applyPreset } = useColors() const breakpoints = useBreakpoint() -const isSidebarVisible = ref(!breakpoints.smDown) +const isSidebarVisible = ref(false) applyPreset(cookie.value || colorMode.preference) @@ -42,7 +42,7 @@ watch(() => breakpoints.smDown, (newValue, oldValue) => { if (!newValue && oldValue) { isSidebarVisible.value = true } -}) +}, { immediate: true }) const { afterEach } = useRouter() const { scrollToElement } = useDocsScroll()