关闭当前路由,跳转其他页面
close() {
// 返回上级路由并关闭当前路由
this.$store.state.tagsView.visitedViews.splice(this.$store.state.tagsView.visitedViews.findIndex(item => item.path === this.$route.path), 1)
this.$router.push('目标页面的路由地址’)
}
举例:
目标页面的路由地址:'/test/list'