看官网
uni.createAnimation(OBJECT)
创建一个动画实例 animation。调用实例的方法来描述动画。最后通过动画实例的export方法导出动画数据传递给组件的animation属性。
<view class="batch-container" :animation="animationData"> animationData: {},
cloneBatch() {
var animation = uni.createAnimation({
duration: 800,
timingFunction: 'ease',
})
// 这里就完成第一组动画
this.animation = animation
animation.translateY(10).step()
this.animationData = animation.export()
// 这里是接在第一组动画后面的
setTimeout(function() {
// animation.translateY(0).step()
//this.animationData = animation.export()
this.isShowBatch = !this.isShowBatch;
}.bind(this), 800)
},