@antdp/edit-table
Version:
基于antd封装的组件
15 lines (14 loc) • 1.56 kB
TypeScript
import React from 'react';
import { TextAreaProps } from 'antd/lib/input/TextArea';
import { RangePickerProps } from 'antd/lib/date-picker/index';
import { InternalNamePath } from 'rc-field-form/lib/interface';
import { InputProps, AutoCompleteProps, CascaderProps, DatePickerProps, RateProps, SliderSingleProps, TreeSelectProps, InputNumberProps, SelectProps, CheckboxProps, MentionProps, RadioProps, SwitchProps, TimePickerProps, UploadProps } from 'antd';
export type ItemChildType = 'Custom' | 'Input' | 'InputNumber' | 'TextArea' | 'Select' | 'AutoComplete' | 'Cascader' | 'Checkbox' | 'DatePicker' | 'Mentions' | 'Radio' | 'Rate' | 'Slider' | 'Switch' | 'TimePicker' | 'TreeSelect' | 'Upload' | 'RangePicker';
export type ItemChildAttr<T = any, K = any> = InputProps | InputNumberProps | SelectProps<T> | AutoCompleteProps | CascaderProps | CheckboxProps | DatePickerProps | MentionProps | RadioProps | RateProps | SliderSingleProps | SwitchProps | TimePickerProps | TreeSelectProps<K> | UploadProps | TextAreaProps | RangePickerProps;
export declare function getFieldId(namePath: InternalNamePath, formName?: string): string | undefined;
export declare function toArray<T>(candidate?: T | T[] | false): T[];
export declare const getItem: ({ attr, type, inputNode }: {
attr?: Partial<ItemChildAttr<any, any>>;
type?: ItemChildType;
inputNode?: ((...arg: any[]) => React.ReactNode) | React.ReactNode;
}) => string | number | boolean | Iterable<React.ReactNode> | ((...arg: any[]) => React.ReactNode) | React.JSX.Element | null | undefined;