mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-18 18:27:13 +00:00
c1ddb359e3
Co-authored-by: Damian Głowala <damian.glowala.rebkow@gmail.com>
36 lines
704 B
Vue
36 lines
704 B
Vue
<script setup lang="ts">
|
|
const page = ref<HTMLDivElement | undefined>()
|
|
const mountedHTML = ref()
|
|
onMounted(() => {
|
|
mountedHTML.value = page.value?.innerHTML
|
|
})
|
|
|
|
const lazy = useRoute().query.lazy === 'true'
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
ref="page"
|
|
class="end-page"
|
|
>
|
|
End page
|
|
<pre>{{ mountedHTML }}</pre>
|
|
<section id="fallback">
|
|
<AsyncServerComponent
|
|
:lazy="lazy"
|
|
:count="42"
|
|
>
|
|
<template #fallback>
|
|
Loading server component
|
|
</template>
|
|
</AsyncServerComponent>
|
|
</section>
|
|
<section id="no-fallback">
|
|
<AsyncServerComponent
|
|
:lazy="lazy"
|
|
:count="42"
|
|
/>
|
|
</section>
|
|
</div>
|
|
</template>
|