Skip to content

Commit d3710a0

Browse files
committed
scroll to top of page on navigation
1 parent d254eee commit d3710a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/router/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const routes = [
9696
const router = createRouter({
9797
history: createWebHistory(import.meta.env.BASE_URL),
9898
routes,
99+
scrollBehavior: () => ({ top: 0 })
99100
})
100101

101102
export default router

0 commit comments

Comments
 (0)