参考: https://blog.csdn.net/xiaolinlife/article/details/89517928

 

 

beforeRouteLeave (to, from, next){
      if(to.name =="moreDishes" || to.name =="cashCouponDetail" || to.name =="mapRoutePlanning" || to.name =="toShopMealDetail"){
        from.meta.keepAlive = true;
      }else{
        from.meta.keepAlive = false;
      }
        next();
    },

 

相关文章: