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('[async]')
|
|
|
|
}
|
2023-05-11 17:57:18 +00:00
|
|
|
const route = useRoute('suspense-async-parent')
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 100))
|
2023-09-19 21:26:15 +00:00
|
|
|
if (import.meta.client) {
|
|
|
|
console.log('[async] running async data')
|
|
|
|
}
|
2023-05-11 17:57:18 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-07-05 10:39:39 +00:00
|
|
|
<main :id="route.path.replace(/[/-]+/g, '-')">
|
2023-05-11 17:57:18 +00:00
|
|
|
Async parent: {{ route.params.parent }}
|
|
|
|
<hr>
|
|
|
|
<NuxtPage />
|
2023-07-05 10:39:39 +00:00
|
|
|
</main>
|
2023-05-11 17:57:18 +00:00
|
|
|
</template>
|