fix: scroll to top on route change
This commit is contained in:
parent
841bfc9879
commit
3175992beb
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ const routes = [
|
|||
const router = createRouter({
|
||||
history: createWebHistory(process.env.BASE_URL),
|
||||
routes,
|
||||
scrollBehavior() {
|
||||
return { top: 0 };
|
||||
},
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue