/// import type { DrawerProps, FormProps } from 'antd'; import type { CommonFormProps } from '../../BaseForm'; export declare type DrawerFormProps = Record> = Omit, 'onFinish' | 'title'> & CommonFormProps & { /** * 接受返回一个boolean,返回 true 会关掉这个抽屉 * * @name 表单结束后调用 */ onFinish?: (formData: T) => Promise; /** @name 用于触发抽屉打开的 dom */ trigger?: JSX.Element; /** @name 受控的打开关闭 */ visible?: DrawerProps['open']; /** @name 打开关闭的事件 */ onVisibleChange?: (visible: boolean) => void; /** * 不支持 'visible',请使用全局的 visible * * @name 抽屉的属性 */ drawerProps?: Omit; /** @name 抽屉的标题 */ title?: DrawerProps['title']; /** @name 抽屉的宽度 */ width?: DrawerProps['width']; formItemProps?: any; fieldProps?: any; }; declare function DrawerForm = Record>({ children, trigger, onVisibleChange, drawerProps, onFinish, title, width, ...rest }: DrawerFormProps): JSX.Element; export default DrawerForm;