Repair scrolling

This commit is contained in:
Kamil Niemczycki 2021-08-31 19:01:46 +02:00
parent 608f44280a
commit d4537b3b70

View File

@ -53,7 +53,19 @@ const routes = [
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL ?? '/',
routes
routes,
scrollBehavior (to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else if (to.hash) {
return {
selector: to.hash,
behavior: 'smooth'
}
} else {
return { x: 0, y: 0 }
}
}
})
const title = ' :: ' + mainTitle