您的位置:首页 > 移动开发 > 微信开发

微信小程序的循环遍历

2018-03-19 17:18 351 查看
imgUrls:[
'../../images/slide/banner1.jpg'
],
contentItems:[
"../../images/index/01.jpg",
"../../images/index/02.jpg"
],
aa:[
{
id: 1,txt: "ss", src : "../../images/index/01.jpg"
},
{
id: 2,txt: "ssxx", src: "../../images/index/02.jpg"
}
]
wxml<view class='content'>
<view class='content-item' wx:for="{{aa}}" id='{{index}}' bindtap=''>
<image src='{{item.src}}'></image>
<view class='content-item-text'>
<text>{{item.txt}}</text>
</view>
</view>

</view>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: