2025-05-10 01:02:23 +08:00
|
|
|
<script setup>
|
2026-01-09 09:40:03 +08:00
|
|
|
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
2025-08-25 01:46:31 +08:00
|
|
|
import { useAgentStore } from '@/stores/agent'
|
2025-10-10 23:50:29 +08:00
|
|
|
import { useUserStore } from '@/stores/user'
|
2025-11-23 01:39:44 +08:00
|
|
|
import { useThemeStore } from '@/stores/theme'
|
2025-08-25 01:46:31 +08:00
|
|
|
import { onMounted } from 'vue'
|
|
|
|
|
|
|
|
|
|
const agentStore = useAgentStore();
|
2025-10-10 23:50:29 +08:00
|
|
|
const userStore = useUserStore();
|
2025-11-23 01:39:44 +08:00
|
|
|
const themeStore = useThemeStore();
|
2025-08-25 01:46:31 +08:00
|
|
|
|
|
|
|
|
onMounted(async () => {
|
2025-10-10 23:50:29 +08:00
|
|
|
if (userStore.isLoggedIn) {
|
|
|
|
|
await agentStore.initialize();
|
|
|
|
|
}
|
2025-08-25 01:46:31 +08:00
|
|
|
})
|
2025-05-10 01:02:23 +08:00
|
|
|
</script>
|
2024-07-07 01:58:23 +08:00
|
|
|
<template>
|
2025-11-23 01:39:44 +08:00
|
|
|
<a-config-provider
|
|
|
|
|
:theme="themeStore.currentTheme"
|
2026-01-09 09:40:03 +08:00
|
|
|
:locale="zhCN"
|
2025-11-23 01:39:44 +08:00
|
|
|
>
|
2025-05-10 01:02:23 +08:00
|
|
|
<router-view />
|
|
|
|
|
</a-config-provider>
|
2024-07-07 01:58:23 +08:00
|
|
|
</template>
|