rockyjs

判断和滑动是两种触发方式

滑动分为四种,上下左右(swipeup,swipedown,swipeleft,swiperight)

点击分为两种,点击和双击,一般用单机(tap)

根据自己不同的需求进行相应的使用函数

 



 

在此我需要的是判断上下滑动和点击

触发事件的对象.addEventListener("tap",function(){
     需要编辑的代码;
})

触发事件的对象.addEventListener("swipeup",function(e){

e.stopImmediatePropagation();//阻止冒泡事件

})

触发事件的对象.addEventListener("swipedown",function(e){

e.stopImmediatePropagation();//阻止冒泡事件
})

分类:

技术点:

相关文章:

  • 2021-09-06
  • 2021-10-05
  • 2021-11-26
  • 2021-12-12
  • 2021-11-27
  • 2021-05-18
  • 2021-09-06
  • 2021-11-26
猜你喜欢
  • 2021-11-26
  • 2021-08-28
  • 2021-11-26
  • 2021-11-13
  • 2021-04-29
  • 2021-11-19
  • 2021-11-26
相关资源
相似解决方案