plus-ui icon indicating copy to clipboard operation
plus-ui copied to clipboard

浅色主题时 theme-light 切换为暗黑模式 刷新浏览器 左侧Sidebar 又会变为白色

Open xuezejun opened this issue 3 months ago • 0 comments

解决方案 如下 修改bgColor 和 textColor const isDark = useDark({ storageKey: 'useDarkKey', valueDark: 'dark', valueLight: 'light' }); const bgColor = computed(() => { if (isDark.value) { return 'var(--menuBg)'; } return sideTheme.value === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }); const textColor = computed(() => { if (isDark.value) { return 'var(--sidebar-text)'; } return sideTheme.value === 'theme-dark' ? variables.menuColor : variables.menuLightColor; });

xuezejun avatar Sep 05 '25 10:09 xuezejun