mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
✨ feat(switch): 实现主题切换,后面就是更改配色了
This commit is contained in:
@@ -42,6 +42,9 @@ const appStore = useAppStore();
|
||||
const isMain = ref(true as boolean);
|
||||
|
||||
onMounted(async () => {
|
||||
// 获取当前主题
|
||||
const theme = appStore.theme;
|
||||
document.documentElement.className = theme;
|
||||
// 获取当前窗口
|
||||
const win = window.getCurrent();
|
||||
isMain.value = win.label === "tauri-genshin";
|
||||
@@ -93,7 +96,7 @@ async function writeIndex () {
|
||||
<style lang="css">
|
||||
.app-main {
|
||||
min-height: 100vh;
|
||||
background: #ece5d8;
|
||||
background: var(--page-bg);
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user