소스 검색

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、菜单 / 顶栏
 const onBgColorPickerChange = (bg: string) => {
 	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));
 	}
 	onTopBarGradualChange();