• Element中动态rules验证输入框的值 可以写很多条件的 rules数组


    代码入下:

           <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>

    图片展示:

    未来的我会感谢现在努力的自己。
  • 相关阅读:
    2017年6月笔记
    2017年5月笔记
    2017年4月笔记
    转发:i p _ f o r w a r d函数
    IP分组
    IP协议首部结构介绍
    IP:网际协议
    sed工具使用
    正则表达式匹配
    TCP的半连接
  • 原文地址:https://www.cnblogs.com/cat-eol/p/15395147.html
Copyright © 2020-2023  润新知