You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
645 B

10 months ago
  1. import React from 'react'
  2. import { FormInstance } from 'antd/lib'
  3. import { CrazyChildFormProps } from './typeing'
  4. export const CrazyFormProvide = React.createContext<
  5. | {
  6. regForm: (name: string, props: CrazyChildFormProps<any>) => void;
  7. unRegForm: (name: string) => void;
  8. onFormFinish: (name: string, formData: any) => void;
  9. keyArray: string[];
  10. formArrayRef: React.MutableRefObject<
  11. React.MutableRefObject<FormInstance<any> | undefined>[]
  12. >;
  13. loading: boolean;
  14. setLoading: (loading: boolean) => void;
  15. formMapRef: React.MutableRefObject<Map<string, CrazyChildFormProps>>;
  16. }
  17. | undefined
  18. >(undefined)