Table.d.ts 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import type { GetRowKey, ColumnsType, TableComponents, Key, GetComponentProps, PanelRender, TableLayout, RowClassName, ColumnType, TableSticky, ExpandedRowRender, RenderExpandIcon, TransformCellText, DefaultRecordType } from './interface';
  2. export declare const INTERNAL_HOOKS = "rc-table-internal-hook";
  3. export interface TableProps<RecordType = DefaultRecordType> {
  4. prefixCls?: string;
  5. data?: RecordType[];
  6. columns?: ColumnsType<RecordType>;
  7. rowKey?: string | GetRowKey<RecordType>;
  8. tableLayout?: TableLayout;
  9. scroll?: {
  10. x?: number | true | string;
  11. y?: number | string;
  12. };
  13. rowClassName?: string | RowClassName<RecordType>;
  14. title?: PanelRender<RecordType>;
  15. footer?: PanelRender<RecordType>;
  16. id?: string;
  17. showHeader?: boolean;
  18. components?: TableComponents<RecordType>;
  19. customRow?: GetComponentProps<RecordType>;
  20. customHeaderRow?: GetComponentProps<ColumnType<RecordType>[]>;
  21. direction?: 'ltr' | 'rtl';
  22. expandFixed?: 'left' | 'right' | boolean;
  23. expandColumnWidth?: number;
  24. expandedRowKeys?: Key[];
  25. defaultExpandedRowKeys?: Key[];
  26. expandedRowRender?: ExpandedRowRender<RecordType>;
  27. expandRowByClick?: boolean;
  28. expandIcon?: RenderExpandIcon<RecordType>;
  29. onExpand?: (expanded: boolean, record: RecordType) => void;
  30. onExpandedRowsChange?: (expandedKeys: Key[]) => void;
  31. defaultExpandAllRows?: boolean;
  32. indentSize?: number;
  33. expandIconColumnIndex?: number;
  34. showExpandColumn?: boolean;
  35. expandedRowClassName?: RowClassName<RecordType>;
  36. childrenColumnName?: string;
  37. rowExpandable?: (record: RecordType) => boolean;
  38. /**
  39. * @private Internal usage, may remove by refactor. Should always use `columns` instead.
  40. *
  41. * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
  42. */
  43. internalHooks?: string;
  44. /**
  45. * @private Internal usage, may remove by refactor. Should always use `columns` instead.
  46. *
  47. * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
  48. */
  49. transformColumns?: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
  50. /**
  51. * @private Internal usage, may remove by refactor.
  52. *
  53. * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
  54. */
  55. internalRefs?: {
  56. body: HTMLDivElement;
  57. };
  58. sticky?: boolean | TableSticky;
  59. canExpandable?: boolean;
  60. onUpdateInternalRefs?: (refs: Record<string, any>) => void;
  61. transformCellText?: TransformCellText<RecordType>;
  62. }
  63. declare const _default: import("vue").DefineComponent<TableProps<any>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<TableProps<any>>, {}>;
  64. export default _default;