| 123456789101112131415161718192021222324252627282930313233343536 |
- <template>
- <div id="app">
- <router-view />
- </div>
- </template>
- <script setup>
- import { onMounted, nextTick } from 'vue'
- import useSettingsStore from '@/store/modules/settings'
- import { handleThemeStyle } from '@/utils/theme'
- onMounted(() => {
- nextTick(() => {
- // 初始化主题样式
- handleThemeStyle(useSettingsStore().theme)
- })
- })
- </script>
- <style>
- /* 必须添加的根容器样式,确保autofit.js正常工作 */
- html, body {
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- overflow: hidden;
- }
- #app {
- width: 100%;
- height: 100%;
- overflow: hidden;
- position: relative;
- }
- </style>
|