Explorar o código

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

xiaoxian521 %!s(int64=2) %!d(string=hai) anos
pai
achega
eeea7bf718
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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}`