Adjusted some transition between routes

This commit is contained in:
Donald Zou
2024-10-04 17:27:25 +08:00
parent 4a2f3e0372
commit 4833a29e57
2 changed files with 14 additions and 3 deletions

View File

@@ -27,6 +27,15 @@ const checkAuth = async () => {
const router = createRouter({
history: createWebHashHistory(),
scrollBehavior(){
if (document.querySelector("main") !== null){
document.querySelector("main").scrollTo({
top: 0
})
}
},
routes: [
{
name: "Index",