做了一个扫码的效果就是一条线在框子里面来回动但是在华为mate30pro手机上面出现会黑影 望答疑?
发布于 7 年前 作者 yan75 1025 次浏览 来自 问答

let animation = wx.createAnimation({});

animation() {

   var that = this;

   // 控制向上还是向下移动

   let m = true

   setInterval(function () {

     if (m) {

       animation.translate(190, 0).step({

         duration: 3000

       })

       m = !m;

     } else {

       animation.translate(-10, 0).step({

         duration: 3000

       })

       m = !m;

     }

     that.setData({

     animation: animation.export()

     })

   }.bind(this), 3000)

 },

以上是代码

1 回复

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

回到顶部