Revert "Remove unnecessary scrollBehavior function in router."

This reverts commit 275ccbc547.
This commit is contained in:
FireMasterK 2022-02-11 02:57:11 +00:00
parent 483617bd33
commit 3035c3cee4
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -75,6 +75,9 @@ const routes = [
const router = createRouter({
history: createWebHistory(),
routes,
scrollBehavior: function (_to, _from, savedPosition) {
return savedPosition ? savedPosition : window.scrollTo(0, 0);
},
});
export default router;