gaoluyang
5 天以前 ed7fc8a4e378ed8b8109055f9ef209b642837df6
src/layout/components/Sidebar/index.vue
@@ -30,14 +30,14 @@
const sideTheme = computed(() => settingsStore.sideTheme)
const theme = computed(() => settingsStore.theme)
const isCollapse = computed(() => !appStore.sidebar.opened)
console.log(44444, settingsStore.isDark, sideTheme.value)
// 获取菜单背景色
const getMenuBackground = computed(() => {
  if (settingsStore.isDark) {
    return 'var(--sidebar-bg)'
  }
  return sideTheme.value === 'theme-dark' ? variables.menuBg : variables.menuLightBg
  // 浅色主题时,直接用主题色
  return sideTheme.value === 'theme-dark' ? variables.menuBg : settingsStore.theme
})
// 获取菜单文字颜色