catch:touchstart 表现奇怪,会阻断所有子元素的 tap 事件
<view class="cart-item after-bottom-border" style='{{ txtStyle }}' catch:touchstart="touchStart" catch:touchmove="touchMove" catch:touchend="touchEnd" data-tag='{{ tag }}' data-index='{{ index }}'> <view class="select-box" catch:tap='bindSelectItem'> </view></view> |
想做一个左滑出现删除按钮的效果,但是想要屏蔽小程序默认的右滑 navigate back ,就用了 catch:touchstart。
但是这个表现太奇怪了,父元素的 catch:touchstart 会屏蔽所有子元素的 tap 事件,应该算是 bug 了,虽然最后只catch 了 touchmove 实现了。
