fix: 修复清空缓存并返回登录页时未清空主题

This commit is contained in:
xiaoxian521
2022-10-18 18:51:08 +08:00
parent b1bce9f4ce
commit e50d13a84a
2 changed files with 3 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ export const useEpThemeStore = defineStore({
const layout = storageLocal.getItem<StorageConfigs>("responsive-layout");
this.epTheme = layout?.theme;
this.epThemeColor = newColor;
if (!layout) return;
layout.epThemeColor = newColor;
storageLocal.setItem("responsive-layout", layout);
}