mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
23 lines
348 B
Vue
23 lines
348 B
Vue
<template>
|
|
<div>
|
|
<div>{{ hello }}</div>
|
|
<NuxtPage />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default defineNuxtComponent({
|
|
fetchKey: () => 'hello',
|
|
async setup () {
|
|
await nextTick()
|
|
useRuntimeConfig()
|
|
},
|
|
async asyncData () {
|
|
await nextTick()
|
|
return {
|
|
hello: await $fetch('/api/hello'),
|
|
}
|
|
},
|
|
})
|
|
</script>
|