2021-08-09 17:28:48 +08:00
|
|
|
<template>
|
2021-08-11 15:44:50 +08:00
|
|
|
<a-config-provider :locale="locale">
|
|
|
|
<div id="app">
|
|
|
|
<router-view/>
|
|
|
|
</div>
|
|
|
|
</a-config-provider>
|
2021-08-09 17:28:48 +08:00
|
|
|
</template>
|
|
|
|
|
2021-08-11 15:44:50 +08:00
|
|
|
<script>
|
|
|
|
import { domTitle, setDocumentTitle } from '@/utils/domUtil'
|
|
|
|
import { i18nRender } from '@/locales'
|
2021-08-09 17:28:48 +08:00
|
|
|
|
2021-08-11 15:44:50 +08:00
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
locale () {
|
|
|
|
// 只是为了切换语言时,更新标题
|
|
|
|
const { title } = this.$route.meta
|
|
|
|
title && (setDocumentTitle(`${i18nRender(title)} - ${domTitle}`))
|
|
|
|
return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
|
|
|
|
}
|
|
|
|
}
|
2021-08-09 17:28:48 +08:00
|
|
|
}
|
2021-08-11 15:44:50 +08:00
|
|
|
</script>
|