tnblog
首页
视频
资源
登录

uin小程序滚动浮窗案例

3839人阅读 2022/3/9 19:14 总访问:69739 评论:0 收藏:0 手机
分类: uinapp
  1. perfToX(){ // 悬浮按钮向右滑动
  2.     this.animation = uni.createAnimation({duration:300,timingFunction:'ease'})
  3.     this.animation.translateX(50).opacity(0.4).step()
  4.     this.animationTask = this.animation.export()
  5. },
  6. dismissToX(){ // 悬浮按钮向左滑动
  7.     this.animation = uni.createAnimation({duration:800,timingFunction:'ease'})
  8.     this.animation.translateX(0).opacity(1).step()
  9.     this.animationTask=this.animation.export()
  10. },
  11. scroll(res){   //滚动
  12.     let that = this
  13.     clearTimeout(this.timer)
  14.     this.perfToX()
  15.     this.timer = setTimeout(function(){
  16.         that.dismissToX()
  17.      },500)
  18. },


评价
走投无路 才选择了程序员
排名
40
文章
11
粉丝
3
评论
0
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术