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();
},
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章