update 优化地图工具方法,调整地图样式
This commit is contained in:
@@ -14,6 +14,7 @@ export const useUserStore = defineStore({
|
||||
userInfo: null,
|
||||
//登录返回信息
|
||||
loginInfo: null,
|
||||
themeType: '', // dark 1, light 2
|
||||
}),
|
||||
getters: {
|
||||
getUserInfo(): UserInfo {
|
||||
@@ -25,6 +26,9 @@ export const useUserStore = defineStore({
|
||||
getToken(): string {
|
||||
return this.token || getAuthCache(TOKEN_KEY);
|
||||
},
|
||||
getThemeType(): string {
|
||||
return this.themeType || getAuthCache('themeType');
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setToken(info: string | undefined) {
|
||||
@@ -38,6 +42,10 @@ export const useUserStore = defineStore({
|
||||
setLoginInfo(info: LoginInfo | null) {
|
||||
this.loginInfo = info;
|
||||
},
|
||||
setThemeType(info: string | undefined) {
|
||||
this.themeType = info ? info : '';
|
||||
setAuthCache('themeType', info);
|
||||
},
|
||||
/**
|
||||
* 登录事件
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user