2026-04-28 11:33:17 +08:00
|
|
|
<template>
|
2026-04-29 15:59:23 +08:00
|
|
|
<a-config-provider :theme="themeConfig">
|
2026-04-28 11:33:17 +08:00
|
|
|
<a-app>
|
|
|
|
|
<router-view />
|
|
|
|
|
</a-app>
|
|
|
|
|
</a-config-provider>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-05-01 20:39:09 +08:00
|
|
|
import { onMounted } from 'vue'
|
2026-04-28 11:33:17 +08:00
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
import { useAuthStore } from '@/stores/auth'
|
2026-04-28 11:33:17 +08:00
|
|
|
|
2026-05-01 20:39:09 +08:00
|
|
|
const auth = useAuthStore()
|
2026-04-28 11:33:17 +08:00
|
|
|
|
2026-04-29 15:59:23 +08:00
|
|
|
const themeConfig = {
|
|
|
|
|
token: {
|
2026-05-01 20:39:09 +08:00
|
|
|
colorPrimary: '#4f46e5',
|
|
|
|
|
colorLink: '#4f46e5',
|
|
|
|
|
colorInfo: '#4f46e5',
|
2026-04-29 15:59:23 +08:00
|
|
|
borderRadius: 6,
|
|
|
|
|
},
|
2026-05-01 20:39:09 +08:00
|
|
|
}
|
2026-04-29 15:59:23 +08:00
|
|
|
|
2026-04-28 11:33:17 +08:00
|
|
|
onMounted(() => {
|
2026-05-01 20:39:09 +08:00
|
|
|
if (!auth.initialized) auth.hydrate()
|
|
|
|
|
})
|
2026-04-28 11:33:17 +08:00
|
|
|
</script>
|