微信小程序 catchtap 阻止事件冒泡 - 多层嵌套点击事件问题解决

微信小程序 

bindtap 普通点击属性

catchtap 执行事件冒泡 event.stopPropagation();

<view bindtap="outerBind">
    <view  catchtap="outerBind">
        点赞
        <!-- 内层嵌套点击事件, 可使用catchtap 事件冒泡 -->
    </view>
</view>

发布了19 篇原创文章 · 获赞 19 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/an_xinyu/article/details/80389845