chenhj
2026-03-12 c7e55095f5fe12c7e9f84e21930aef4c293e33ce
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
})
// 获取菜单文字颜色