From 160f389c607c04389b75d10aedd8532897efc9bb Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Tue, 6 Feb 2024 17:21:16 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 74d84a0c..231a3031 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -20,10 +20,6 @@ export const useUserStore = defineStore("user", () => { const tagsViewStore = useTagsViewStore() const settingsStore = useSettingsStore() - /** 设置角色数组 */ - const setRoles = (value: string[]) => { - roles.value = value - } /** 登录 */ const login = async ({ username, password, code }: LoginRequestData) => { const { data } = await loginApi({ username, password, code }) @@ -72,7 +68,7 @@ export const useUserStore = defineStore("user", () => { } } - return { token, roles, username, setRoles, login, getInfo, changeRoles, logout, resetToken } + return { token, roles, username, login, getInfo, changeRoles, logout, resetToken } }) /** 在 setup 外使用 */