2023-05-11 17:57:18 +00:00
|
|
|
<script setup lang="ts">
|
2023-09-19 21:26:15 +00:00
|
|
|
if (import.meta.client) {
|
|
|
|
console.log('[sync] [async]')
|
|
|
|
}
|
2023-05-11 17:57:18 +00:00
|
|
|
const route = useRoute('suspense-async-parent-sync-child')
|
2023-10-31 12:56:28 +00:00
|
|
|
await new Promise(resolve => setTimeout(resolve, 50))
|
2023-09-19 21:26:15 +00:00
|
|
|
if (import.meta.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>
|