mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
💄 feat(theme): 页面主题切换完成
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user