This commit is contained in:
2025-12-20 18:46:45 +08:00
parent 5163e756f0
commit 547fd99c23
73 changed files with 15635 additions and 1924 deletions

View File

@@ -1,4 +1,4 @@
import type { RouterConfig } from '@nuxt/schema'
import type { RouterConfig } from "@nuxt/schema";
// https://router.vuejs.org/api/#routeroptions
export default <RouterConfig>{
@@ -10,8 +10,8 @@ export default <RouterConfig>{
return {
el: to.hash,
top: 100,
behavior: 'smooth',
}
behavior: "smooth",
};
}
// The remainder is optional but maybe useful as well
@@ -21,8 +21,8 @@ export default <RouterConfig>{
return {
left: 0,
top: 0,
behavior: 'smooth',
}
behavior: "smooth",
};
}
// this will use saved scroll position on browser forward/back navigation
@@ -31,8 +31,8 @@ export default <RouterConfig>{
resolve({
left: savedPosition?.left || 0,
top: savedPosition?.top || 0,
})
}, 500)
})
});
}, 500);
});
},
}
};