最近需求有个需要点击返回上级路由关闭当前路由,找了半天记一下

this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1)
this.$router.push(this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.length-1].path)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-02-11
  • 2022-01-10
  • 2021-08-19
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2021-12-22
  • 2021-12-02
  • 2021-12-03
  • 2021-06-21
相关资源
相似解决方案