- form.validateFields().then((res) => {
- lazyService(formatSubmitValue ? formatSubmitValue(res) : res);
- })
- }
+ onOk={submitFormValue}
confirmLoading={loading}
{...restModalProps}
+ footer={
+ isFunction(footerRender) ? (
+
+ {footerRender?.(
+ { ...props, lazyService, submitFormValue, loading },
+ defaultFooterTuple,
+ )}
+
+ ) : (
+ restModalProps.footer
+ )
+ }
>
{children}
diff --git a/src/hooks/useFormModal/index.tsx b/src/hooks/useFormModal/index.tsx
index 361e9b7d69da682aa8d174571f707fb17e3e008e..5db6d55760b7a3a413b17369eadd9e5ffb67bb54 100644
--- a/src/hooks/useFormModal/index.tsx
+++ b/src/hooks/useFormModal/index.tsx
@@ -1,16 +1,9 @@
-import {
- ColProps,
- Form,
- FormInstance,
- message,
- Modal,
- ModalProps,
- RowProps,
-} from 'antd';
+import { ColProps, Form, FormInstance, ModalProps, RowProps } from 'antd';
+import { FormModal } from 'art-antd-react/FormModal';
import React, { useMemo } from 'react';
import { FormGenerator } from '../../FormGenerator';
import { FormItemConfig } from '../../FormItemsBuilder';
-import { RequestService, useRequest } from '../useRequest';
+import { RequestService } from '../useRequest';
export interface FormModalConfig