Files
wondif_vue/app/pages/concerts/concert-[id].vue

24 lines
477 B
Vue

<template>
<div>
<div v-if="toto">
<h1>#{{route.params.id }} / {{ toto.title }}</h1>
<p>{{ toto.body }}</p>
</div>
<div v-else>
<p>Chargement...</p>
</div>
</div>
</template>
<script setup>
const route = useRoute()
const {data: toto} = await useFetch(() => 'https://jsonplaceholder.typicode.com/posts/' + route.params.id, { lazy: true })
useSeoMeta({
title: () => toto.value?.title
})
</script>
<style lang="scss">
</style>