diff --git a/src/router/index.js b/src/router/index.js index af343bc..6921961 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -98,13 +98,13 @@ const router = createRouter({ history: createWebHistory( import.meta.env.VITE_APP_ROUTER_PREFIX), routes: constantRoutes, - // scrollBehavior(to, from, savedPosition) { - // if (savedPosition) { - // return savedPosition - // } else { - // return { top: 0 } - // } - // }, + scrollBehavior(to, from, savedPosition) { + if (savedPosition) { + return savedPosition + } else { + return { top: 0 } + } + }, }); export default router; \ No newline at end of file