• element-ui 表单复杂数据类型校验


                  <div>
                                <div class="subTitle">添加场景标准</div>
                                <div class="flexBox">
                                    <el-form-item label="选择区域" prop="hotel_area" style="flex:1;margin-right:20px;">
                                        <el-select v-model="ruleForm.hotel_area" value-key="id" multiple filterable 
                                        allow-create placeholder="选择区域" @change="addArea" @remove-tag="removeArea">
                                            <el-option
                                            v-for="item in areaList"
                                            :key="item.id"
                                            :label="item.title"
                                            :value="item">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-button type="primary" size="small" @click="addArea">添加</el-button>
                                </div>
                                <div>
                                    <div class=" areaBox" v-for="(item,index) in ruleForm.hotel_area_con" :key="index">
                                        <div class="del" @click="removeArea(item)">删除</div>
                                        <el-form-item :label="item.title" :prop="`hotel_area_con[${index}].hardware`"  :rules="{ required: true, message: '添加硬件设施标准', trigger: 'blur' }">
                                            <el-input v-model="item.hardware" placeholder="添加硬件设施标准"></el-input>
                                        </el-form-item>
                                        <el-form-item :prop="`hotel_area_con[${index}].clean`" :rules="{ required: true, message: '添加清洁卫生标准', trigger: 'blur' }">
                                            <el-input v-model="item.clean" placeholder="添加清洁卫生标准"></el-input>
                                        </el-form-item>
                                        <el-form-item :prop="`hotel_area_con[${index}].service`" :rules="{ required: true, message: '添加服务水平标准', trigger: 'blur' }">
                                            <el-input v-model="item.service" placeholder="添加服务水平标准"></el-input>
                                        </el-form-item>
                                    </div>
                                </div>
                            </div>
  • 相关阅读:
    尘误解
    了解了解你自己的话zookeeper(从那时起,纠正了一些说法在线)
    HDU 5055 Bob and math problem(结构体)
    Linux通过编辑器vi使用介绍
    OCP-1Z0-051-名称解析-文章32称号
    刘强东:解密京东10甘蔗理论
    Android结构分析Android智能指针(两)
    hbase ganglia监控配置
    第一个位和一个真正的项目件
    Html5 の 微信飞机大战
  • 原文地址:https://www.cnblogs.com/xhrr/p/15347969.html
Copyright © 2020-2023  润新知