Nuxt/test/fixtures/basic/pages/suspense/sync-[parent]/async-[child].vue
2023-08-15 07:35:56 +01:00

16 lines
524 B
Vue

<script setup lang="ts">
process.client && console.log('[sync] [async]')
const route = useRoute('suspense-async-parent-sync-child')
await new Promise(resolve => setTimeout(resolve, 500))
process.client && console.log(`[sync] [${route.params.parent}] [async] [${route.params.child}] running async data`)
const data = route.params
</script>
<template>
<div :id="'child' + route.path.replace(/[/-]+/g, '-')">
Async child: {{ route.params.parent }} - {{ route.params.child }}
<hr>
{{ data }}
</div>
</template>