2016-12-20 17:05:39 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2017-08-25 10:24:39 +00:00
|
|
|
<h1>I am the {{ name }}</h1>
|
2018-08-31 20:34:12 +00:00
|
|
|
<nuxt-child />
|
2016-12-20 17:05:39 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2017-08-25 10:24:39 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
async asyncData({ route }) {
|
2017-10-31 13:26:19 +00:00
|
|
|
const asyncData = {}
|
2017-08-25 10:24:39 +00:00
|
|
|
|
|
|
|
await new Promise((resolve, reject) => {
|
|
|
|
setTimeout(() => {
|
|
|
|
asyncData.name = 'parent'
|
2017-10-31 13:26:19 +00:00
|
|
|
resolve()
|
2017-08-25 10:24:39 +00:00
|
|
|
}, 100)
|
2017-10-31 13:26:19 +00:00
|
|
|
})
|
2017-08-25 10:24:39 +00:00
|
|
|
|
2017-10-31 13:26:19 +00:00
|
|
|
return asyncData
|
2017-08-25 10:24:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|