From 0e259413ca91923e1f5f8517db9c480d5a07e134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Sat, 17 Sep 2022 00:24:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4user=E7=9A=84=E6=8C=81?= =?UTF-8?q?=E4=B9=85=E5=8C=96=E4=BF=AE=E5=A4=8D=E5=85=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: 增加配置判断 (#311) 新增配置项判断,避免出现undefined导致的无效url * fix: 移除user的持久化修复其导致的问题 Co-authored-by: Kerwin Bryant --- src/store/modules/user.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index fba0728..575af0f 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,6 +1,6 @@ import { defineStore } from 'pinia'; import { TOKEN_NAME } from '@/config/global'; -import { store, usePermissionStore } from '@/store'; +import { store } from '@/store'; const InitUserInfo = { roles: [], @@ -79,12 +79,6 @@ export const useUserStore = defineStore('user', { this.token = ''; }, }, - persist: { - afterRestore: (ctx) => { - const permissionStore = usePermissionStore(); - permissionStore.initRoutes(ctx.store.roles); - }, - }, }); export function getUserStore() {