1. In main.js, add popstate monitoring
window.addEventListener('popstate', function() {
history.pushState(null, null, document.URL)
})
2. Router's index.js:
const router = new Router({
mode: 'hash',
routes,
scrollBehavior: () => {
history.pushState(null, null, document.URL)
}
})