From 07b17b97985ae47a61181baa29f9be38192a70a1 Mon Sep 17 00:00:00 2001 From: zuihou <244387066@qq.com> Date: Thu, 23 Sep 2021 00:10:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/guard/stateGuard.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/guard/stateGuard.ts b/src/router/guard/stateGuard.ts index c71ac186..c34513cc 100644 --- a/src/router/guard/stateGuard.ts +++ b/src/router/guard/stateGuard.ts @@ -8,12 +8,12 @@ import { removeTabChangeListener } from '/@/logics/mitt/routeChange'; export function createStateGuard(router: Router) { router.afterEach((to) => { - const tabStore = useMultipleTabStore(); - const userStore = useUserStore(); - const appStore = useAppStore(); - const permissionStore = usePermissionStore(); // Just enter the login page and clear the authentication information if (to.path === PageEnum.BASE_LOGIN) { + const tabStore = useMultipleTabStore(); + const userStore = useUserStore(); + const appStore = useAppStore(); + const permissionStore = usePermissionStore(); appStore.resetAllState(); permissionStore.resetState(); tabStore.resetState();