问题遇到的现象和发生背景
登录后进入修改密码页面,要求不能退回登录页面,我使用beforeRouteleave 并没有作用,使用下面这段代码也没有效果,求指教!
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
});
我想要达到的结果
修改密码页面不能后退,成功修改后才能进行页面跳转