<div id="app">
<button v-on:click="show = !show">
Toggle
</button>
<transition
enter-active-class="magictime foolishIn"
leave-active-class="magictime tinDownOut"
>
<div class="box" v-if="show"></div>
</transition>
</div>
body {
overflow: hidden;
}
button {
margin-bottom: 10px;
}
.box {
width: 100px;
height: 100px;
background-color: #3B838F;
}
const vm = new Vue({
el: '#app',
data: {
show: true,
},
});