2023-05-11 17:57:18 +00:00
|
|
|
<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>
|
2023-07-05 10:39:39 +00:00
|
|
|
<div :id="'child' + route.path.replace(/[/-]+/g, '-')">
|
2023-05-11 17:57:18 +00:00
|
|
|
Async child: {{ route.params.parent }} - {{ route.params.child }}
|
|
|
|
<hr>
|
|
|
|
{{ data }}
|
|
|
|
</div>
|
|
|
|
</template>
|