router.beforeEach((to, from, next) => {
    //拦截指定路由
    if(to.path === '/home'){
        //todo
    }else{
        scrollTo(0, 0);
        next();
    }
})

 

相关文章:

  • 2021-06-29
  • 2021-05-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
猜你喜欢
  • 2021-08-08
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案