diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index 1855df4c0a20bde2d71b487fa2244981e1a023bf..c8bf83027968a1f29e6632bab18ab243dd868bef 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -28,6 +28,7 @@ const FormItem = Form.Item; class FormWrap extends Component { wrapDom: any; + handleSubmit = (e) => { e.preventDefault(); e.stopPropagation(); @@ -120,27 +121,27 @@ class FormWrap extends Component { const transferColumn = transferAttr(columnType, newProps); const disabled = readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag); const onBlurFn1 = (changedValue: any, newVal: any) => { - validateFieldsAndScroll((err:any) => { - // 即时编辑时需要对表单必填等规则校验 - if (!err) { - let temp: any[] = []; - value.map((item: any) => { - temp.push({ text: item.text, value: item.value }); - }); - if (temp.length === 0) { - temp = emptyModel; - } - if (!!item.requiredFlag && Array.isArray(newVal) && !newVal[0].value) { - return; - } - if (_.isEqual(temp, newVal)) { - return; - } - if (typeof onBlurFn === 'function') { + if (typeof onBlurFn === 'function') { + let temp: any[] = []; + value.map((item: any) => { + temp.push({ text: item.text, value: item.value }); + }); + if (temp.length === 0) { + temp = emptyModel; + } + if (!!item.requiredFlag && Array.isArray(newVal) && !newVal[0].value) { + return; + } + if (_.isEqual(temp, newVal)) { + return; + } + validateFieldsAndScroll((err:any) => { + // 即时编辑时需要对表单必填等规则校验 + if (!err) { onBlurFn(changedValue); } - } - }); + }); + } }; return (