如何设置表单提示以及清除提示

<el-form ref="form" :model="form" :rules="rules" status-icon>
        <el-form-item prop="name">
          <el-input v-model="form.name" placeholder="用户名/邮箱"  auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item prop="pw0">
          <el-input v-model="form.pw0" placeholder="密码"  auto-complete="off"></el-input>
        </el-form-item>
        <el-form-item prop="pw1" v-if="!loginState">
          <el-input v-model="form.pw1" placeholder="重复密码"  auto-complete="off"></el-input>
        </el-form-item>
      </el-form>
data(){
      return {
        form: {
          name: '',
          pw0: '',
          pw1: '',
        },
        rules: {
          name: [{validator: checkUsername, trigger: 'blur'}],
          pw0: [{validator: checkPassword, trigger: 'blur'}],
          pw1: [{validator: checkPassword, trigger: 'blur'}],
          code: [{validator: checkCode, trigger: 'blur'}],
        },
      };
    }

清除提示:

this.$refs.form.resetFields();
© 2021 hanbaoaaa record.浙ICP备20005263号
asdad
联系方式 asdasd
2021-5-8 4:19
sss
回复数 (0) 点击展开
加载更多

新增评论

称呼
联系方式
邮箱(选填)
内容

提交

取消