收藏
回答

handletouchmove和click事件冲突的问题

handletouchmove在滑动过程触发的,但是点击屏幕的时候会触发handletouchmove事件。怎么有什么好的方案解决

回答关注问题邀请回答
收藏

1 个回答

  • 2017-11-16

    参考:

    https://mp.weixin.qq.com/debug/wxadoc/dev/framework/view/wxml/event.html


    分层嵌套事件,阻止冒泡或捕获,大概下面这样吧

    <view bindtouchmove='滑动事件'>

        <view catchtap='点击事件'>

        </view>

    </view>

    2017-11-16
    有用
    回复
登录 后发表内容