代码初始化
This commit is contained in:
19
src/App.vue
Normal file
19
src/App.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<router-view />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useScreenStore from "@/store/modules/screen";
|
||||
|
||||
const screenStore = useScreenStore();
|
||||
|
||||
import { onMounted } from "vue";
|
||||
|
||||
onMounted(() => {
|
||||
const theme = screenStore.theme;
|
||||
screenStore.toggleTheme(theme);
|
||||
window.document.documentElement.setAttribute("data-theme", theme);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user