vue中vue-router、transition、keep-alive结合使用
<transition :name="name"><keep-alive><router-view class="router-view" v-if="$route.meta.alive"></router-view>&
·
<transition :name="name">
<keep-alive>
<router-view class="router-view" v-if="$route.meta.alive"></router-view>
</keep-alive>
</transition>
<transition :name="name">
<router-view class="router-view" v-if="!$route.meta.alive"></router-view>
</transition>
更多推荐
已为社区贡献6条内容
所有评论(0)