diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index b0f3ad7ed87bbfb9c2931ad00e0baebe4c5cd363..c99657afc7f952dcaf79ecd44f73438e8690b78d 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -353,7 +353,7 @@ const Cell = (props: CellProps) => { rowData={record} onEmitChange={(changedValue: any, optionValue: any, reset?: boolean) => { // 校验必填项 - if (requiredFlag&&!changedValue) { + if (requiredFlag && (!changedValue || changedValue.length === 0)) { message.error('该字段为必填项'); resetEditStatus(); return; diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index 44fe0f3692d1ff1cde8445aa5e42b24c909fe836..f00a3aa9981a50e493d4d2c595c56bee1f7b29c6 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -192,7 +192,7 @@ class FormWrap extends Component { rowId={rowId} onEmitChange={(changedValue: any, optionValue: any) => { // 校验必填项 - if (requiredFlag && !changedValue) { + if (requiredFlag && (!changedValue || changedValue.length === 0)) { // message.error('必填项不能为空'); return; }