赞
踩
眼泪都要留下来,在成功的边缘疯狂踩坑……
eg:检验form里面的元素 groupList:[{man:''},{man:''}]
- data(){
- return{
- form:{
- groupList: [{ man: '' }, { man: '' }]
- }
- }
- }
设置:生效重点 :prop="`groupList[${index}].man`"
- <el-form :model="form">
- <div v-for="(item,index) in form.groupList" :key="index">
- <el-form-item :label="item.label" :prop="`groupList[${index}].man`" :rules="{required:true,message:`请输入男性占比`,trigger:'blur'}">
- <el-input v-model="item.man" placeholder="请输入数值" clearable> </el-input>
- </el-form-item>
- </div>
- </el-form>
终于成了!!!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。