分类:
uinapp
perfToX(){ // 悬浮按钮向右滑动 this.animation = uni.createAnimation({duration:300,timingFunction:'ease'}) this.animation.translateX(50).opacity(0.4).step() this.animationTask = this.animation.export() }, dismissToX(){ // 悬浮按钮向左滑动 this.animation = uni.createAnimation({duration:800,timingFunction:'ease'}) this.animation.translateX(0).opacity(1).step() this.animationTask=this.animation.export() }, scroll(res){ //滚动 let that = this clearTimeout(this.timer) this.perfToX() this.timer = setTimeout(function(){ that.dismissToX() },500) },
评价