animation 旋转动画只生效一次吗?
想实现的效果是每次点击都逆时针旋转360°,过程是缩小0.5倍,最后还原成1倍的 <view animation="{{animationData}}" style="background:red;height:100rpx;width:100rpx;margin: 100rpx 0 0 20rpx;">22222</view> <view style="margin-top: 200rpx;" bindtap="click">点击我</view> Page({ data: { animationData: {} }, click(){ var animation = wx.createAnimation({ duration: 1000, timingFunction: 'ease', }) this.animation = animation animation.scale(0.5,0.5).rotate(-360).step() this.setData({ animationData:animation.export() }) setTimeout(function() { animation.scale(1,1).rotate(-360).step() this.setData({ animationData:animation.export() }) }.bind(this), 1000) } })