el-form-item rules使用

<el-form-item label="书记姓名" prop="bossName" :rules="[{required: true, message: '书记姓名不能为空', trigger: 'blur'}]" >
	<el-autocomplete style="width:100%" v-model="form.bossName" :fetch-suggestions="querySearch"
	placeholder="请输入名称" @select="handleSelect" :disabled="isViewMode"></el-autocomplete>
</el-form-item>
posted @ 2022-05-16 10:08  寒冷的雨呢  阅读(691)  评论(0编辑  收藏  举报