<view>
<van-tabs bind:click="onClickTab" title-active-color="red">
<van-tab title="燃气表">
<form bindsubmit="submit">
<view class="formBox" wx:for="{{projeactLsit}}">
<van-cell-group style="display: none;">
<van-field label="id" title-width="7em" placeholder="" name="id{{index + 1}}"
model:value="{{item.id}}" required readonly />
</van-cell-group>
<view class="wrap">
<view class="img-wrap">
<view class="txt">上传图片</view>
<view class="imglist">
<view class="item" wx:for="{{fileList}}" wx:for-index="childindex" wx:for-item="items">
<image src="{{items.url}}" bindtap="clickImg" data-index="{{index}}" alt=""></image>
<view class='delete' bindtap='deleteImg' data-item="{{items}}" data-index="{{childindex}}">
<image src="../../../../imgs/del.png"></image>
</view>
</view>
<view class="last-item" wx:if="{{imgs.length >= 1 ? false : true}}" data-index="{{index + 1}}"
bindtap="bindUpload">
<text class="sign">+</text>
</view>
</view>
</view>
</view>
</view>
<view class="formBox" style="background:none">
<van-button type="info" form-type="submit" size="large" round>
提 交</van-button>
</view>
</form>
</van-tab>
<van-tab title="电表">
</van-tab>
</van-tabs>
</view>
小程序好难啊,写到想自杀T-T
你要遍历的数据示例写一个
后面的1,2 是上一层索引,fileList1,fileList2,是被创建出来放到data里的数组
wx:for="{{(fileList+(index+''))}}"