瀏覽代碼

update Web/src/layout/navBars/topBar/settings.vue.
解决:前端左侧菜单 背景变成黑色,文字变成白色时,二级(含)以下菜单颜色没有变成白色的问题。

Signed-off-by: jacoat <jacoat@163.com>

jacoat 2 年之前
父節點
當前提交
3a9a32f432
共有 1 個文件被更改,包括 4 次插入 和 1 次删除
  1. 4 1
      Web/src/layout/navBars/topBar/settings.vue

+ 4 - 1
Web/src/layout/navBars/topBar/settings.vue

@@ -485,7 +485,10 @@ const onColorPickerChange = () => {
 // 2、菜单 / 顶栏
 // 2、菜单 / 顶栏
 const onBgColorPickerChange = (bg: string) => {
 const onBgColorPickerChange = (bg: string) => {
 	document.documentElement.style.setProperty(`--next-bg-${bg}`, themeConfig.value[bg]);
 	document.documentElement.style.setProperty(`--next-bg-${bg}`, themeConfig.value[bg]);
-	if (bg === 'menuBar') {
+	if(bg === 'menuBarColor'){
+		document.documentElement.style.setProperty(`--el-menu-text-color`, themeConfig.value[bg]);
+	}
+    if (bg === 'menuBar') {
 		document.documentElement.style.setProperty(`--next-bg-menuBar-light-1`, getLightColor(getThemeConfig.value.menuBar, 0.05));
 		document.documentElement.style.setProperty(`--next-bg-menuBar-light-1`, getLightColor(getThemeConfig.value.menuBar, 0.05));
 	}
 	}
 	onTopBarGradualChange();
 	onTopBarGradualChange();