解决方案 如下 修改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;
});