<el-form-item v-for="(domain, index) in form.domains" :label="'URL示例'" :key="domain.key" :prop="'domains.' + index + '.value'"
:rules="index < 3?[{ required: true, message: '请至少填写三个事例', trigger: 'blur' }]:[{ required: false, message: '请至少填写三个事例', trigger: 'blur' }]">
<el-input v-model="domain.value"></el-input>
</el-form-item>
<el-form-item label="">
请确保示例已涵盖所有URL类型
</el-form-item>
<el-form-item>
<el-button @click="addDomain">+请至少填写三个事例</el-button>
</el-form-item>
参考:https://blog.youkuaiyun.com/qq_26522773/article/details/79277234