mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 12:26:31 +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', {
|
export const useUserStore = defineStore('user', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
token: localStorage.getItem(TOKEN_NAME) || 'main_token', // 默认token不走权限
|
token: localStorage.getItem(TOKEN_NAME) || 'main_token', // 默认token不走权限
|
||||||
userInfo: InitUserInfo,
|
userInfo: { ...InitUserInfo },
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
roles: (state) => {
|
roles: (state) => {
|
||||||
|
@ -73,7 +73,7 @@ export const useUserStore = defineStore('user', {
|
||||||
async logout() {
|
async logout() {
|
||||||
localStorage.removeItem(TOKEN_NAME);
|
localStorage.removeItem(TOKEN_NAME);
|
||||||
this.token = '';
|
this.token = '';
|
||||||
this.userInfo = InitUserInfo;
|
this.userInfo = { ...InitUserInfo };
|
||||||
},
|
},
|
||||||
async removeToken() {
|
async removeToken() {
|
||||||
this.token = '';
|
this.token = '';
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.t-layout__header {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.t-button + .t-button {
|
.t-button + .t-button {
|
||||||
margin-left: @spacer;
|
margin-left: @spacer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user