vue 中代码实现
mounted () {
history.pushState(null, null, document.URL);
window.addEventListener('popstate', this.disableBrowserBack);
},
destroyed () {
// 清除popstate事件 否则会影响到其他页面
window.removeEventListener("popstate", this.disableBrowserBack, false);
},