Fix issue where "page" does not begin at top when...
changing routes.
This commit is contained in:
parent
ba27aae0f5
commit
3eb7df9f21
1 changed files with 5 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ const routes = [
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory("/fmg/"),
|
history: createWebHistory("/fmg/"),
|
||||||
routes,
|
routes,
|
||||||
|
//Cause "page" to begin at the top when route chanages.
|
||||||
|
scrollBehavior(to, from, savedPosition) {
|
||||||
|
// always scroll to top
|
||||||
|
return { top: 0 }
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
//---------------------------------------------------------- Router Functions ----------------------------------------------------------
|
//---------------------------------------------------------- Router Functions ----------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue