Q_

uin小程序滚动浮窗案例

电脑版发表于:2022/3/9 19:14
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)
},


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢