💄 feat(theme): 页面主题切换完成

This commit is contained in:
BTMuli
2023-04-22 00:24:40 +08:00
parent 857cdec786
commit 277888dead
24 changed files with 277 additions and 87 deletions

View File

@@ -40,11 +40,11 @@ import { TGAppDataList, TGGetDataList } from "./data";
const appStore = useAppStore();
const isMain = ref(true as boolean);
const theme = ref(appStore.theme as string);
onMounted(async () => {
// 获取当前主题
const theme = appStore.theme;
document.documentElement.className = theme;
document.documentElement.className = theme.value;
// 获取当前窗口
const win = window.getCurrent();
isMain.value = win.label === "tauri-genshin";