feat: scroll back to top on route change
This commit is contained in:
parent
46a7b2833d
commit
9fe918136c
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,9 @@ import HomeView from "../views/HomeView.vue";
|
|||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
scrollBehavior: () => {
|
||||
return { top: 0 };
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue