多标签tabs 调整

This commit is contained in:
Jason
2022-09-20 10:58:38 +08:00
parent aee93d81b4
commit fe5522dc2d
49 changed files with 273 additions and 109 deletions

View File

@@ -28,12 +28,6 @@ const useUserStore = defineStore({
}),
getters: {},
actions: {
resetState() {
this.token = ''
this.userInfo = {}
this.perms = []
this.menu = []
},
login(playload: any) {
const { account, password } = playload
return new Promise((resolve, reject) => {
@@ -54,8 +48,9 @@ const useUserStore = defineStore({
logout() {
return new Promise((resolve, reject) => {
logout()
.then((data) => {
router.push(PageEnum.LOGIN)
.then(async (data) => {
this.token = ''
await router.push(PageEnum.LOGIN)
clearAuthInfo()
resolve(data)
})