1、设置的验证是为空的时候进行验证,当select选中值还报错;
<el-form label-width="100px" style="margin:20px;" :model="addForm" :rules="rules" ref="addForm" label-position="left">
<el-form-item label="报表" :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'
}],
未选中值时
选中值时
prop="report"
改为prop="reportValue"