mounted() {
//监听返回键
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
window.addEventListener('popstate', this.backButton, false);//false阻止默认事件
}
},
destroyed () {
window.removeEventListener('popstate', this.backButton, false);//false阻止默认事件
},
网友评论