小程序循环 wx:for ,list ,item

        <view wx:for="{{checkboxItems}}">        
            <view value="{{item.name}}"  style="color:{{item.color}};">
              {{item.value}}
              <image src="{{item.image}}" style="width:50px;height:50px"/>
            </view>
        </view

 

 

   checkboxItems: [
      {name: 'USA', value: '美国'},
      {name: 'CHN', value: '中国',color:'red'},
      {name: 'Z', value: '俄罗斯',image:'../../../../image/location.png'},
    ]
posted on 2022-03-10 14:36  隔壁老王(加速版)  阅读(89)  评论(0)    收藏  举报