报错信息需要先置空,否则只会第一次报错,之后不显示报错信息

 

event.target.value 是实时获取的输入的内容
 
 
<el-form-item label="润滑点部件1层名称" prop="name" :error="errorMsgName">
                        <el-input
                            size="small"
                            v-model="ruleForm.name"
                            @blur="checkRepeat($event,1)"
                            maxlength="50"
                            autocomplete="off"
                            style="width:90%"
                        ></el-input>
                    </el-form-item>