Adjust scroll behavior on route change

This commit is contained in:
Ramon Wenger 2018-08-23 11:28:33 +02:00
parent 673e05d6a6
commit c95a7f32ee
1 changed files with 4 additions and 1 deletions

View File

@ -29,5 +29,8 @@ const routes = [
Vue.use(Router)
export default new Router({
routes,
mode: 'history'
mode: 'history',
scrollBehavior(to, from, savedPosition) {
return {x: 0, y: 0}
}
})