import React from 'react'; import type { FormProps } from 'antd'; import type { DrawerFormProps, QueryFilterProps, ProFormProps, StepFormProps, ModalFormProps } from '../../index'; import type { ProCoreActionType, ProSchema, ProSchemaComponentTypes, SearchTransformKeyFn } from 'ls-pro-utils'; import type { NamePath } from 'antd/lib/form/interface'; export declare type ExtraProColumnType = { tooltip?: React.ReactNode; key?: React.Key; className?: string; /** * @type auto 使用组件默认的宽度 * @type xs=104px 适用于短数字、短文本或选项。 * @type sm=216px 适用于较短字段录入、如姓名、电话、ID 等。 * @type md=328px 标准宽度,适用于大部分字段长度。 * @type lg=440px 适用于较长字段录入,如长网址、标签组、文件路径等。 * @type xl=552px 适用于长文本录入,如长链接、描述、备注等,通常搭配自适应多行输入框或定高文本域使用。 */ width?: string | number; name?: NamePath; /** 查询或排序字段别名 */ searchField?: string; hideInSearchSetting?: boolean; }; /** ProForm 的特色 layout */ export declare type ProFormLayoutType = 'Form' | 'ModalForm' | 'DrawerForm' | 'StepsForm' | 'StepForm' | 'LightFilter' | 'QueryFilter' | 'Embed'; /** ProForm 支持的相关类型 */ export declare type ProFormPropsType = Omit, 'onFinish'> & Omit, 'onFinish'> & ProFormProps & Omit, 'onFinish'> & Omit, 'onFinish'> & { layoutType?: ProFormLayoutType; }; export declare type FormFieldType = 'group' | 'formList' | 'formSet' | 'divider' | 'dependency'; export declare type ProFormColumnsType = ProSchema[] | ((values: any) => ProFormColumnsType[]); }, ProSchemaComponentTypes, ValueType | FormFieldType>; export declare type FormSchema, ValueType = 'text'> = { title?: React.ReactNode | ((schema: ProFormColumnsType, type: 'form', dom: React.ReactNode) => React.ReactNode); description?: React.ReactNode; steps?: StepFormProps[]; columns: ProFormColumnsType[] | ProFormColumnsType[][]; type?: any; searchSetting?: boolean | { key?: string; resouceId?: string; afterLoad?: () => void; }; action?: React.MutableRefObject; } & Omit, 'onFinish'> & ProFormPropsType; /** * 此组件可以根据 Json Schema 来生成相应的表单,大部分配置与 antd 的 table 列配置相同 * * @see 此组件仍为 beta 版本,api 可能发生变化 */ declare function BetaSchemaForm(props: FormSchema): JSX.Element; export default BetaSchemaForm;