You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
1.1 KiB

<script lang="ts" setup>
import 'dayjs/locale/zh-cn'
import { computed } from 'vue'
import { storeToRefs } from 'pinia'
import { App, ConfigProvider } from 'ant-design-vue'
import type { TransformCellTextProps } from 'ant-design-vue/lib/table/interface'
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()
const { themeConfig } = storeToRefs(appStore)
const componentSize = computed(() => appStore.getComponentSize)
// Listening to page changes and dynamically changing site titles
useTitle()
function transformCellText(props: TransformCellTextProps) {
if (!props.text || !props.text.length)
return '-'
return props.text
}
</script>
<template>
<ConfigProvider :locale="getAntdLocale" :theme="themeConfig" :component-size="componentSize" :transform-cell-text="transformCellText">
<App class="h-full w-full">
<AppProvider>
<RouterView />
</AppProvider>
</App>
</ConfigProvider>
</template>