ai-manus/chat-client/library/components/VabApp/index.vue

45 lines
1.1 KiB
Vue
Raw Normal View History

2025-07-18 16:38:18 +08:00
<script lang="ts" setup>
import { pwa } from '@/config'
import { useHead } from '@vueuse/head'
2025-07-22 16:48:28 +08:00
import { enLocale, zhLocale, zhTwLocale} from '@/i18n'
2025-07-18 16:38:18 +08:00
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>