Nuxt/examples/custom-loading/pages/index.vue

29 lines
437 B
Vue
Raw Normal View History

2016-11-11 14:30:11 +00:00
<template>
<div class="container">
<p>Hello {{ name }}!</p>
<NuxtLink to="/about">
Go to /about
</NuxtLink>
2016-11-11 14:30:11 +00:00
</div>
</template>
<script>
export default {
2017-10-31 13:43:55 +00:00
asyncData() {
2016-11-11 14:30:11 +00:00
return new Promise((resolve) => {
setTimeout(function () {
resolve({ name: 'world' })
}, 1000)
})
}
}
</script>
<style scoped>
.container {
font-size: 20px;
text-align: center;
padding-top: 100px;
}
</style>