import React, { useRef } from 'react'; import { Modal, ConfigProvider } from 'antd'; import { FormProps } from 'antd/es/form'; import { ModalProps } from 'antd/es/modal'; import { SaveOutlined } from '@ant-design/icons'; import { FormMobile } from '../layout'; export type TFormLayoutProps = FormProps & { maxWidth?: number; cols: [number, number]; // 宽度比 }; /** * 表单布局 */ export const FormLayout: React.FC = ({ maxWidth, cols, title, ...props }) => { return ( ); }; export type TFormModal = Pick & Partial> & { modalProps?: ModalProps; }; /** * 表单弹窗 */ export const FormModal: React.FC = ({ title, visible, onOk, onCancel, width, confirmLoading, modalProps, cols = [5, 16], ...props }) => { const box = useRef(null); return ( }} {...{ title, visible, onOk, onCancel, width, confirmLoading }} {...modalProps} > box.current || document.body}>
); };