微信小程序点击当前元素阻止父元素触发事件
<view class="section" bindtap=“click1”> <view class="section__title">flex-direction: column</view> <view class="flex-wrp" style="height: 300px;flex-direction:column;" > <view class="flex-item bc_green" hover-stop-propagation catchtap="click2>1</view> <view class="flex-item bc_red">2</view> <view class="flex-item bc_blue">3</view> </view></view>
点击click2时组织触发其父元素;点击使用catchtap
给当前元素加上hover-stop-propagation,
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

