xiaoxian521 3 роки тому
батько
коміт
02f2cd9747

+ 3 - 5
src/layout/components/setting/index.vue

@@ -16,7 +16,7 @@ import { debounce } from "/@/utils/debounce";
 import { themeColorsType } from "../../types";
 import { useAppStoreHook } from "/@/store/modules/app";
 import { storageLocal, storageSession } from "/@/utils/storage";
-import { toggleTheme } from "@zougt/vite-plugin-theme-preprocessor/dist/browser-utils";
+import { addClassNameToHtmlTag } from "@zougt/vite-plugin-theme-preprocessor/dist/browser-utils";
 
 const router = useRouter();
 const { isSelect } = useCssModule();
@@ -198,10 +198,8 @@ function setLayoutModel(layout: string) {
 // 设置导航主题色
 function setLayoutThemeColor(theme: string) {
   layoutTheme.value.theme = theme;
-  toggleTheme({
-    scopeName: `layout-theme-${theme}`,
-    hasRemoveScopeName: false,
-    themeLinkTagInjectTo: "head"
+  addClassNameToHtmlTag({
+    scopeName: `layout-theme-${theme}`
   });
   instance.layout = { layout: useAppStoreHook().layout, theme };
 }

+ 8 - 0
src/layout/theme/auroraGreen-vars.scss

@@ -1 +1,9 @@
 // 极光绿
+
+$subMenuActiveText: #409eff;
+$menuBg: #93f9b9;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 1 - 1
src/layout/theme/default-vars.scss

@@ -16,4 +16,4 @@ $subMenuBg: #1f2d3d !default;
 // 鼠标覆盖子菜单时的背景
 $subMenuHover: #001528 !default;
 $navTextColor: #fff !default;
-$menuText: #7a80b4;
+$menuText: #7a80b4 !default;

+ 6 - 11
src/layout/theme/dusk-vars.scss

@@ -1,14 +1,9 @@
 // 薄暮
 
-// 菜单选中后字体样式
-$subMenuActiveText: #f4f4f5 !default;
-//菜单背景
-$menuBg: #1b2a47 !default;
-// 鼠标覆盖菜单时的背景
-$menuHover: #2a395b !default;
-// 子菜单背景
-$subMenuBg: #1f2d3d !default;
-// 鼠标覆盖子菜单时的背景
-$subMenuHover: #001528 !default;
-$navTextColor: #fff !default;
+$subMenuActiveText: #409eff;
+$menuBg: #ff5f6d;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
 $menuText: #7a80b4;

+ 8 - 0
src/layout/theme/geekBlue-vars.scss

@@ -1 +1,9 @@
 // 极客蓝
+
+$subMenuActiveText: #409eff;
+$menuBg: #302b63;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 8 - 0
src/layout/theme/higurashi-vars.scss

@@ -1 +1,9 @@
 // 日暮
+
+$subMenuActiveText: #409eff;
+$menuBg: #ffc371;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 8 - 0
src/layout/theme/mingQing-vars.scss

@@ -1 +1,9 @@
 // 明青
+
+$subMenuActiveText: #409eff;
+$menuBg: rgb(19, 194, 194);
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 8 - 0
src/layout/theme/saucePurple-vars.scss

@@ -1 +1,9 @@
 // 酱紫
+
+$subMenuActiveText: #409eff;
+$menuBg: #232526;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 8 - 0
src/layout/theme/volcano-vars.scss

@@ -1 +1,9 @@
 // 火山
+
+$subMenuActiveText: #409eff;
+$menuBg: #200122;
+$menuHover: #e0ebf6;
+$subMenuBg: #fff;
+$subMenuHover: #e0ebf6;
+$navTextColor: #7a80b4;
+$menuText: #7a80b4;

+ 2 - 2
src/style/sidebar.scss

@@ -64,7 +64,7 @@
   .sidebar-container {
     transition: width 0.28s;
     width: $sideBarWidth !important;
-    background-color: $menuBg;
+    background: $menuBg;
     height: 100%;
     position: fixed;
     font-size: 0;
@@ -158,7 +158,7 @@
   .horizontal-header {
     display: flex;
     justify-content: space-around;
-    background-color: $menuBg;
+    background: $menuBg;
     width: 100%;
     height: 62px;
     align-items: center;