plus-ui
plus-ui copied to clipboard
浅色主题时 theme-light 切换为暗黑模式 刷新浏览器 左侧Sidebar 又会变为白色
解决方案 如下 修改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; });