router.js
const router = new VueRouter({
routes: [...],
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 };
}
})
これでページ遷移時、ページ先頭に来るようになった。
More than 5 years have passed since last update.
const router = new VueRouter({
routes: [...],
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 };
}
})
これでページ遷移時、ページ先頭に来るようになった。
Register as a new user and use Qiita more conveniently