From b1eca428f451dc0390fffc258cdaef270c9455d4 Mon Sep 17 00:00:00 2001 From: cxr <2059387846@qq.com> Date: Tue, 2 Apr 2024 18:31:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(cxr):=20=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 065a5ee..8340d94 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -162,7 +162,7 @@ export const useUserStore = defineStore({ const role = userInfo.userRoles[0].roleNum; //取第一个为默认角色 const roleList = Array.from(RoleEnum[role]); - this.setRoleList(roleList as []); + this.setRoleList(this.getRoleList || (roleList as [])); } else { userInfo.userRoles = []; this.setRoleList([]); -- 2.24.1