src/router/index.ts
@@ -13,7 +13,16 @@ const router = createRouter({ history: createWebHistory(), routes routes, scrollBehavior(to, from, savedPosition) { if (to.hash) { return { el: to.hash, behavior: 'smooth' }; } return savedPosition || { top: 0 }; } }); export default router;