vue里面的路由监听

加判断,错在第一次没有oldVal,所以不能加这个oldVal!=val,多加一次判断
level:{
handler: function (val, oldVal) {
if(oldVal!=val&&this.haveResh){
this.routerTo(this.level.place,null)
}
this.haveResh=true;
// alert(this.level.place);
},
deep: true
}

posted @ 2018-02-02 14:18  小曦曦  阅读(216)  评论(0编辑  收藏  举报