mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-18 02:07:14 +00:00
d1f6f0dc09
* loading: add throttle option to skip progress for fast loads * Disable some tests relying on internals
28 lines
452 B
Vue
28 lines
452 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>
|