<transition :name="transitionName">
<keep-alive :include="keepAliveNames">
<router-view ></router-view>
</keep-alive>
</transition>
// watch $route 决定使用哪种过渡
'$route'(to,from){
const isRouter = to.params.isRouter;
if (isRouter === 'push') {
this.keepAliveNames.push(to.name);
this.transitionName = 'fold-left';
} else {
this.keepAliveNames.pop();
this.transitionName = 'fold-right';
}
}