mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
21 lines
316 B
Vue
21 lines
316 B
Vue
<template>
|
|
<h2>Id={{ id }}</h2>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
async asyncData ({ route }) {
|
|
const asyncData = {}
|
|
|
|
await new Promise((resolve, reject) => {
|
|
setTimeout(() => {
|
|
asyncData.id = route.params.id
|
|
resolve()
|
|
}, 50)
|
|
})
|
|
|
|
return asyncData
|
|
}
|
|
}
|
|
</script>
|