页面2个循环的animation无法在一个页面实现吗
发布于 7 年前 作者 jielei 6573 次浏览 来自 官方Issues

<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 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部