import { Form } from 'antd'; import { useEffect } from 'react'; import BindDataItem from './BindDataItem'; interface BindDataFromProps { value?: any; onChange?: (value: any) => void; flagList?: any; isHaveDate?: boolean; isHaveDay?: boolean; isHaveCheckBox?: boolean; activeKey?: any; disabledIds?: string[]; isAllowApply?: boolean; setActiveKey?: (val: string[]) => void; selectMap?: any; getSelectOptions?: (id: number) => void; appId?: number; customRender?: (name: React.ReactNode, item: any) => React.ReactNode; checkInterceptor?: (checked: any, info: any) => Promise; isOtherUser?: boolean; fixedIds?: string[]; } const BindDataFrom = ({ value, onChange, flagList, disabledIds, isAllowApply = false, isHaveDate, isHaveDay, activeKey, isHaveCheckBox = false, setActiveKey, selectMap, getSelectOptions, appId, customRender, checkInterceptor, isOtherUser, fixedIds, }: BindDataFromProps) => { const [form] = Form.useForm(); useEffect(() => { form.setFieldsValue(value); }, [value, form]); return (
{ onChange?.(allValues); }} > ); }; export default BindDataFrom;