fix(theme): 修复跟随系统主题解析

This commit is contained in:
Coast
2026-04-21 14:48:07 +08:00
parent 33bde0eaf8
commit 1d6c65d1a7
9 changed files with 99 additions and 35 deletions

View File

@@ -125,15 +125,15 @@ function handleProfileClick() {
// 根据主题和侧边栏配色方案选择样式类
const navbarActionsClass = computed(() => {
const { theme, sidebarColorScheme, layout } = settingStore;
const { resolvedTheme, sidebarColorScheme, layout } = settingStore;
// 暗黑主题下,所有布局都使用白色文字
if (theme === ThemeMode.DARK) {
if (resolvedTheme === ThemeMode.DARK) {
return "navbar-actions--white-text";
}
// 明亮主题下
if (theme === ThemeMode.LIGHT) {
if (resolvedTheme === ThemeMode.LIGHT) {
// 顶部布局和混合布局的顶部区域:
// - 如果侧边栏是经典蓝色,使用白色文字
// - 如果侧边栏是极简白色,使用深色文字