Skip to content

Commit 0e25941

Browse files
fix: 移除user的持久化修复其导致的问题 (#314)
* perf: 增加配置判断 (#311) 新增配置项判断,避免出现undefined导致的无效url * fix: 移除user的持久化修复其导致的问题 Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
1 parent e1bc0a0 commit 0e25941

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/store/modules/user.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineStore } from 'pinia';
22
import { TOKEN_NAME } from '@/config/global';
3-
import { store, usePermissionStore } from '@/store';
3+
import { store } from '@/store';
44

55
const InitUserInfo = {
66
roles: [],
@@ -79,12 +79,6 @@ export const useUserStore = defineStore('user', {
7979
this.token = '';
8080
},
8181
},
82-
persist: {
83-
afterRestore: (ctx) => {
84-
const permissionStore = usePermissionStore();
85-
permissionStore.initRoutes(ctx.store.roles);
86-
},
87-
},
8882
});
8983

9084
export function getUserStore() {

0 commit comments

Comments
 (0)