feat: add fade transition
This commit is contained in:
parent
f1b61b16cb
commit
358fbc7d25
@ -3,13 +3,13 @@
|
|||||||
<Nav />
|
<Nav />
|
||||||
|
|
||||||
<v-main style="--v-layout-top: 25px;--v-layout-bottom: 70px;">
|
<v-main style="--v-layout-top: 25px;--v-layout-bottom: 70px;">
|
||||||
<router-view v-slot="{ Component }">
|
|
||||||
<transition name="fade">
|
|
||||||
<div class="prose max-w-110ch m-auto p-3">
|
<div class="prose max-w-110ch m-auto p-3">
|
||||||
<component :is="Component" />
|
<router-view v-slot="{ Component, route }">
|
||||||
</div>
|
<transition name="fade">
|
||||||
|
<component :is="Component" :key="route.path" />
|
||||||
</transition>
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
|
</div>
|
||||||
</v-main>
|
</v-main>
|
||||||
</v-app>
|
</v-app>
|
||||||
</template>
|
</template>
|
||||||
|
@ -25,3 +25,13 @@ body,
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: opacity 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-enter-from,
|
||||||
|
.fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user