fix warnings about transitions

This commit is contained in:
MiniDigger 2022-03-21 17:26:26 +01:00
parent 77f3217069
commit 870e16ca3a
3 changed files with 33 additions and 18 deletions

View File

@ -8,12 +8,17 @@ import Container from "~/components/design/Container.vue";
<main>
<Header />
<Container class="min-h-[80vh]">
<transition name="slide">
<Suspense>
<router-view v-bind="$attrs" />
<template #fallback> Loading...</template>
</Suspense>
</transition>
<Suspense>
<router-view v-slot="{ Component }" v-bind="$attrs">
<transition name="slide">
<!-- dummy diff to make the transition work on pages where template root has multiple elements -->
<div id="#page">
<component :is="Component" />
</div>
</transition>
</router-view>
<template #fallback> Loading...</template>
</Suspense>
</Container>
<Footer />
</main>

View File

@ -1,12 +1,17 @@
<template>
<main>
<div class="min-h-[60vh]">
<transition name="slide">
<Suspense>
<router-view v-bind="$attrs" />
<template #fallback> Loading...</template>
</Suspense>
</transition>
<Suspense>
<router-view v-slot="{ Component }" v-bind="$attrs">
<transition name="slide">
<!-- dummy diff to make the transition work on pages where template root has multiple elements -->
<div id="#page">
<component :is="Component" />
</div>
</transition>
</router-view>
<template #fallback> Loading...</template>
</Suspense>
</div>
</main>
</template>

View File

@ -7,12 +7,17 @@ import Footer from "~/components/layout/Footer.vue";
<main>
<Header />
<div class="min-h-[60vh]">
<transition name="slide">
<Suspense>
<router-view v-bind="$attrs" />
<template #fallback> Loading...</template>
</Suspense>
</transition>
<Suspense>
<router-view v-slot="{ Component }" v-bind="$attrs">
<transition name="slide">
<!-- dummy diff to make the transition work on pages where template root has multiple elements -->
<div id="#page">
<component :is="Component" />
</div>
</transition>
</router-view>
<template #fallback> Loading...</template>
</Suspense>
</div>
<Footer />
</main>