27 lines
464 B
Vue
27 lines
464 B
Vue
<script setup lang="ts">
|
|
import { onMounted } from 'vue'
|
|
import { useAuthStore } from '@/stores/auth'
|
|
|
|
// 根组件:启动时探测会话(路由守卫会复用已加载状态)。
|
|
const auth = useAuthStore()
|
|
onMounted(() => {
|
|
void auth.fetchMe()
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<el-config-provider>
|
|
<router-view />
|
|
</el-config-provider>
|
|
</template>
|
|
|
|
<style>
|
|
html,
|
|
body,
|
|
#app {
|
|
height: 100%;
|
|
margin: 0;
|
|
background: var(--el-bg-color-page);
|
|
}
|
|
</style>
|