diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index e90ab9e90edf338902c0d442a43da14cfd09d44d..be263364b6a7e2db444c90df7733f05e2e531db2 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -92,22 +92,8 @@ class FormWrap extends Component { }; validateRequired = (item, rule, value, callback) => { - if (!item.requiredFlag) { - return callback(); - } - if (!value) { - return callback('必填项不能为空'); - } - if (Array.isArray(value)) { - if (value.length === 0) { - return callback('必填项不能为空'); - } - const [first] = value; - if (!first.text && first.text !== 0 && !first.value && first.value !== 0) { - return callback('必填项不能为空'); - } - } - if (typeof value === 'object') { + // 可输可选组件清空时数据格式有问题,单独处理一下 + if (item.requiredFlag && Number(item.columnType) === 15 && typeof value === 'object') { if ( !value.label && value.label !== 0