admin-vben/src/App.vue

27 lines
735 B
Vue
Raw Normal View History

2023-03-18 13:10:54 +00:00
<script lang="ts" setup>
2023-07-30 02:06:13 +00:00
import 'dayjs/locale/zh-cn'
2023-03-18 13:10:54 +00:00
import { ConfigProvider } from 'ant-design-vue'
2023-07-30 02:06:13 +00:00
import { storeToRefs } from 'pinia'
2023-03-18 13:10:54 +00:00
import { AppProvider } from '@/components/Application'
import { useTitle } from '@/hooks/web/useTitle'
import { useLocale } from '@/locales/useLocale'
import { useAppStore } from '@/store/modules/app'
// support Multi-language
const { getAntdLocale } = useLocale()
const appStore = useAppStore()
2023-07-30 02:06:13 +00:00
const { themeConfig } = storeToRefs(appStore)
2023-03-18 13:10:54 +00:00
// Listening to page changes and dynamically changing site titles
useTitle()
</script>
2023-07-29 10:46:43 +00:00
<template>
2023-07-30 02:06:13 +00:00
<ConfigProvider :locale="getAntdLocale" :theme="themeConfig">
2023-07-29 10:46:43 +00:00
<AppProvider>
<RouterView />
</AppProvider>
</ConfigProvider>
</template>