多层表单验证

时光怂恿深爱的人放手 提交于 2019-12-02 08:16:15

1.循环校验,每一项加 :prop和:rules

1.  <el-form-item label="scoreType:"
                              :prop="'contentList.'+index+'.scoreType'"
                              :rules="!contentItem.isScoreTag?[]:formRules.isScoreTag">
                  <el-input v-model="contentItem.scoreType"
                            :disabled="!contentItem.isScoreTag"></el-input>
                </el-form-item>

2. 排除置灰项验证    :rules="!contentItem.isScoreTag?[]:formRules.isScoreTag"

  

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!