Skip to content

Commit 067e0da

Browse files
committed
Got to top of the page on visiting any route
1 parent e760a71 commit 067e0da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/router/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ const routes = [
6565
const router = createRouter({
6666
history: createWebHistory(process.env.BASE_URL),
6767
routes,
68+
scrollBehavior() {
69+
document.getElementById('app').scrollIntoView();
70+
},
6871
});
6972

7073
export default router;

0 commit comments

Comments
 (0)