1. En main.js, agregue la supervisión de popstate
window.addEventListener('popstate', function() {
history.pushState(null, null, document.URL)
})
2. Index.js del enrutador:
const router = new Router({
mode: 'hash',
routes,
scrollBehavior: () => {
history.pushState(null, null, document.URL)
}
})