23 lines
516 B
Vue
23 lines
516 B
Vue
<script setup lang="ts">
|
|
import MainLayout from '@/components/layouts/MainLayout.vue'
|
|
import zhCN from 'ant-design-vue/es/locale/zh_CN'
|
|
import dayjs from 'dayjs'
|
|
import 'dayjs/locale/zh-cn'
|
|
|
|
dayjs.locale('zh-cn')
|
|
|
|
const route = useRoute()
|
|
const isAuthPage = computed(() =>
|
|
['/login', '/register'].includes(route.path)
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<a-config-provider :locale="zhCN">
|
|
<RouterView v-if="isAuthPage" />
|
|
<MainLayout v-else>
|
|
<RouterView />
|
|
</MainLayout>
|
|
</a-config-provider>
|
|
</template>
|