html52.com
我爱小程序-开发者交流社区

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();不生效,造成样式没有回到原位


网友回复

社区技术&运营专员-白柿子:

麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付