vue2.0上做切换过渡时,发现切换显示正常,切换消失时有延时没有过渡效果
<transition name='fade'>
<p v-show="isShow" class="detail" >
</p>
</transition>
.detail
position fixed
z-index 100
top 0
left 0
width 100%
height 100%
overflow auto
background rgba(7,17,27,.8)
&.fade-enter-active,&.fade-leave-active
transition opacity 3s
&.fade-enter,&fade-leave-active
opacity 0
能用animate.css 就用, 不要自己去造轮子。 直接 <transition enter-active-class="animated fadeIn" leave-active-clss="animated fadeOut"></transition>