animation.step高频率触发,是否会中断后续step动画效果?
handleAnimation() {
let animation = wx.createAnimation({
duration: 100,
timingFunction: ‘ease’,
delay: 10
});
let action = wx.createAnimation({
duration: 100,
timingFunction: ‘ease’,
delay: 10
});
action.translate(0, -40).opacity(1).step().translate(0, 0).opacity(1).step();
animation.translate(0, -40).opacity(1).step().translate(0, 0).opacity(1).step();
this.setData({
ani: animation.export(),
act: action.export()
})
}
问题是当点击频率很快时会造成.translate(0, 0).opacity(1).step();不生效,造成样式没有回到原位
1 回复