correct scroll position after navigating

pull/1/head
Thomas Ballmann 4 years ago
parent fa4f4bbbbb
commit 94339ea160

@ -39,4 +39,11 @@ export default new VueRouter({
{ path: '*', redirect: '/' }, { path: '*', redirect: '/' },
], ],
scrollBehavior (to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else {
return { x: 0, y: 0 }
}
},
}) })

Loading…
Cancel
Save