search

Home  >  Q&A  >  body text

javascript - Validation issues with select and time plug-ins in elementui? Kneel down and beg God for guidance! ! ! ! !

1. Verification is performed when the set verification is empty, and an error is reported when the selected value is selected;

<el-form label-width="100px" style="margin:20px;" :model="addForm" :rules="rules" ref="addForm" label-position="left">

<el-form-item label="report" :label-width="formLabelWidth" prop="report">

<el-select v-model="addForm.reportValue" placeholder="请选择报表" style="width:275px">
    <el-option v-for="item in addForm.reportOptions" :label="item.name" :value="(item.id)*1">
    </el-option>
</el-select>

</el-form-item>

report: [{

required: true, 
message: '请选择报表', 
trigger: 'change' 

}],

When no value is selected

When a value is selected

淡淡烟草味淡淡烟草味2815 days ago738

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-18 10:54:25

    prop="report"改为prop="reportValue"

    reply
    0
  • Cancelreply