vue element 关闭当前tab 跳转到上一路由操作

(编辑:jimmy 日期: 2025/3/16 浏览:2)

方法一

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)

补充知识:vue+element解决点击table列表的从详情或修改页面跳转路由到列表页总是跳转到第一页,而不能跳转到当前页的问题

思路:

将当前页的页码currentPage存入session,然后点击详情跳转到详情页面,然后,再次返回当前页的时候,在created生命周期里,获取到存储的currentPage,再进行加载

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

vue element 关闭当前tab 跳转到上一路由操作

以上这篇vue element 关闭当前tab 跳转到上一路由操作就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

一句话新闻

Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。