data: { animationData: {} }, created() { let animation = wx.createAnimation({ duration: 500, // delay: 1000, timingFunction: 'ease' }); this.animation = animation; let next = true; timer = setInterval(function () { if (next) { this.animation.opacity(0.2).step(); next = !next; } else { this.animation.opacity(1).step() next = !next; } this.setData({ animationData: animation.export() }) }.bind(this), 500) }
<view animation="{{animationData}}"> <view class="rec_radius"></view> <text class="small">REC</text> </view>
标签:opacity,微信,程序,next,animation,REC,闪烁 From: https://www.cnblogs.com/shuihanxiao/p/18080002