1 | import { ElementUIComponent } from './component'
|
2 | import { TooltipEffect } from './tooltip'
|
3 |
|
4 | export type SortOrder = 'ascending' | 'descending'
|
5 |
|
6 |
|
7 | export interface DefaultSortOptions {
|
8 |
|
9 | prop: string,
|
10 |
|
11 |
|
12 | order: SortOrder
|
13 | }
|
14 |
|
15 | export interface SummaryMethodParams {
|
16 | columns: object[],
|
17 | data: object
|
18 | }
|
19 |
|
20 | export interface rowCallbackParams {
|
21 | row: object,
|
22 | rowIndex: number
|
23 | }
|
24 |
|
25 | export interface cellCallbackParams {
|
26 | row: object,
|
27 | rowIndex: number,
|
28 | column: object,
|
29 | columnIndex: number
|
30 | }
|
31 |
|
32 |
|
33 | export declare class ElTable extends ElementUIComponent {
|
34 |
|
35 | data: object[]
|
36 |
|
37 |
|
38 | height: string | number
|
39 |
|
40 |
|
41 | maxHeight: string | number
|
42 |
|
43 |
|
44 | stripe: boolean
|
45 |
|
46 |
|
47 | border: boolean
|
48 |
|
49 |
|
50 | fit: boolean
|
51 |
|
52 |
|
53 | showHeader: boolean
|
54 |
|
55 |
|
56 | highlightCurrentRow: boolean
|
57 |
|
58 |
|
59 | currentRowKey: string | number
|
60 |
|
61 |
|
62 | rowClassName: string | ((param: rowCallbackParams) => string)
|
63 |
|
64 | /** Function that returns custom style for a row, or an object assigning custom style for every row */
|
65 | rowStyle: object | ((param: rowCallbackParams) => object)
|
66 |
|
67 | /** Function that returns custom class names for a cell, or a string assigning class names for every cell */
|
68 | cellClassName: string | ((param: cellCallbackParams) => string)
|
69 |
|
70 | /** Function that returns custom style for a cell, or an object assigning custom style for every cell */
|
71 | cellStyle: object | ((param: cellCallbackParams) => object)
|
72 |
|
73 | /** Function that returns custom class names for a row in table header, or a string assigning class names for every row in table header */
|
74 | headerRowClassName: string | ((param: rowCallbackParams) => string)
|
75 |
|
76 | /** Function that returns custom style for a row in table header, or an object assigning custom style for every row in table header */
|
77 | headerRowStyle: object | ((param: rowCallbackParams) => object)
|
78 |
|
79 | /** Function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header */
|
80 | headerCellClassName: string | ((param: cellCallbackParams) => string)
|
81 |
|
82 | /** Function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header */
|
83 | headerCellStyle: object | ((param: cellCallbackParams) => object)
|
84 |
|
85 | /** Key of row data, used for optimizing rendering. Required if reserve-selection is on */
|
86 | rowKey: (row: object) => any
|
87 |
|
88 |
|
89 | emptyText: String
|
90 |
|
91 |
|
92 | defaultExpandAll: Boolean
|
93 |
|
94 |
|
95 | expandRowKeys: any[]
|
96 |
|
97 |
|
98 | defaultSort: DefaultSortOptions
|
99 |
|
100 |
|
101 | tooltipEffect: TooltipEffect
|
102 |
|
103 |
|
104 | showSummary: boolean
|
105 |
|
106 |
|
107 | sumText: string
|
108 |
|
109 |
|
110 | summaryMethod: (param: SummaryMethodParams) => any[]
|
111 |
|
112 |
|
113 | selectOnIndeterminate: boolean
|
114 |
|
115 |
|
116 | clearSelection (): void
|
117 |
|
118 | |
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 | toggleRowSelection (row: object, selected?: boolean): void
|
125 |
|
126 | |
127 |
|
128 |
|
129 | toggleAllSelection (): void
|
130 |
|
131 | |
132 |
|
133 |
|
134 |
|
135 |
|
136 | setCurrentRow (row?: object): void
|
137 |
|
138 | |
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 | toggleRowExpansion (row: object, expanded?: boolean): void
|
145 |
|
146 |
|
147 | clearSort (): void
|
148 |
|
149 |
|
150 | clearFilter (): void
|
151 |
|
152 |
|
153 | doLayout (): void
|
154 |
|
155 |
|
156 | sort (prop: string, order: string): void
|
157 | }
|