表单提交组件之间的校验

This commit is contained in:
熊丽君
2022-01-20 09:27:17 +08:00
parent eb90f0c1b6
commit 8be58b403d
7 changed files with 49 additions and 12 deletions

View File

@ -152,7 +152,11 @@ export default {
this.value.industrys.splice(index, 1);
},
submitForm() {
this.$refs["form"].validate((valid) => valid);
let flag = false;
this.$refs["form"].validate((valid) => {
flag = valid;
});
return flag;
},
},
created() {