mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 13:01:14 +08:00
Merge branch 'develop' of github.com:Tencent/tdesign-vue-next-starter into main
This commit is contained in:
commit
7d744f6dad
|
@ -9,7 +9,7 @@ const InitUserInfo = {
|
|||
export const useUserStore = defineStore('user', {
|
||||
state: () => ({
|
||||
token: localStorage.getItem(TOKEN_NAME) || 'main_token', // 默认token不走权限
|
||||
userInfo: InitUserInfo,
|
||||
userInfo: { ...InitUserInfo },
|
||||
}),
|
||||
getters: {
|
||||
roles: (state) => {
|
||||
|
@ -73,7 +73,7 @@ export const useUserStore = defineStore('user', {
|
|||
async logout() {
|
||||
localStorage.removeItem(TOKEN_NAME);
|
||||
this.token = '';
|
||||
this.userInfo = InitUserInfo;
|
||||
this.userInfo = { ...InitUserInfo };
|
||||
},
|
||||
async removeToken() {
|
||||
this.token = '';
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
width: fit-content;
|
||||
}
|
||||
|
||||
.t-layout__header {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.t-button + .t-button {
|
||||
margin-left: @spacer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user