import React from 'react'; import { FormFieldConfig } from '.'; import { Display, FieldConfigs, DisplayProps } from '../common'; export interface IFormField { canCollapse?: boolean; children: React.ReactNode[]; } export interface IFormFieldItem { index: number; title: string; canCollapse?: boolean; children: React.ReactNode[]; } export interface IFormFieldItemField { index: number; label: string; fieldType: string; children: React.ReactNode; } interface FormState { didMount: boolean; showItem: boolean; showIndex: number; } export default class FormField extends Display, FormState> { getALLComponents: (type: any) => typeof Display; formFieldsList: Array | null>>; formFieldsMountedList: Array>; constructor(props: DisplayProps); didMount: () => Promise; set: (value: any) => Promise; get: () => Promise; handleMount: (index: number, formFieldIndex: number) => Promise; handleValueSet: (index: number, formFieldIndex: number, path: string, value: any, options?: { noPathCombination?: boolean; }) => Promise; handleValueUnset: (index: number, formFieldIndex: number, path: string, options?: { noPathCombination?: boolean; }) => Promise; handleValueListAppend: (index: number, formFieldIndex: number, path: string, value: any, options?: { noPathCombination?: boolean; }) => Promise; handleValueListSplice: (index: number, formFieldIndex: number, path: string, _index: number, count: number, options?: { noPathCombination?: boolean; }) => Promise; /** * 用于展示子表单组件中的每一子项中的每一个子表单项组件 * @param props * @returns */ renderItemFieldComponent: (props: IFormFieldItemField) => JSX.Element; /** * 用于展示子表单组件中的每一个子项 * @param props * @returns */ renderItemComponent: (props: IFormFieldItem) => JSX.Element; /** * 用于展示子表单组件 * @param _props * @returns */ renderComponent: (_props: IFormField) => JSX.Element; render: () => JSX.Element; } export {};