console
var app = new Vue({
el: '#app',
data() {
return {
myArray: [{id:1, name: 'aa'}],
myArray2: [],
show: true
}
},
methods: {
}
});
<div id="app">
<button @click="show = !show">
Toggle render
</button>
<transition name="bounce" :appear = 'true'>
<p v-if="show">hello</p>
</transition>
</div>
.bounce-enter-active {
animation: bounce-in .5s;
}
.bounce-leave-active {
animation: bounce-in .5s reverse;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.5);
}
100% {
transform: scale(1);
}
}