From 09b96c75425cd2d931e7df4ef3f330b78bf74f9e Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Mon, 15 Jan 2024 13:55:47 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 7 +---- src/components/Setting/src/Setting.vue | 36 ++++++++++++-------------- src/store/modules/app.ts | 10 ++++++- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/App.vue b/src/App.vue index 840ff90..274b11b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,6 @@ import { computed } from 'vue' import { useAppStore } from '@/store/modules/app' import { ConfigGlobal } from '@/components/ConfigGlobal' import { useDesign } from '@/hooks/web/useDesign' -import { useDark } from '@vueuse/core' import { ElNotification } from 'element-plus' const { getPrefixCls } = useDesign() @@ -16,12 +15,8 @@ const currentSize = computed(() => appStore.getCurrentSize) const greyMode = computed(() => appStore.getGreyMode) -const isDark = useDark({ - valueDark: 'dark', - valueLight: 'light' -}) +appStore.initTheme() -isDark.value = appStore.getIsDark ElNotification({ title: '提示', type: 'warning', diff --git a/src/components/Setting/src/Setting.vue b/src/components/Setting/src/Setting.vue index 8bf2da6..e2077a4 100644 --- a/src/components/Setting/src/Setting.vue +++ b/src/components/Setting/src/Setting.vue @@ -1,6 +1,6 @@