tnblog
首页
视频
资源
登录

uin小程序滚动浮窗案例

2623人阅读 2022/3/9 19:14 总访问:53759 评论:0 收藏:0 手机
分类: 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)
},


评价
走投无路 才选择了程序员
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术