tj
2025-03-17 9a2bb3ba61d653bf2ed75c19c8ee664accade482
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;