update 优化地图工具方法,调整地图样式

This commit is contained in:
zk
2024-06-14 18:11:09 +08:00
parent 83f768a4a0
commit 14c50baeed
24 changed files with 1312 additions and 178 deletions
+8
View File
@@ -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);
},
/**
* 登录事件
*/