博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vue element 关闭当前tab 跳转到上一路由
阅读量:4636 次
发布时间:2019-06-09

本文共 394 字,大约阅读时间需要 1 分钟。

方法一

this.$store.dispatch('delVisitedViews', this.$route);

this.$router.go(-1);

 

方法二

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)

转载于:https://www.cnblogs.com/zhang-wenbin/p/11075897.html

你可能感兴趣的文章
lambda表达式树
查看>>
OpenCV YUV 与 RGB的互转(草稿)
查看>>
二次注入原理及防御
查看>>
会话记住已登录功能
查看>>
Linux内核分析——可执行程序的装载
查看>>
儿子和女儿——解释器和编译器的区别与联系
查看>>
第一阶段冲刺3
查看>>
父类引用指向子类对象
查看>>
网页如何实现下载功能
查看>>
IT男专用表白程序
查看>>
读《大道至简》第六章感想
查看>>
ef linq 中判断实体中是否包含某集合
查看>>
章三 链表
查看>>
Solution for Concurrent number of AOS' for this application exceeds the licensed number
查看>>
CSE 3100 Systems Programming
查看>>
IntelliJ IDEA 的Project structure说明
查看>>
Java Security(JCE基本概念)
查看>>
Linux Supervisor的安装与使用入门
查看>>
创建 PSO
查看>>
JasperReport报表设计4
查看>>