32 字
1 分钟
微信小程序 wxml中用data-id向js传值
微信小程序 wxml中用data-id向js传值
<view class='lists' data-id='{{index}}' bindtap='busStationsClick'></view><!-- index 是模板中提供的数据 --> busStationsClick:function(e){ console.log("busStationsClick",e.currentTarget.dataset.id )}微信小程序 wxml中用data-id向js传值
https://www.klzy.me/posts/微信小程序-wxml中用data-id向js传值/分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
换条路线
从其他文章中稳定抽取
最后更新于 ,距今已过 2713 天
部分内容可能已过时