please transfer a valid prop path to form item!(v-for遍历出的表单进行验证)

prop这样引用 :prop="'financialDataItemInfoArr.'+index+'.intFinancialYear.year'"
<el-form
            ref="financialDataItemInfoForm"
            :model="financialDataItemInfoForm"
            :label-position="labelPosition"
            label-width="200px"
          >
            <el-collapse-item
              v-for="(item,index) in financialDataItemInfoForm.financialDataItemInfoArr"
              :key="index"
              :name="index"
            >
              <template slot="title">
                <div class="clearfix Secondary">
                  <div class="fl">financial Information {{index+1}}</div>
                  <div class="fr iconDelete" @click="delFinancials(index)">
                    <i class="el-icon-delete"></i>delete
                  </div>
                </div>
              </template>
               <el-col :span="24" :sm="24" :md="24" :lg="24">
                        <el-form-item
                          label="year:"
                          :prop="'financialDataItemInfoArr.'+index+'.intFinancialYear.year'"
                          :rules="[{ required: true, message: 'Please select a year', trigger: 'blur' }]"
                        >
                          <el-select
                            v-model="item.intFinancialYear.year"
                            placeholder="Please select a year"
                            filterable
                          >
                            <el-option
                              v-for="item in yearOptions"
                              :key="item.value"
                              :label="item.label"
                              :value="item.value"
                            ></el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
                      </el-collapse-item>
                      </el-form>

你可能感兴趣的:(please transfer a valid prop path to form item!(v-for遍历出的表单进行验证))