关于view标签添加bindtap事件未起作用
发布于 6 年前 作者 chengping 12071 次浏览 来自 问答

大家好,以下是我的大致代码

<view class=“box”>

  <!–此處的z-index=1  -->

  <view class=“item-box” catchtouchstart=“touchS” catchtouchmove=“touchM” catchtouchend=“touchE”></view>

  <!–此處的z-index=-1  -->

  <view class=“item-box2” bindtap=“onTap”></view>

</view>

发现当item-box 样式设置为1而 item-box2样式设置为 z-index =-1时,事件onTap未能触发,有知道原因的么?

回到顶部