Closed Penguinlay closed 3 years ago
In in-out
, out gradually but in right away.
<router-view v-slot="{ Component }">
<transition name="fade" mode="in-out" appear :duration="1000">
<component :is="Component" />
</transition>
</router-view>
In out-in
, in and out right away after pausing for duration 1000.
<router-view v-slot="{ Component }">
<transition name="fade" mode="out-in" appear :duration="1000">
<component :is="Component" />
</transition>
</router-view>
If CSS is manually defined as below:
.fade-enter, .fade-leave-active {
opacity: 0
}
Fade in-out transition works.
Based on chat Discord, it seems that manual styling is expected. I will close this issue for now.
Version
4.0.6
Reproduction link
https://codepen.io/SheinLinPhyo/pen/WNRKpMv
Steps to reproduce
Create a couple child components with router defined on them. Wrap and call
router-view
withtransition
:What is expected?
Transition is applied upon route switching.
What is actually happening?
No transition is applied. No console error during the development version.
In my project with the following dependencies, the behavior below is observed.
With or without key, the following warning is shown in console for every route under router-view upon first render, and then one subsequently upon each route change: