方法一
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)
JavaScript页面返回方法分享
博客分享了两种JavaScript实现页面返回的方法。方法一是通过this.$store.dispatch('delVisitedViews', this.$route)和this.$router.go(-1)实现;方法二则转载自https://www.cnblogs.com/zhang - wenbin/p/11075897.html 。
7327

被折叠的 条评论
为什么被折叠?



