1、通过data-index
2、通过fn(event,index)<view@tap="tonewurl(event,index) <view @tap="tonewurl(event,’…/toWeb/toWeb’)" data-url="…/toWeb/toWeb" class=“banner mt30 mb120” style=“color:#3758ff” >https://weibo.com
tonewurl(e,url) {
console.log(e.currentTarget.dataset.url,‘222222’)
console.log(url,‘33333’)
},
小程序中事件传参方式
所得结果
小程序中事件传参方式

相关文章:

  • 2021-05-30
  • 2022-02-26
  • 2022-12-23
  • 2022-01-07
  • 2021-11-30
  • 2021-10-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案