需要更改Error样式,比如只有红框提醒,不加提示文字信息,在span中添加slot='error'即可,然后更改到目标样式
同理也可自定义label,添加slot='label'
<el-form-item label="密码" prop="pass">
<el-input
type="password"
v-model="ruleForm.pass"
autocomplete="off"
></el-input>
<span slot="error" class="errorStyle" style="display: none">{{
111
}}</span>
</el-form-item>
<el-form-item label="确认密码" prop="checkPass">
<el-input
type="password"
v-model="ruleForm.checkPass"
autocomplete="off"
></el-input>
<span slot="label"> password </span>
</el-form-item>