From a2c858eccaca2ca3c5f1aa39b9e87b9096d61b78 Mon Sep 17 00:00:00 2001 From: hxr <1490493387@qq.com> Date: Mon, 28 Aug 2023 23:06:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E7=82=B9=E5=87=BB=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F=E6=98=BE=E7=A4=BA/=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=97=B6transition=E5=8A=A8=E7=94=BB=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: b1cbf2e7385ebf5b56e29c466c7d172364d015ae --- src/layout/components/NavBar/index.vue | 2 +- src/layout/index.vue | 2 +- src/store/modules/app.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layout/components/NavBar/index.vue b/src/layout/components/NavBar/index.vue index 1f6b70e8..e935d450 100644 --- a/src/layout/components/NavBar/index.vue +++ b/src/layout/components/NavBar/index.vue @@ -7,7 +7,7 @@ const appStore = useAppStore(); * 左侧菜单栏显示/隐藏 */ function toggleSideBar() { - appStore.toggleSidebar(true); + appStore.toggleSidebar(); } diff --git a/src/layout/index.vue b/src/layout/index.vue index b943089d..c96ef8b7 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -72,7 +72,7 @@ function handleOutsideClick() { } function toggleSideBar() { - appStore.toggleSidebar(true); + appStore.toggleSidebar(); } diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index b538d0cf..e2e82356 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -32,9 +32,9 @@ export const useAppStore = defineStore("app", () => { }); // actions - function toggleSidebar(withoutAnimation: boolean) { + function toggleSidebar() { sidebar.opened = !sidebar.opened; - sidebar.withoutAnimation = withoutAnimation; + sidebar.withoutAnimation = false; if (sidebar.opened) { sidebarStatus.value = "opened"; } else {