Created
February 7, 2022 08:15
-
-
Save Sammyjo20/3239b026b83118fcc1452635c6337ff9 to your computer and use it in GitHub Desktop.
Vue 2 Router Fix Scroll Position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const router = new VueRouter({ | |
routes: routes, | |
scrollBehavior (to, from, savedPosition) { | |
return { x: 0, y: 0 } | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment