1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!--
- * @Author: xvying 1615026511@qq.com
- * @Date: 2022-10-31 14:56:49
- * @LastEditors: xvying 1615026511@qq.com
- * @LastEditTime: 2022-11-30 13:44:28
- * @FilePath: /xinjincheng-pc/library/components/VabApp/index.vue
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- -->
- <!-- <script lang="ts" setup>
- import { pwa } from '@/config'
- import { enLocale, zhLocale } from '@/i18n/index'
- const { locale: language } = useI18n()
- const locale = computed(() => (language.value === 'en' ? enLocale : zhLocale))
- const VabUpdate = defineAsyncComponent(
- () => import('@/plugins/VabUpdate/index.vue')
- )
- </script> -->
- <script>
- import { pwa } from '@/config'
- // import { zhCn } from '@/i18n/index'
- // const { locale: language } = useI18n()
- // const locale = computed(() => (language.value === 'en' ? zhCn : zhCn))
- import { defineComponent } from 'vue'
- import { ElConfigProvider } from 'element-plus'
- import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
- import VabUpdate from '@/plugins/VabUpdate/index.vue'
- export default defineComponent({
- components: {
- ElConfigProvider,
- VabUpdate,
- },
- setup() {
- return {
- locale: zhCn,
- }
- },
- })
- </script>
- <template>
- <el-config-provider
- :button="{
- autoInsertSpace: true,
- }"
- :locale="locale"
- >
- <router-view v-slot="{ Component }">
- <component :is="Component" />
- </router-view>
- <vab-update v-if="pwa" ref="vabUpdateRef" />
- </el-config-provider>
- </template>
|