Animation真机无过渡效果
发布于 5 年前 作者 guiying46 18057 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

在iphonex下测试,动画无过渡效果,直接显示结束状态. 在iphone6S ,iphone7真机测试有动画效果

  • 预期表现

能实现像在开发工具一样,动画有过渡效果

  • 提供一个最简复现 Demo
//index.js
//获取应用实例
const app = getApp()
 
Page({
  
  onReady: function () {
    this.animation = wx.createAnimation()
  },
  
  handleClick(){
    this.animation.translate(Math.random() * 100 - 50, Math.random() * 100 - 50).step()
    this.setData({ animation: this.animation.export() })
  },
  
})
<!--index.wxml-->
<view class="container">
  <view>
    <view class='test' animation="{{animation}}"></view>
    <view style='height:300px;'></view>
    <text bindtap="handleClick">点击测试</text>
  </view>
</view>
2 回复

问题已修复,待客户端版本更新,后续可通过搜索找到答案

我加了个setTimeout就好了…

回到顶部