animation opacity 动画会跳过步骤执行
发布于 4 年前 作者 fpeng 5867 次浏览 来自 官方Issues
   let animation = wx.createAnimation();

    animation
      .opacity(.5)
      .step()

      .translateX(100)
      .step()

      .opacity(1)
      .translateX(0)
      .step();

    this.setData({
      animation: animation.export()
    });

除了第一次运行正常,后面的运行结果都是错误的,会跳过移动的动画

1 回复

你好你看看这样得效果对不对,不对自行调整

代码片段:https://developers.weixin.qq.com/s/I3lNYmmh78hE

相关api:https://developers.weixin.qq.com/miniprogram/dev/framework/view/animation.html

你的代码出现在这种问题可能是animation.export()有点bug,没有完全清除掉动画导致不执行。仅为个人观点。
回到顶部