mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
16 lines
441 B
Vue
16 lines
441 B
Vue
|
<script setup lang="ts">
|
||
|
console.log('[async] [async]')
|
||
|
const route = useRoute('suspense-async-parent-async-child')
|
||
|
await new Promise(resolve => setTimeout(resolve, 500))
|
||
|
console.log(`[async] [${route.params.parent}] [async] [${route.params.child}] running async data`)
|
||
|
const data = route.params
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div>
|
||
|
Async child: {{ route.params.parent }} - {{ route.params.child }}
|
||
|
<hr>
|
||
|
{{ data }}
|
||
|
</div>
|
||
|
</template>
|