vue中 keep-alive 结合 transition 使用(已解决)
<div><transition :name="transitionName" ><keep-alive ><router-view :class="homeClass?'child-view ss-keep':'child-view1 ss-keep'" v-if="$route.meta.keepAlive"></router-...
·
<div>
<transition :name="transitionName" >
<keep-alive >
<router-view :class="homeClass?'child-view ss-keep':'child-view1 ss-keep'" v-if="$route.meta.keepAlive"></router-view>
<router-view :class="homeClass?'child-view ns-keep':'child-view1 ns-keep'" v-if="!$route.meta.keepAlive" :key="'time'+new Date().getTime()"></router-view>
</keep-alive>
</transition>
</div>
更多推荐
已为社区贡献1条内容
所有评论(0)