需求是根据路由变化来改变面包屑显示

项目中采用的办法是只要路由改变,就重新获取面包屑的路径,然后渲染

watch: {
        $route() {
             this.getRoute()
        }
}      

或者

watch: {
        '$route'(to, from) {
             console.log(to,from)
        }
}  

 

相关文章:

  • 2021-10-21
  • 2021-07-03
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案