触摸滑动处理的同一个方法中, 其他的代码均已执行. 动画平移没有效果. wx.createAnimation 在 iPhone12 pro max 上 会偶尔失效. 其他机型暂时未发现.
var animation = wx.createAnimation({
duration: 200,
timingFunction: ‘linear’,
transformOrigin: ‘50% 50% 0’,
})
animation.translateX(-1000).step({ duration: 300, timingFunction: ‘linear’ , transformOrigin: ‘50% 50% 0’,});
animation.translateX(1000).step({ duration: 10, timingFunction: ‘linear’, transformOrigin: ‘50% 50% 0’, });
animation.translateX(0).step({ duration: 300, timingFunction: ‘linear’ , transformOrigin: ‘50% 50% 0’,});
this.setData({
animation: animation.export()
})
animation = null;