el-menu  有个属性 :default-active="curActive"  

el-menu-item 有个属性 :index=“home”

这2个属性值对上号就自动定位了

data() {
  return {
    curActive:"home"
  };
},

可以在左侧菜单栏组件里对路由进行监控,就算切换tagview也会自动定位

watch: {
  '$route' (to, from) {
    this.curActive = this.$store.state.curPage
  }
}

相关文章:

  • 2022-01-25
  • 2021-09-04
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案