我使用的创建空白页面的做法
首先在欲跳转页面加入:
this.$router.push({
name:'black',
params:{back:this.$route.name}
})
然后创建一个空白页面(别忘了注册路由)
在空白页面里面加入:
mounted(){
// console.log(this.$route);
this.$router.replace(this.$route.params.back);
}
就可以了。
其实还有很多方法,但是那个方法感觉有些繁琐,就选择了这个方法。