From ea43476d44ede2957230e3a1fa8fa1eac3a0034f Mon Sep 17 00:00:00 2001
From: "Ray.Hao" <1490493387@qq.com>
Date: Fri, 21 Feb 2025 00:35:23 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D=E4=BE=A7?=
=?UTF-8?q?=E8=BE=B9=E6=A0=8F=E9=85=8D=E8=89=B2=E6=96=B9=E6=B3=95=E6=97=A0?=
=?UTF-8?q?=E6=B3=95=E6=AD=A3=E7=A1=AE=E5=8A=A0=E8=BD=BD=E5=88=9D=E5=A7=8B?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/layout/components/Settings/index.vue | 11 ++++++-----
src/store/modules/settings.ts | 4 ++--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue
index eb1d8d96..d5fe2e23 100644
--- a/src/layout/components/Settings/index.vue
+++ b/src/layout/components/Settings/index.vue
@@ -29,7 +29,7 @@
{{ $t("settings.sidebarColorScheme") }}
-
+
{{ $t("settings.minimalWhite") }}
@@ -53,7 +53,9 @@ const route = useRoute();
const appStore = useAppStore();
const settingsStore = useSettingsStore();
const permissionStore = usePermissionStore();
+
const isDark = ref(settingsStore.theme === ThemeEnum.DARK);
+const sidebarColor = computed(() => settingsStore.sidebarColorScheme);
const settingsVisible = computed({
get() {
@@ -84,13 +86,12 @@ const changeTheme = (val: any) => {
};
/**
- * 更改侧边栏颜色方案
+ * 更改侧边栏颜色
*
* @param val 颜色方案名称
*/
-const changeSidebarColorScheme = (val: any) => {
- console.log(val);
- settingsStore.changeSidebarColorScheme(val);
+const changeSidebarColor = (val: any) => {
+ settingsStore.changeSidebarColor(val);
};
/**
diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts
index 12a58e50..41bfa4e7 100644
--- a/src/store/modules/settings.ts
+++ b/src/store/modules/settings.ts
@@ -67,7 +67,7 @@ export const useSettingsStore = defineStore("setting", () => {
theme.value = val;
}
- function changeSidebarColorScheme(val: string) {
+ function changeSidebarColor(val: string) {
sidebarColorScheme.value = val;
}
@@ -92,6 +92,6 @@ export const useSettingsStore = defineStore("setting", () => {
changeTheme,
changeThemeColor,
changeLayout,
- changeSidebarColorScheme,
+ changeSidebarColor,
};
});