添加 .native 修饰符绑定原生事件
<van-button
   round
   @touchstart.native="onTouchStart"
   @touchmove.native="onTouchMove"
   @touchend.native="onTouchEnd"
 >
 Hold to Talk
 </van-button>
添加 .prevent 修饰符禁止浏览器默认行为(如长按弹出右键菜单等)
<van-button
   round
   @touchstart.native.prevent="onTouchStart"
   @touchmove.native.prevent="onTouchMove"
   @touchend.native.prevent="onTouchEnd"
 >
 Hold to Talk
 </van-button>
Logo

前往低代码交流专区

更多推荐