增加rules校验项
- this.$set(this.formRules,'name',[{required:true,message:'请输入名称',trigger:'change'}])
- this.$refs[formName].validate((valid) =>{
-
- if(valid){
- ...
- }else{
- return false;
- }
- })
删除rules校验项
- this.$delete(this.formRules,'name')
-
- this.$refs[formName].clearValidate()