1. 程式人生 > >for循環,綁定點擊事件,二維數組列表渲染

for循環,綁定點擊事件,二維數組列表渲染

ndt 輪播 tap 點擊 lac class else ima 渲染

//數組 <view class="mu_info_photo"> <view wx:for="{{found_info.imageUrls}}" class="mu_info_photo_detail"> <image src="{{item[1]}}" class="mu_info_photo_detail_img" bindtap=‘showBigImg‘ data-select="{{item[0]}}"></image> </view> </view> //輪播圖數組 <view class="wu_info_bigPhoto" bindtap=‘wu_info_remove‘ wx:else> <swiper duration=‘{{duration}}‘ class="wu_info_swiper" current=‘{{current}}‘> <swiper-item wx:for="{{found_info.imageUrls}}" wx:key="data"> <image src="{{item[2]}}" class="wu_info_photo_detail_Bigimg"></image> <view class="wu_info_black_floor"></view> </swiper-item> </swiper> </view> Page({ data: { duration: 500, isBig: true, current: 0, imageUrls: [[0, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img1.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img1.png"], [1, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img2.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img2.png"], [2, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img3.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img3.png"], [3, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img4.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img4.png"], [4, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img5.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img5.png"], [5, "http://owludbr5z.bkt.clouddn.com/foundus/fondus_fondus_img6.png", "http://owludbr5z.bkt.clouddn.com/foundus/fondus_big_foundus_img6.png"]] }, })

for循環,綁定點擊事件,二維數組列表渲染