/// import type { ModalProps, FormProps } from 'antd'; import type { CommonFormProps } from '../../BaseForm'; export declare type ModalFormProps = Record> = Omit, 'onFinish' | 'title'> & CommonFormProps & { /** * 接受返回一个boolean,返回 true 会关掉这个弹窗 * * @name 表单结束后调用 */ onFinish?: (formData: T) => Promise; /** @name 用于触发抽屉打开的 dom */ trigger?: JSX.Element; /** @name 受控的打开关闭 */ visible?: ModalProps['open']; /** @name 打开关闭的事件 */ onVisibleChange?: (visible: boolean) => void; /** * 不支持 'visible',请使用全局的 visible * * @name 弹框的属性 */ modalProps?: Omit; /** @name 弹框的标题 */ title?: ModalProps['title']; /** @name 弹框的宽度 */ width?: ModalProps['width']; /** @name 编辑框主键字段,默认为id,设置为false即非编辑框 */ keyField?: string | boolean; /** @name 是否显示保存继续 */ showKeepAdd?: boolean; /** @name 保存不关闭时,是否重置表单 */ keepReset?: boolean; /** @name 连续录入文本 */ keepAddText?: string; /** @name 是否可以拖拽 */ canDrag?: boolean; }; declare function ModalForm = Record>({ children, trigger, onVisibleChange, modalProps, onFinish, title, width, labelWidth, keyField, showKeepAdd, keepReset, keepAddText, canDrag, ...rest }: ModalFormProps): JSX.Element; export default ModalForm;