mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-18 03:35:17 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
24 lines
357 B
Vue
24 lines
357 B
Vue
<template>
|
|
<div>
|
|
<h1>I am the {{ name }}</h1>
|
|
<NuxtChild />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
async asyncData ({ route }) {
|
|
const asyncData = {}
|
|
|
|
await new Promise((resolve, reject) => {
|
|
setTimeout(() => {
|
|
asyncData.name = 'parent'
|
|
resolve()
|
|
}, 100)
|
|
})
|
|
|
|
return asyncData
|
|
}
|
|
}
|
|
</script>
|