Files
Web_Template_Vue3_Dev/library/components/VabApp/index.vue
MomoWen 3e2da1115e
Some checks failed
Call HTTPS API / build (push) Has been cancelled
初始化拉取,原文件名:admin-plus-webpack5
2025-12-26 20:43:10 +08:00

46 lines
1.2 KiB
Vue

<script lang="ts" setup>
import { useHead } from '@vueuse/head'
import { pwa } from '@/config'
import { enLocale, zhLocale } from '@/i18n'
const route = useRoute()
const { locale: language } = useI18n()
const locale = computed(() =>
language.value === 'en' ? enLocale : zhLocale
)
const VabUpdate = defineAsyncComponent(
() => import('@/plugins/VabUpdate/index.vue')
)
const siteData = reactive({
description: '',
})
watchEffect(() => {
siteData.description = `${'Vue'} ${'Admin'} ${'Plus'}-${route.meta.title} - 简介、官网、首页、文档和下载 - 前端开发框架`
})
useHead({
meta: [
{
name: `description`,
content: computed(() => siteData.description),
},
],
})
</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>