javascript - Validation issues with select and time plug-ins in elementui? Kneel down and beg God for guidance! ! ! ! !
淡淡烟草味
淡淡烟草味 2017-05-18 10:52:25
0
1
681

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

淡淡烟草味
淡淡烟草味

reply all(1)
我想大声告诉你

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!