Nuxt/test/fixtures/children/pages/parent.vue

24 lines
372 B
Vue
Raw Normal View History

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