<el-form-item
v-for="(item, index) in form.list"
:key="index"
:label="index === 0 ? 'label名称:' : ' '"
:prop="'form.list.' + index + '.name'"
:rules="{ required: true, message: 'required', trigger: 'blur' }"
>
<el-input v-model="item.name" placeholder="请输入name"></el-input>
</el-form-item>
<script>
//data数据结构
form:{
list:[{
name:'',
}]
}
</script>
网友评论