例子

wxml:

     <view class="itemmainwhite"  bindtap="onclick" wx:if="{{item.temp==0}}" data-text="{{item.index}}">{{item.index}}
        </view>

  

js:

  onclick: function (e) {
    console.log(e.currentTarget.dataset.text);
}

  

相关文章:

  • 2022-12-23
  • 2022-02-26
  • 2021-06-18
  • 2022-12-23
  • 2022-01-07
  • 2021-11-30
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案