动画在IOS和Android播放速度不一致,并且Android上有bug
请看一下代码:
< view class = "menu" bindtap = "switchPlan" data-type = "1" >menu1</ view > < view class = "menu" bindtap = "switchPlan" data-type = "2" >menu2</ view > < view class = "menu" bindtap = "switchPlan" data-type = "3" >menu3</ view > < view class = "menu" bindtap = "switchPlan" data-type = "4" >menu4</ view > < view class = "plan-list" animation = "{{animationData}}" >hello world</ view > |
var animation = wx.createAnimation({ transformOrigin: "50% 50%" , duration: 700, timingFunction: "ease-out" , delay: 0 }) switchPlan: function (e){ animation.opacity(0).step() animation.opacity(1).step() this .setData({ animationData:animation.export() }) } |
1、在以上的代码中,安卓上动画的播放速度和开发工具一致,但ios明显快很多,感觉是2倍速度,
2、安卓快速切换点击menu1~menu4按钮,即连续播放动画,速度稍快时,动画会停在opacity为0的那一步,并且再点击也不会显示会来,ios无此现象
请问有什么解决方法?