feat: add fade transition
This commit is contained in:
parent
f1b61b16cb
commit
358fbc7d25
@ -3,13 +3,13 @@
|
||||
<Nav />
|
||||
|
||||
<v-main style="--v-layout-top: 25px;--v-layout-bottom: 70px;">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="fade">
|
||||
<div class="prose max-w-110ch m-auto p-3">
|
||||
<component :is="Component" />
|
||||
</div>
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition name="fade">
|
||||
<component :is="Component" :key="route.path" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</div>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
@ -25,3 +25,13 @@ body,
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user