下载animate.css并引入项目,
import './css/animate.css'
使用:
<template>
<div class="box">
<transition enter-active-class="animated fadeInLeft" leave-active-class="animated fadeOutRight">
<button @click="decrease" v-show="home.count>0" class="decrease">我是减法</button>
</transition>
<div class="num" > {{home.count}} </div>
<button @click="add" >我是加法</button><br><br>
</div>
</template>