1
0
mirror of https://github.com/nuxt/nuxt.git synced 2024-12-11 23:07:16 +00:00
Nuxt/test/fixtures/basic/pages/suspense/async-[parent].vue

19 lines
416 B
Vue
Raw Normal View History

<script setup lang="ts">
if (import.meta.client) {
console.log('[async]')
}
const route = useRoute('suspense-async-parent')
await new Promise(resolve => setTimeout(resolve, 100))
if (import.meta.client) {
console.log('[async] running async data')
}
</script>
<template>
<main :id="route.path.replace(/[/-]+/g, '-')">
Async parent: {{ route.params.parent }}
<hr>
<NuxtPage />
</main>
</template>