Table.d.ts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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<{
  64. scroll?: any;
  65. data?: any;
  66. footer?: any;
  67. title?: any;
  68. components?: any;
  69. direction?: any;
  70. tableLayout?: any;
  71. columns?: any;
  72. sticky?: any;
  73. prefixCls?: any;
  74. id?: any;
  75. rowClassName?: any;
  76. expandIcon?: any;
  77. onExpand?: any;
  78. rowKey?: any;
  79. expandedRowKeys?: any;
  80. defaultExpandedRowKeys?: any;
  81. expandedRowRender?: any;
  82. expandRowByClick?: any;
  83. onExpandedRowsChange?: any;
  84. defaultExpandAllRows?: any;
  85. indentSize?: any;
  86. expandIconColumnIndex?: any;
  87. expandedRowClassName?: any;
  88. childrenColumnName?: any;
  89. rowExpandable?: any;
  90. transformCellText?: any;
  91. customHeaderRow?: any;
  92. customRow?: any;
  93. expandColumnWidth?: any;
  94. expandFixed?: any;
  95. showHeader?: any;
  96. "onUpdate:expandedRowKeys"?: any;
  97. transformColumns?: any;
  98. internalHooks?: any;
  99. internalRefs?: any;
  100. canExpandable?: any;
  101. onUpdateInternalRefs?: any;
  102. }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("expand" | "expandedRowsChange" | "updateInternalRefs" | "update:expandedRowKeys")[], "expand" | "expandedRowsChange" | "updateInternalRefs" | "update:expandedRowKeys", import("vue").PublicProps, Readonly<{
  103. scroll?: any;
  104. data?: any;
  105. footer?: any;
  106. title?: any;
  107. components?: any;
  108. direction?: any;
  109. tableLayout?: any;
  110. columns?: any;
  111. sticky?: any;
  112. prefixCls?: any;
  113. id?: any;
  114. rowClassName?: any;
  115. expandIcon?: any;
  116. onExpand?: any;
  117. rowKey?: any;
  118. expandedRowKeys?: any;
  119. defaultExpandedRowKeys?: any;
  120. expandedRowRender?: any;
  121. expandRowByClick?: any;
  122. onExpandedRowsChange?: any;
  123. defaultExpandAllRows?: any;
  124. indentSize?: any;
  125. expandIconColumnIndex?: any;
  126. expandedRowClassName?: any;
  127. childrenColumnName?: any;
  128. rowExpandable?: any;
  129. transformCellText?: any;
  130. customHeaderRow?: any;
  131. customRow?: any;
  132. expandColumnWidth?: any;
  133. expandFixed?: any;
  134. showHeader?: any;
  135. "onUpdate:expandedRowKeys"?: any;
  136. transformColumns?: any;
  137. internalHooks?: any;
  138. internalRefs?: any;
  139. canExpandable?: any;
  140. onUpdateInternalRefs?: any;
  141. }> & Readonly<{
  142. onExpand?: (...args: any[]) => any;
  143. onExpandedRowsChange?: (...args: any[]) => any;
  144. "onUpdate:expandedRowKeys"?: (...args: any[]) => any;
  145. onUpdateInternalRefs?: (...args: any[]) => any;
  146. }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
  147. export default _default;