This is my code: I want to create a transition on the HelloWorld Component, everytime the data gets updated. The transition itself works fine
<transition name="fade">
<p v-if="awesome">Vue is awesome</p>
</transition>
Here are my "cards" which are created dynamically.
<v-row no-gutters>
<v-col cols="12" sm="4" md="4" v-for="(todo, index) in todos" v-bind:key="index">
<v-card class="pa-2" outlined tile>
<transition name="fade">
<HelloWorld
v-bind:todos="todos"
v-bind:index="index"
v-bind:class="(todos[index].done)?'green':'red'"
/>
</transition>
</v-card>
</v-col>
</v-row>
Here the transition does not work.
CSS is here:
<style scoped>
.top {
background: blue;
color: white;
display: flex;
justify-content: space-around;
border-bottom: 2.5px solid black;
}
.fade-enter {
opacity: 0;
}
.fade-enter-active {
transition: opacity 1s;
}
.fade-leave {
}
.fade-leave-active {
transition: 1s;
opacity: 0;
}
</style>
Why and how do it get it done to work?