beforeRouteLeave vue监听返回的使用方法

beforeRouteLeave(to, from, next) {
console.log(this, to, from, next, "thissss");
if (to.fullPath == "/transfer?jumpUrl=retain") {
next();
} else {
this.$router.replace({
path: "/transfer",
query: {
jumpUrl: "retain"
}
});
}
},

 

posted @ 2021-11-19 16:58  lzhflzjx  阅读(244)  评论(0编辑  收藏  举报