|
@@ -421,6 +421,7 @@ import { Local } from '@/utils/storage';
|
|
|
import other from '@/utils/other';
|
|
|
import mittBus from '@/utils/mitt';
|
|
|
import {useUserInfo} from "@/stores/userInfo";
|
|
|
+import { useDark } from '@vueuse/core';
|
|
|
|
|
|
const storesThemeConfig = useThemeConfig();
|
|
|
const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
@@ -546,6 +547,8 @@ const onAddDarkChange = () => {
|
|
|
const body = document.documentElement as HTMLElement;
|
|
|
if (getThemeConfig.value.isIsDark) body.setAttribute('data-theme', 'dark');
|
|
|
else body.setAttribute('data-theme', '');
|
|
|
+ const isDark = useDark();
|
|
|
+ isDark.value = themeConfig.value.isIsDark; // 更改暗黑模式
|
|
|
};
|
|
|
// 4、界面显示 --> 开启水印
|
|
|
const stores = useUserInfo();
|