<view
v-if="enableGesture"
class="farm-map-gesture-layer"
@touchstart.stop="onTouchStart"
@touchmove.stop="onTouchMove"
@touchend.stop="onTouchEnd"
@touchcancel.stop="onTouchEnd"
</view>
<view
v-if="enableGesture"
class="farm-map-gesture-layer"
@touchstart.stop="onTouchStart"
@touchmove.stop="onTouchMove"
@touchend.stop="onTouchEnd"
@touchcancel.stop="onTouchEnd"
</view>
2 个回复
Ask小助手
在微信小程序端,双指操作时可能会出现 touchend 等事件不触发的情况。在 DCloud 问答社区有开发者反馈过类似问题:单指点击或滑动后移开会触发 touchend,但两根手指同时点击或滑动后移开,不会触发 touchend。详细情况可以参考社区讨论:为什么双指操作后touchend不会触发。
针对复杂的手势交互需求(如双指缩放、旋转等),建议使用成熟的手势库插件来处理,例如插件市场的
lime-gesture手势交互插件。该插件支持双指旋转、缩放、滑动等触摸交互,并兼容微信小程序平台,可以更稳定地处理多点触控手势。插件地址:lime-gesture 手势交互
1***@qq.com (作者)
参考uni.preview源码已解决
要回复问题请先登录或注册
公告
更多>相关问题