Add animation for router change

This commit is contained in:
Preston 2020-09-20 09:35:53 -04:00
parent b58821908a
commit a3926721cb
2 changed files with 20 additions and 3 deletions

View File

@ -23,9 +23,26 @@ body {
margin-left: 80px;
}
.banner {
margin-top: 70px;
margin-bottom: -65px;
}
.fade-enter-active, .fade-leave-active {
transition: opacity .2s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
@media only screen and (max-width: 680px) {
.expand, .routerView {
margin-left: 0px;
margin-bottom: 80px;
}
.banner {
margin-top: 70px;
margin-bottom: -65px;
}
}

View File

@ -8,9 +8,9 @@
>
<top-nav ref="topNav" />
<side-nav ref="sideNav" />
<Transition
<transition
mode="out-in"
name="slide-up"
name="fade"
>
<!-- <keep-alive> -->
<RouterView
@ -19,7 +19,7 @@
:class="{ expand: !isOpen }"
/>
<!-- </keep-alive> -->
</Transition>
</transition>
<ft-toast />
<ft-progress-bar
v-if="showProgressBar"