1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

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({ const router = createRouter({
history: createWebHashHistory(), history: createWebHashHistory(),
scrollBehavior(){
if (document.querySelector("main") !== null){
document.querySelector("main").scrollTo({
top: 0
})
}
},
routes: [ routes: [
{ {
name: "Index", name: "Index",

View File

@ -1051,16 +1051,18 @@ pre.index-alert {
.fade2-enter-active, .fade2-enter-active,
.fade2-leave-active { .fade2-leave-active {
transition: all 0.15s ease-in-out; transition: all 0.2s cubic-bezier(0.82, 0.58, 0.17, 0.9);
} }
.fade2-enter-from{ .fade2-enter-from{
transform: translateX(20px); transform: translateY(30px);
filter: blur(3px);
opacity: 0; opacity: 0;
} }
.fade2-leave-to { .fade2-leave-to {
transform: translateX(-20px); transform: translateY(-30px);
filter: blur(3px);
opacity: 0; opacity: 0;
} }