2023-05-11 17:57:18 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
console.log('[sync] [async]')
|
|
|
|
const route = useRoute('suspense-async-parent-sync-child')
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 500))
|
2023-07-05 10:39:39 +00:00
|
|
|
console.log(`[sync] [${route.params.parent}] [async] [${route.params.child}] running async data`)
|
2023-05-11 17:57:18 +00:00
|
|
|
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>
|