let tableDataAdd = [];
this.tableDataAdd.push({
materialName: '',
materialNum: '',
specification: '',
brandName: '',
categoryName: '',
unit: '',
}, {
materialName: '',
materialNum: '',
specification: '',
brandName: '',
categoryName: '',
unit: '',
}, {
materialName: '',
materialNum: '',
specification: '',
brandName: '',
categoryName: '',
unit: '',
}, {
materialName: '',
materialNum: '',
specification: '',
brandName: '',
categoryName: '',
unit: '',
}, {
materialName: '',
materialNum: '',
specification: '',
brandName: '',
categoryName: '',
unit: '',
})
我想在保存列表的接口之前做一个验证,只要tableDataAdd里面的materialNum为0或者''阻断代码继续往下执行,不让调取接口该怎么处理,我用了map,some的 return false和break都不行
如下图,本来打算用async-validator表单验证 但是提示在表格里面太丑了
是这个意思吧