Merge branch 'develop' of github.com:Tencent/tdesign-vue-next-starter into main

This commit is contained in:
Uyarn 2022-11-18 11:30:59 +08:00
commit 7d744f6dad
2 changed files with 6 additions and 2 deletions

View File

@ -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 = '';

View File

@ -6,6 +6,10 @@
width: fit-content;
}
.t-layout__header {
height: auto;
}
.t-button + .t-button {
margin-left: @spacer;
}