47 lines
782 B
Vue
47 lines
782 B
Vue
<script setup>
|
|
import { onMounted } from 'vue'
|
|
import { RouterView } from 'vue-router'
|
|
import { useLangStore } from '@/stores/lang'
|
|
|
|
const langStore = useLangStore()
|
|
|
|
onMounted(() => {
|
|
// 在组件挂载后初始化语言
|
|
langStore.initLanguage()
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div id="app">
|
|
<RouterView />
|
|
</div>
|
|
</template>
|
|
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-tap-highlight-color: transparent;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
#app {
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|