代码入下:
<el-row :gutter="20" v-for="(receiverItem,receiverIndex) in form.receiverInfList" :key="receiverIndex"> <el-col :span="8"> <el-form-item label="收货人" :prop="'receiverInfList.' + receiverIndex + '.receiverName'" :rules="[{required:true,message:'收货人不能为空',trigger:'blur'}]" > <el-input v-model="receiverItem.receiverName" placeholder="请输入收货人" /> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="收货人联系方式" :prop="'receiverInfList.' + receiverIndex + '.receiverMblno'" :rules="[{required:true,message:'收货人联系方式不能为空',trigger:'blur'}]" > <el-input v-model="receiverItem.receiverMblno" placeholder="请输入收货人联系方式" /> </el-form-item> </el-col> <el-col :span="1" v-if="isType !== 1"> <i class="el-icon-delete deleteIcon" @click="onDeleteReceiver(receiverIndex)"></i> </el-col> </el-row>
图片展示: