2023-05-11 17:57:18 +00:00
|
|
|
<script setup lang="ts">
|
2023-08-15 06:35:56 +00:00
|
|
|
process.client && console.log('[sync] [async]')
|
2023-05-11 17:57:18 +00:00
|
|
|
const route = useRoute('suspense-async-parent-sync-child')
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 500))
|
2023-08-15 06:35:56 +00:00
|
|
|
process.client && 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>
|