I'm currently creating app that should contain loginView, homeView and a v-app-bar that is outside router so it can be used on every page except loginView.
I wanted do add some nice transitions to it, but I have problem with app bar. Router view has smooth transition, but v-app-bar seems to have some hardcoded transitions inside itself and no prop to give it custom one. How can I force it to use my custom transition?
<template>
<v-app id="app">
<v-content class="app-main">
<transition name="fade" mode="out-in">
<v-app-bar v-if='this.$router.currentRoute.name != "loginView"' color="indigo darken-2" dark>
</v-app-bar>
</transition>
<transition name="fade" mode="out-in">
<router-view class="view"/>
</transition>
<c-alert-bar class="alert"/>
</v-content>
</v-app>
</template>
OK, I resolved transition problem, without actually resolving the real problem, but making a workaround:
From user point of view literally nothing changed because I move from "/" to "/home" just like before. Only difference is that all the new pages that fit under v-app-bar will have to be added as children of this intermediate-ghost-page because without it v-app-bar won't be dragged from there. But actually to be honest it's not even a bad thing, because it will force me to group pages under certain parent, so code won't be as messed up later on.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.