Fixed scroll behavior

This commit is contained in:
Lucas
2026-05-26 22:42:30 +10:00
parent bd248ee9b3
commit 6ee42de45b

View File

@@ -63,8 +63,15 @@ const routes = [
]; ];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(import.meta.env.BASE_URL),
routes, routes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
}
return { top: 0 }
}
}); });
export default router; export default router;