vue关闭当前子页面
最近需求有个需要点击返回上级路由关闭当前路由,找了半天记一下 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) 来源: oschina 链接: https://my.oschina.net/u/4409965/blog/4313891