github: github.com/qgh810/anim…vue
import AnimateText from 'animate-text'
// 最简单的使用方法
new AnimateText('.text')
// 若是须要定义动画时间能够这样初始化
new AnimateText('.text', 1000)
// 若是还有其它设置 请这样写
new AnimateText('.text', {
time: 1000, // 动画时长
isNumber: true, // 是否渲染为数字动画
startNumber: 0, // 渲染为数字动画时 动画的开始数字
changeCount: 32, // 数字动画数字变化次数
onAnimated: function () {console.log('动画结束')} // 动画结束事件回调
})
复制代码