Vue.js 组件使用小记

VeeValidate表单验证组件Ajax成功后消除验证错误

1
2
3
4
5
6
7
8
9
10
11
12
13
14
methods:{
clear(){
let that = this;
new Promise(function (resolve, reject) {
resolve('Reset Form!');
that.clearForm();
}).then(() => {
that.$validator.reset();
});
},
clearForm(){
//do anything...
}
}