mounted () {
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.goBack, false)
}
},
methods: {
goBack () {
this.$router.push('/mine') // 这里写上你要跳转的页面
}
}
destroyed () {
window.removeEventListener('popstate', this.goBack, false)
}
非常简单 亲测有效