From e77db702781db2b32c0a4b7bb3c3a697256f3245 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Mon, 19 Oct 2026 12:32:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E4=BF=AE=E6=AD=A3=E6=B5=85?= =?UTF-8?q?=E8=89=B2=E5=93=81=E7=89=8C=E6=96=87=E5=AD=97=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/app.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) } } })