问题记录:默认页面跳转页面后 浏览器自带的返回箭头没有了 也就是不能返回。
问题本质:路由跳转 replace和push的区别
helpCenter(){
this.$router.replace('/hc/index')
},
区别: this.router.push跳转到指定url路径,并想history栈中添加一个记录,点击后退会返回到上一个页面this.router.push跳转到指定url路径,并想history栈中添加一个记录,点击后退会返回到上一个页面
this.router.replace跳转到指定url路径,但是history栈中不会有记录,点击返回会跳转到上上个页面 (也就是直接替换了当前页面)
问题解决:所以把replace换成push就好了
helpCenter(){
this.$router.push('/hc/index')
},