From f5a61b6cdffd89cc4daf778f14bbfe3a8d4a4a23 Mon Sep 17 00:00:00 2001
From: zjk <852185829@qq.com>
Date: 星期六, 10 十月 2026 17:00:38 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/Hugray

---
 hugray-admin/src/layout/components/Sidebar/index.vue |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/hugray-admin/src/layout/components/Sidebar/index.vue b/hugray-admin/src/layout/components/Sidebar/index.vue
index 33e1141..01c4266 100644
--- a/hugray-admin/src/layout/components/Sidebar/index.vue
+++ b/hugray-admin/src/layout/components/Sidebar/index.vue
@@ -8,7 +8,7 @@
         :background-color="getMenuBackground"
         :text-color="getMenuTextColor"
         :unique-opened="true"
-        :active-text-color="theme"
+        :active-text-color="getMenuActiveTextColor"
         :collapse-transition="false"
         mode="vertical"
         :class="sideTheme"
@@ -59,6 +59,16 @@
   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) {

--
Gitblit v1.7.1