Unlimited_S
Unlimited_S
  • 发布:2019-09-17 09:47
  • 更新:2019-09-19 19:14
  • 阅读:1836

touchmove中加event.preventDefault()不生效

分类:uni-app

<view @touchmove.prevent="dosomethingFunc"></view>这样使用事件修饰符是可以阻止默认滚动事件的,

<template>  
  <view @touchmove="touchmove">  

  </view>  
</template>  

methods: {  
  touchmove(event) {  
    event.preventDefault();  
  }  
}

这样写event.preventDefault()就不生效,这是什么原因啊?

2019-09-17 09:47 负责人:无 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

不支持

  • 2***@qq.com

    那如何在ios下让touch事件生效呢?

    2021-03-18 16:04

该问题目前已经被锁定, 无法添加新回复