mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
21 lines
291 B
Vue
21 lines
291 B
Vue
<template>
|
|
<div>
|
|
{{ hello }}
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default defineNuxtComponent({
|
|
async setup () {
|
|
await nextTick()
|
|
useRuntimeConfig()
|
|
},
|
|
async asyncData () {
|
|
await nextTick()
|
|
return {
|
|
hello: await $fetch('/api/hello')
|
|
}
|
|
}
|
|
})
|
|
</script>
|