官方解释:
https://github.com/ElemeFE/element/issues/2327
但是真实的情况是:
<template v-for="(person,index) in Form.List">
<el-form-item :prop="'List.'+index + '.code'" :key="person.key" :rules="rules">
<el-input v-model="person.code"></el-input>
</el-form-item>
<el-form-item prop="name">
<el-input v-model="person.name"></el-input>
</el-form-item>
<el-button @click="removeDomain(index)" size="small">-</el-button>
</template>el-form-item 里面的循环prop名字,需要 和form中list的名字一致,这样才能确保组件的统一性。
版权声明:本文为mengyue0828原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。