This commit is contained in:
2023-05-28 16:35:13 +08:00
parent 47b47b40a8
commit 45af378c51
2 changed files with 13 additions and 2 deletions

View File

@ -84,6 +84,17 @@ const useUserStore = defineStore("user", {
});
});
},
// 非正常退出系统
abnormalLogOut() {
return new Promise((resolve, reject) => {
this.token = "";
this.roles = [];
this.permissions = [];
this.userInfoRes = null;
removeToken();
resolve();
});
},
},
persist: [{ paths: ["tenant" /*"userInfoRes"*/], storage: localStorage }],
});