| | |
| | | :background-color="getMenuBackground" |
| | | :text-color="getMenuTextColor" |
| | | :unique-opened="true" |
| | | :active-text-color="theme" |
| | | :active-text-color="getMenuActiveTextColor" |
| | | :collapse-transition="false" |
| | | mode="vertical" |
| | | :class="sideTheme" |
| | |
| | | return sideTheme.value === 'theme-dark' ? variables.menuText : variables.menuLightText |
| | | }) |
| | | |
| | | // 获取菜单选中项文字颜色 |
| | | // 设计稿的深蓝侧栏中选中项为白字:主题色(绿)若渗进侧栏会与深蓝 chrome 冲突, |
| | | // 暗色模式与 theme-light 仍跟随主题色,保持原有行为 |
| | | const getMenuActiveTextColor = computed(() => { |
| | | if (!settingsStore.isDark && sideTheme.value === 'theme-dark') { |
| | | return variables.menuActiveText |
| | | } |
| | | return theme.value |
| | | }) |
| | | |
| | | const activeMenu = computed(() => { |
| | | const { meta, path } = route |
| | | if (meta.activeMenu) { |