Nuxt/test/fixtures/basic/pages/noloading.vue
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

28 lines
454 B
Vue

<template>
<div>
<h1>{{ name }}</h1>
<p>{{ loaded }}</p>
</div>
</template>
<script>
export default {
loading: false,
asyncData () {
return new Promise((resolve) => {
setTimeout(() => resolve({
loaded: false,
name: 'Nuxt.js'
}), 300)
})
},
mounted () {
this.$nuxt.$loading.finish()
setTimeout(() => {
this.$nuxt.$loading.start()
this.loaded = true
}, 1500)
}
}
</script>