收藏
回答

页面2个循环的animation无法在一个页面实现吗


<cover-view class='leida' animation="{{animationData01}}">

<cover-view class='leida01' animation="{{animationData}}">cover-view>


var animation = wx.createAnimation({

duration: 4000,

timingFunction: 'linear',

})

var animation01 = wx.createAnimation({

duration: 4000,

timingFunction: 'linear',

})

this.animation = animation;

this.animation01 = animation01



this.setData({

animationData: animation.export(),

animationData01: animation01.export()

})

var n = 0;

setInterval(function () {

n = n + 1;

this.animation.rotate(180 * (n)).step();

this.animation01.rotate(-180 * (n)).step()

this.setData({

animationData: this.animation.export(),

animationData01: this.animation01.export()

})

}.bind(this), 1000)



然后就只有animationData01这个动画在转动,animationData没有转动






回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容