let animation= wx.createAnimation({
timingFunction: ‘ease’,
})
animation.left(0).translateY(0).step({ duration: 3000 });
animation.opacity(0.2).step({ duration: 3000 });
animation.left(-80).scale(3).step({ duration: 3000 });
this.setData({
animationData: animation.export(),
})
js里这种写法,三个动效都会执行,但是第二个step总是和第三个step一起执行,是为什么
我也遇到这个问题了。https://developers.weixin.qq.com/community/develop/doc/0002cc82010028852959b21cc5b000找到原因 可是不知道怎么解决
animation.left(0).translateY(0).step({ duration: 3000 }).opacity(0.2).step({ duration: 3000 }).left(-80).scale(3).step({ duration: 3000 });
或
animation = animation.left(0).translateY(0).step({ duration: 3000 });
animation = animation.opacity(0.2).step({ duration: 3000 });
animation = animation.left(-80).scale(3).step({ duration: 3000 });
试试?!