Vue components to wrap Velocity animations
npm install velocity-vue> Vue components to wrap Velocity animations 使用vue组件对velocity.js动画进行了封装
bash
$ git clone https://github.com/zhangguanpeng/vue-animation-velocity.js.git
$ cd vue-animation-velocity
$ npm install
$ npm run dev
`
Installation 安装
` bash
npm install --save velocity-vue
`Usage 使用
`bash
#main.js
import velocityPlugin from 'velocity-vue'
Vue.use(velocityPlugin)#template
{{ msg }}
#data
data() {
return {
msg: 'hello vue animation!',
titleShow: false,
titleAnimType: '',
titleAnimation: {
delay: 0,
duration: 1000
}
}
}
#mounted
mounted() {
this.titleAnimType = 'transition.slideUpIn'
}
#methods
titleComplete() {
console.log('动画1已经执行完成后回调');
this.xxx = '';
}
``VelocityComponent events
属性|说明|返回值
---|---|---
complete|动画执行完成时回调函数|无