Nuxt/test/fixtures/basic/pages/legacy/async-data.vue

21 lines
291 B
Vue
Raw Normal View History

<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>