路由钩子函数
beforeRouteEnter(to, from, next){
console.log(to, from, next)
console.log(1)
next();
},
beforeRouteUpdate(to, from, next){
console.log(to, from, next)
console.log(2)
next();
},
beforeRouteLeave(to, from, next){
console.log(to, from, next)
console.log(3)
next();
},
网友评论