diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index e11ca33..5533fbf 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -89,7 +89,7 @@ export const useAppStore = defineStore('app', { // 头部背景颜色 topHeaderBgColor: '#fff', // 头部字体颜色 - topHeaderTextColor: 'inherit', + topHeaderTextColor: '#303133', // 头部悬停颜色 topHeaderHoverColor: '#f6f6f6', // 头部边框颜色 @@ -299,7 +299,7 @@ export const useAppStore = defineStore('app', { // 左侧菜单选中字体颜色 leftMenuTextActiveColor: isDarkColor ? '#fff' : 'var(--el-color-primary)', // logo字体颜色 - logoTitleTextColor: isDarkColor ? '#fff' : 'inherit', + logoTitleTextColor: isDarkColor ? '#fff' : '#303133', // logo边框颜色 logoBorderColor: isDarkColor ? color : '#eee' } @@ -308,7 +308,7 @@ export const useAppStore = defineStore('app', { }, setHeaderTheme(color: string) { const isDarkColor = colorIsDark(color) - const textColor = isDarkColor ? '#fff' : 'inherit' + const textColor = isDarkColor ? '#fff' : '#303133' const textHoverColor = isDarkColor ? lighten(color!, 6) : '#f6f6f6' const topToolBorderColor = isDarkColor ? color : '#eee' setCssVar('--top-header-bg-color', color) @@ -345,8 +345,9 @@ export const useAppStore = defineStore('app', { context.store.title = import.meta.env.VITE_APP_TITLE if (context.store.theme?.elColorPrimary !== '#c4322a') { context.store.setTheme({ elColorPrimary: '#c4322a' }) - context.store.setCssVarTheme() } + context.store.setMenuTheme(context.store.theme.leftMenuBgColor) + context.store.setHeaderTheme(context.store.theme.topHeaderBgColor) } } })