ForcePilot/web/src/App.vue

26 lines
598 B
Vue

<script setup>
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import { useAgentStore } from '@/stores/agent'
import { useUserStore } from '@/stores/user'
import { useThemeStore } from '@/stores/theme'
import { onMounted } from 'vue'
const agentStore = useAgentStore();
const userStore = useUserStore();
const themeStore = useThemeStore();
onMounted(async () => {
if (userStore.isLoggedIn) {
await agentStore.initialize();
}
})
</script>
<template>
<a-config-provider
:theme="themeStore.currentTheme"
:locale="zhCN"
>
<router-view />
</a-config-provider>
</template>