微信小程序for循环遍历

wxml:
          <block wx:for="{{data}}" wx:for-item="data">
            <view>{{data.name}}</view>
          </block>
 
js-data:
data:[
      {
        name:"张三"
      },
      {
        name:"李四"
      },{
        name:"王五"
      }

    ],
posted @ 2020-05-09 16:17  子枫i  阅读(15551)  评论(0编辑  收藏  举报