收藏
回答

bindtouchstart 在子元素上,点击无效,不会触发,请问怎么改?

目的:想用VIEW模拟按钮点击的效果

问题:点击子节点的元素,不触发bindtouchstart、bindtouchend、bindlongtap
 <view class="a" bindtouchstart="bindtouchstart" bindtouchend="bindtouchend" bindlongtap="bindlongtap">
   <view>
    <image class="b" src="/images/icon/icon.png"></image>
    <view class="c">test</view>
   </view>
  </view>


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

2 个回答

  • sine
    sine
    2021-09-07

    算了,我还是改成用button,自定义样式了

    2021-09-07
    有用
    回复
  • 微盟
    微盟
    2021-09-07

    看下你JS代码是怎么写的

    2021-09-07
    有用
    回复 1
    • sine
      sine
      2021-09-07
      js是两个setData,改变同一个参数的值
      2021-09-07
      回复
登录 后发表内容