UNPKG

ant-plus-components

Version:

基于 Ant Design 的增强型组件库

27 lines (26 loc) 905 B
/// <reference types="react" /> import type { ColProps } from "antd"; import type { ColumnType } from "antd/es/table"; export interface Option { label: string; value: unknown; children?: Option[]; } type ValueType = "select" | "input" | "checkbox" | "radio" | "switch" | "input-number" | "cascader" | "switch" | "date-picker" | "range-picker" | "time-picker" | "tree-select"; type CustomFormItem = { col?: ColProps; render?: (value: ColumnPlus) => React.ReactNode; }; export interface ColumnPlus extends ColumnType { dataIndex: string; type?: ValueType; fieldProps?: Record<string, unknown>; formItemProps?: Record<string, unknown>; options?: Option[] | (() => Promise<Option[]>); hideInSearchForm?: boolean; hideInForm?: boolean; hideInTable?: boolean; searchForm?: CustomFormItem; form?: CustomFormItem; } export {};