小程序好难啊,写到想自杀T-T
wx:for 根据一层遍历的index创建的N个数组,如何在二层遍历这N个数组呢?<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>
2023-09-08