TOPVERSE_Official/pages/blog/[id].vue

18 lines
517 B
Vue
Raw Normal View History

2023-05-05 17:23:07 +08:00
<script setup>
const route = useRoute()
const { locale } = useI18n()
2023-05-16 21:18:46 +08:00
const path = `/${locale.value}/${route.params.id}`
2023-05-05 17:23:07 +08:00
const { data } = await useAsyncData(`content-${path}`, () => {
return queryContent().where({ _path: path }).findOne()
})
</script>
<template>
2023-05-16 21:18:46 +08:00
<SectionBanner :img="data?.img" :title="data?.title" :topic="data?.topic" :description="data?.description" font-bold text-white />
<main class="m-auto prose xl:max-w-900px">
2023-05-05 17:23:07 +08:00
<ContentRenderer v-if="data" :value="data" />
</main>
</template>