diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index 0b78bdc68a8285b4464f056d7159ab6881fd4d5e..e90ab9e90edf338902c0d442a43da14cfd09d44d 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -32,7 +32,9 @@ class FormWrap extends Component { handleSubmit = (e) => { e.preventDefault(); e.stopPropagation(); - const { rowId, form, handleSubmit, data, rowData, detailType } = this.props; + const { + rowId, form, handleSubmit, data, rowData, detailType, + } = this.props; form.validateFieldsAndScroll((err, values) => { if (!err) { const newValues: any[] = []; @@ -106,7 +108,14 @@ class FormWrap extends Component { } } if (typeof value === 'object') { - if (!value.text && value.text !== 0 && !value.value && value.value !== 0) { + if ( + !value.label + && value.label !== 0 + && !value.text + && value.text !== 0 + && !value.value + && value.value !== 0 + ) { return callback('必填项不能为空'); } } @@ -209,7 +218,9 @@ class FormWrap extends Component { }; render() { - const { loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn } = this.props; + const { + loading, isShowDelBtn, data, btnWrapStyle, name, colsNum, delLabel, hideOperateBtn, + } = this.props; return (