Skip to content

Commit

Permalink
perf: 移除冗余的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Feb 6, 2024
1 parent 8c7f418 commit 160f389
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/store/modules/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -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 外使用 */
Expand Down

0 comments on commit 160f389

Please sign in to comment.