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"
}
});
}
},
君不见,高堂明镜悲白发,朝如青丝暮成雪
原文地址:https://www.cnblogs.com/lzhflzjx/p/15578174.html