标签:class reac === color outer code 钩子 跳转 new
beforeEach是路由跳转前执行的,afterEach是路由跳转后执行的。
afterEach只有两个参数 afterEach((to,from)=>{})
例子:
router.afterEach((to,from)=>{ if(to.path === "/news"){ alert("进来news了哦"); } })
标签:class reac === color outer code 钩子 跳转 new
原文地址:https://www.cnblogs.com/luguankun/p/10699441.html