Files
vueadmin/src/App.vue
2026-01-15 09:51:59 +08:00

34 lines
645 B
Vue

<script setup>
import { onMounted } from 'vue'
import { useI18nStore } from './stores/modules/i18n'
import i18n from './i18n'
onMounted(() => {
// 从持久化的 store 中读取语言设置并同步到 i18n
const i18nStore = useI18nStore()
i18n.global.locale.value = i18nStore.currentLocale
})
</script>
<template>
<router-view />
</template>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#app {
min-height: 100vh;
}
</style>