element ui 手动清除表单效验提示语

<el-form ref="loginForm" :model="user" :rules="loginRules"  size="large"></el-form>
changeType(){
    this.type = this.type == 2?1:2;
    this.clearVail();
    // this.user.name = '';
    // this.user.password = '';
},
//清除验证
clearVail(){
    this.$refs['loginForm'].clearValidate();
},
发布了73 篇原创文章 · 获赞 19 · 访问量 26万+

猜你喜欢

转载自blog.csdn.net/tyjlearning/article/details/105403988