uni-app過渡動畫


看官網

 

uni.createAnimation(OBJECT)

 

創建一個動畫實例 animation。調用實例的方法來描述動畫。最后通過動畫實例的export方法導出動畫數據傳遞給組件的animation屬性。

 

 <view class="batch-container" :animation="animationData">

animationData: {},
cloneBatch() {
  var animation = uni.createAnimation({
    duration: 800,
    timingFunction: 'ease',
  })

  // 這里就完成第一組動畫
  this.animation = animation
  animation.translateY(10).step()
  this.animationData = animation.export()

  // 這里是接在第一組動畫后面的
  setTimeout(function() {
    // animation.translateY(0).step()
    //this.animationData = animation.export()
    this.isShowBatch = !this.isShowBatch;
  }.bind(this), 800)
},

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM