Browse Source

fix: 修复全局配置 `Theme` 为 `light` 清空缓存重新登录主题配置不生效的问题

xiaoxian521 2 years ago
parent
commit
eeea7bf718
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/layout/hooks/useDataThemeChange.ts

+ 1 - 1
src/layout/hooks/useDataThemeChange.ts

@@ -38,7 +38,7 @@ export function useDataThemeChange() {
   const body = document.documentElement as HTMLElement;
 
   /** 设置导航主题色 */
-  function setLayoutThemeColor(theme = "default") {
+  function setLayoutThemeColor(theme = getConfig().Theme ?? "default") {
     layoutTheme.value.theme = theme;
     toggleTheme({
       scopeName: `layout-theme-${theme}`