+
+
+ changeSwitch('mode',val)"
+ >
+
+
+
+
@@ -23,16 +35,12 @@
-
- changeSwitch('mode',val)"
- >
-
-
-
+
+ changeGrayWeak('gray',val)" />
+
+
+
+ changeGrayWeak('weak',val)" />
@@ -42,6 +50,14 @@
changeSwitch('showLogo',val)" />
+
+
+ changeSwitch('uniqueOpened',val)" />
+
+
+
+ changeSwitch('fixedHeader',val)" />
+
@@ -57,7 +73,11 @@
const layout = ref(SettingStore.themeConfig.mode)
const showTag = ref(SettingStore.themeConfig.showTag)
const showLogo = ref(SettingStore.themeConfig.showLogo)
+ const uniqueOpened = ref(SettingStore.themeConfig.uniqueOpened)
const primary = ref(SettingStore.themeConfig.primary)
+ const fixedHeader = ref(SettingStore.themeConfig.fixedHeader)
+ const gray = ref(SettingStore.themeConfig.gray)
+ const weak = ref(SettingStore.themeConfig.weak)
const drawer = computed({
get() {
@@ -105,6 +125,15 @@
changeSwitch('primary',val)
}
+ // 修改灰色模式
+ const changeGrayWeak = (type,val)=>{
+ const body = document.documentElement as HTMLElement;
+ if (!val) return body.setAttribute("style", "");
+ if (type === "gray") body.setAttribute("style", "filter: grayscale(1)");
+ if (type === "weak") body.setAttribute("style", "filter: invert(80%)");
+ changeSwitch(type,val)
+ }
+