wx:for 循环嵌套中怎样获取内层循环的wx:key?
代码:
<view class="bg-img" wx:for="{{picArray[index]}}" wx:for-item="pic" wx:key="id" >
<image data-current="{{images_path + pic}}" data-item="{{images_path + pic}}" data-index="{{index}}" data-id="{{id}}" bindtap="zoomImage" src='{{images_path + pic}}' mode='aspectFill'></image>
</view>
其中,内层循环的wx:key='id' ,在image里面用 data-id="{{id}}传值时js接不到数据,请问是哪里问题?
谢谢!
wx:key="id" => wx:for-index="id"