文章详情页
vue element 关闭当前tab 跳转到上一路由操作
浏览:191日期:2022-12-31 16:22:49
方法一
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
相关文章:
1. Vue实现动态样式的多种方法汇总2. Vue看了就会的8个小技巧3. Python 解析简单的XML数据4. SpringBoot整合Redis的步骤5. 关于springboot 中使用httpclient或RestTemplate做MultipartFile文件跨服务传输的问题6. Vue Element前端应用开发之界面语言国际化7. SpringBoot+MQTT+apollo实现订阅发布功能的示例8. python 网页解析器掌握第三方 lxml 扩展库与 xpath 的使用方法9. python 如何将带小数的浮点型字符串转换为整数10. Python3.8 + Tkinter: Button设置image属性不显示的问题及解决方法
排行榜

网公网安备