新增深色模式

This commit is contained in:
eoao
2025-08-22 00:13:56 +08:00
parent d3325f0fe3
commit ff8ba81661
180 changed files with 1867 additions and 3346 deletions

View File

@@ -1,6 +1,7 @@
import {useUserStore} from "@/store/user.js";
import {useSettingStore} from "@/store/setting.js";
import {useAccountStore} from "@/store/account.js";
import {useUiStore} from "@/store/ui.js";
import {loginUserInfo} from "@/request/my.js";
import {permsToRouter} from "@/perm/perm.js";
import router from "@/router";
@@ -24,6 +25,10 @@ export async function init() {
i18n.global.locale.value = settingStore.lang
const uiStore = useUiStore();
let doc = document.querySelector("html");
doc.setAttribute('class', uiStore.dark ? 'dark' : '');
let setting = null;
if (token) {