Files
evilspins/appOLDD/router.options.ts
valere b9a3d0184f
All checks were successful
Deploy App / build (push) Successful in 10s
Deploy App / deploy (push) Successful in 11s
yeah
2026-02-02 21:00:28 +01:00

17 lines
357 B
TypeScript

import type { RouterScrollBehavior } from 'vue-router'
const scrollBehavior: RouterScrollBehavior = (to, from, savedPosition) => {
if (savedPosition) {
return savedPosition
}
if (to.hash) {
return { el: to.hash }
}
// Preserve current scroll position on navigation (no scroll-to-top)
return false
}
export default {
scrollBehavior
}