for循环,绑定点击事件,二维数组列表渲染

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了for循环,绑定点击事件,二维数组列表渲染相关的知识,希望对你有一定的参考价值。

//数组
<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循环,绑定点击事件,二维数组列表渲染的主要内容,如果未能解决你的问题,请参考以下文章

小程序循环二维数组渲染列表

vue for循环的数据 根据条件判断是不是绑定事件

微信小程序二维数组列表渲染

如何循环遍历二维数组以在页面上显示数据?

C语言,怎么利用一个循环遍历一个二维数组呀?急!!!

for循环二维数组的取值方式?