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"