Transition + Component实现路由跳转浅入浅出效果
.动画name-enter-active .动画name-leave-active{
transition: all 0.3s;
}
.动画name-enter-from, .动画name-leave-to{
transform: translate3d(100% , 0 , 0);
}
<router-view v-slot="{Component}">//指向Component这个变量
<transition appear name="动画name">
//动态组件,指向Component
<component :is="Component" :data="selectedSinger"/>
</transition>
</router-view>