vue路由钩子函数(进入和离开钩子函数)
作者:互联网
beforeRouteEnter:(to, from, next) => {
console.log("准备进入这个路由");
next(
console.log("进入路由后要调用的函数")
);
},
beforeRouteLeave:(to, from, next) => {
console.log("准备离开这个路由");
next(
console.log("离开路由后要调用的函数")
);
}
标签:vue,console,函数,钩子,next,后要,路由,log 来源: https://blog.csdn.net/weixin_43919497/article/details/116402323