import { VNode, Ref } from 'vue'; import { DefaultRow } from 'element-plus/es/components/table/src/table/defaults'; import { FormItemProps, TableColumnCtx } from '../../scripts/build/node_modules/element-plus'; import { ProTableProps, SummaryMethodProps } from '../components/ProTable/src/type'; import { SearchType } from './searchForm'; import { SuperProTable } from '../components/ProTable/index'; export interface EnumProps { label?: string; value?: string | number | boolean | any[]; disabled?: boolean; tagType?: string; children?: EnumProps[]; [key: string]: any; } export type TypeProps = "index" | "selection" | "radio" | "expand" | "sort"; export type RenderScope = { row: T; $index: number; column: TableColumnCtx; [key: string]: any; }; export type HeaderRenderScope = { $index: number; column: TableColumnCtx; [key: string]: any; }; export interface ColumnProps extends Partial, "type" | "children" | "renderCell" | "renderHeader">> { type?: TypeProps; tag?: (scope: RenderScope) => any; isShow?: boolean | Ref; isSetting?: boolean | Ref; isEdit?: boolean | Ref; edit?: boolean | Ref; required?: boolean; valueType?: string; formItemProps?: Partial; el?: SearchType; enum?: EnumProps[] | Ref; headerRender?: (scope: HeaderRenderScope) => VNode; render?: (scope: RenderScope) => VNode | string; format?: ((value: any) => string) | string; sumFilter?: (value: any, param: SummaryMethodProps) => string; sumDataPrefix?: string; _children?: ColumnProps[]; align?: string; copyable?: boolean; } export type ProTableInstance = Omit, keyof ProTableProps>;