@94ai/nf-table 8.0.1 → 8.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
-
1
+
@@ -1 +1 @@
1
-
1
+
package/lib/types.d.ts CHANGED
@@ -1,281 +1,281 @@
1
- import { NfSearchFormItemOption } from '@94ai/nf-search-form/lib/types';
2
- export declare type ElTableEventKey = 'select' | 'select-all' | 'selection-change ' | 'cell-mouse-enter' | 'cell-mouse-leave' | 'cell-click' | 'cell-dblclick' | 'row-click' | 'row-contextmenu' | 'row-dblclick' | 'header-click' | 'header-contextmenu' | 'sort-change' | 'filter-change' | 'current-change' | 'header-dragend' | 'expand-change';
3
- export declare type ElPaginationEventKey = 'size-change' | 'current-change' | 'prev-click' | 'next-click';
4
- export declare type NfSearchFormEventKey = 'open' | 'opened' | 'close' | 'closed' | 'on-change' | 'itemsChange' | 'onSearch' | 'onExport' | 'onResetFields';
5
- export interface NfSearchFormAttributes {
6
- upIcon?: string;
7
- downIcon?: string;
8
- columns?: number;
9
- showBtn?: boolean;
10
- isCollapse?: boolean;
11
- labelPosition?: 'top' | 'right' | 'left';
12
- inline?: boolean;
13
- rules?: Record<string, any>;
14
- labelSuffix?: string;
15
- hideRequiredAsterisk?: boolean;
16
- showMessage?: boolean;
17
- inlineMessage?: boolean;
18
- statusIcon?: boolean;
19
- validateOnRuleChange?: boolean;
20
- size?: 'medium' | 'small' | 'mini';
21
- disabled?: boolean;
22
- labelWidth?: number;
23
- formOptions?: NfSearchFormItemOption[];
24
- showItems?: string[];
25
- closable?: boolean;
26
- itemWidth?: number;
27
- btnItems?: string[] | 'search' | 'export' | 'reset' | '';
28
- isShowAdd?: boolean;
29
- btnBoxLabel?: string;
30
- btnModel?: 'inline' | 'flex';
31
- checkBtnIcon?: string;
32
- checkBtnType?: string;
33
- checkBtnPlain?: boolean;
34
- checkBtnSize?: string;
35
- checkBtnRound?: boolean;
36
- checkBtnCircle?: boolean;
37
- checkBtnLoading?: boolean;
38
- checkBtnDisabled?: boolean;
39
- checkBtnText?: string;
40
- checkBtnClass?: string;
41
- exportBtnIcon?: string;
42
- exportBtnType?: string;
43
- exportBtnPlain?: boolean;
44
- exportBtnSize?: string;
45
- exportBtnRound?: boolean;
46
- exportBtnCircle?: boolean;
47
- exportBtnLoading?: boolean;
48
- exportBtnDisabled?: boolean;
49
- exportBtnText?: string;
50
- exportBtnClass?: string;
51
- queryBtnIcon?: string;
52
- queryBtnType?: string;
53
- queryBtnPlain?: boolean;
54
- queryBtnSize?: string;
55
- queryBtnRound?: boolean;
56
- queryBtnCircle?: boolean;
57
- queryBtnLoading?: boolean;
58
- queryBtnDisabled?: boolean;
59
- queryBtnText?: string;
60
- queryBtnClass?: string;
61
- resetBtnIcon?: string;
62
- resetBtnType?: string;
63
- resetBtnPlain?: boolean;
64
- resetBtnSize?: string;
65
- resetBtnRound?: boolean;
66
- resetBtnCircle?: boolean;
67
- resetBtnLoading?: boolean;
68
- resetBtnDisabled?: boolean;
69
- resetBtnText?: string;
70
- resetBtnClass?: string;
71
- reverseBtnSlot?: boolean;
72
- moreDialogWidth?: string;
73
- moreDialogTitle?: string;
74
- modalAppendToBody?: boolean;
75
- modal?: boolean;
76
- fullscreen?: boolean;
77
- top?: string;
78
- appendToBody?: boolean;
79
- lockScroll?: boolean;
80
- customClass?: string;
81
- closeOnlickModal?: boolean;
82
- closeOnPressEscape?: boolean;
83
- showClose?: boolean;
84
- beforeClose?: Function;
85
- center?: boolean;
86
- destroyOnClose?: boolean;
87
- }
88
- export interface ElTableAttributes {
89
- 'data'?: Record<string, any>[];
90
- 'height'?: string | number;
91
- 'max-height'?: string | number;
92
- 'stripe'?: boolean;
93
- 'border'?: boolean;
94
- 'size'?: 'medium' | 'small' | 'mini';
95
- 'fit'?: boolean;
96
- 'show-header'?: boolean;
97
- 'highlight-current-row'?: boolean;
98
- 'highlight-selection-row'?: boolean;
99
- 'current-row-key'?: string | number;
100
- 'row-class-name'?: Function | string;
101
- 'row-style'?: Function | Record<string, string>;
102
- 'cell-class-name'?: Function | string;
103
- 'cell-style'?: Function | Record<string, string>;
104
- 'header-row-class-name'?: Function | string;
105
- 'header-row-style'?: Function | Record<string, string>;
106
- 'header-cell-class-name'?: Function | string;
107
- 'header-cell-style'?: Function | Record<string, string>;
108
- 'row-key'?: Function | string;
109
- 'empty-text'?: string;
110
- 'default-expand-all'?: boolean;
111
- 'expand-row-keys'?: string[];
112
- 'default-sort'?: {
113
- prop?: string;
114
- order?: 'descending' | 'ascending';
115
- };
116
- 'tooltip-effect'?: 'dark' | 'light';
117
- 'show-summary'?: boolean;
118
- 'sum-text'?: string;
119
- 'summary-method'?: Function;
120
- 'span-method'?: Function;
121
- 'select-on-indeterminate'?: boolean;
122
- 'indent'?: number;
123
- 'lazy'?: boolean;
124
- 'load'?: Function;
125
- 'tree-props'?: {
126
- hasChildren: string;
127
- children: string;
128
- };
129
- }
130
- export interface ElTableColumnAttributes {
131
- type?: 'selection' | 'index' | 'expand';
132
- label?: string;
133
- prop?: string;
134
- index?: number | ((index: number) => number);
135
- 'column-key'?: string;
136
- width?: string;
137
- 'min-width'?: string;
138
- fixed?: 'left' | 'right' | boolean;
139
- 'render-header'?: Function;
140
- sortable?: boolean | 'custom';
141
- 'sort-method'?: Function;
142
- 'sort-by'?: string | string[] | Function;
143
- 'sort-orders'?: ['ascending' | 'descending' | null, 'ascending' | 'descending' | null, 'ascending' | 'descending' | null];
144
- resizable?: boolean;
145
- formatter?: Function;
146
- 'show-overflow-tooltip'?: boolean;
147
- align?: 'left' | 'center' | 'right';
148
- 'class-name'?: string;
149
- 'label-class-name'?: string;
150
- selectable?: Function;
151
- 'reserve-selection'?: boolean;
152
- filters?: {
153
- text?: string | number;
154
- value?: string | number;
155
- }[];
156
- 'filter-placement'?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
157
- 'filter-multiple'?: boolean;
158
- 'filter-method'?: Function;
159
- 'filtered-value'?: string[];
160
- }
161
- export interface ElPaginationAttributes {
162
- small?: boolean;
163
- background?: boolean;
164
- 'page-size'?: number;
165
- total?: number;
166
- 'page-count'?: number;
167
- 'pager-count'?: number;
168
- 'current-page'?: number;
169
- layout?: 'prev' | 'pager' | 'next' | 'jumper' | '->' | 'total';
170
- 'page-sizes'?: number[];
171
- 'popper-class'?: string;
172
- 'prev-text'?: string;
173
- 'next-text'?: string;
174
- 'disabled'?: boolean;
175
- 'hide-on-single-page'?: boolean;
176
- }
177
- export interface NfTableColumnAttributes {
178
- _index?: number;
179
- __index?: number;
180
- initHidden?: boolean;
181
- destory?: boolean;
182
- type?: 'selection' | 'index' | 'expand';
183
- label?: string;
184
- addLabel?: string;
185
- prop?: string;
186
- render?: Function;
187
- slot?: any;
188
- headerSlot?: any;
189
- labelTooltip?: string;
190
- labelTooltipPlacement?: string;
191
- unit?: string;
192
- options: {
193
- label: string;
194
- value: string | number;
195
- tagType?: any;
196
- }[];
197
- getOptions?: Function;
198
- singleHeadMutiColSlot?: any;
199
- operationSpan?: number;
200
- operationList?: object[];
201
- attr?: ElTableColumnAttributes;
202
- }
203
- export interface NfTableActionBtnAttributes {
204
- value?: string | number | boolean | (string | number | boolean)[];
205
- element?: 'el-button' | 'el-checkbox' | 'el-radio' | 'el-input' | 'el-switch' | 'el-input-number' | 'el-autocomplete' | 'el-checkbox-group' | 'el-checkbox-button' | 'el-radio-group' | 'el-radio-button' | 'text';
206
- size?: 'medium' | 'small' | 'mini' | 'large';
207
- type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
208
- disabled?: boolean;
209
- loading?: boolean;
210
- class?: string;
211
- plain?: boolean;
212
- icon?: string;
213
- round?: boolean;
214
- circle?: boolean;
215
- style?: string;
216
- key?: number | string;
217
- text?: string;
218
- min?: number;
219
- max?: number;
220
- step?: number;
221
- 'step-strictly'?: boolean;
222
- precision?: number;
223
- controls?: boolean;
224
- 'controls-position': 'right';
225
- name?: string;
226
- label?: string;
227
- placeholder?: string;
228
- 'true-label'?: string | number;
229
- 'false-label'?: string | number;
230
- border?: boolean;
231
- checked?: boolean;
232
- indeterminate?: boolean;
233
- width?: number;
234
- 'active-icon-class'?: string;
235
- 'inactive-icon-class'?: string;
236
- 'active-text'?: string;
237
- 'inactive-text'?: string;
238
- 'inactive-value'?: string | boolean | number;
239
- 'active-color'?: string;
240
- 'inactive-color'?: string;
241
- 'validate-event'?: boolean;
242
- maxlength?: number;
243
- minlength?: number;
244
- clearable?: boolean;
245
- 'show-word-limit'?: boolean;
246
- 'prefix-icon'?: string;
247
- 'suffix-icon'?: string;
248
- 'show-password'?: boolean;
249
- rows?: number;
250
- autosize?: boolean | {
251
- minRows?: number;
252
- maxRows?: number;
253
- };
254
- autocomplete?: 'on' | 'off';
255
- readonly?: boolean;
256
- resize?: 'none' | 'both' | 'horizontal' | 'vertical';
257
- autofocus?: boolean;
258
- form?: string;
259
- tabindex?: string;
260
- debounce?: number;
261
- placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
262
- 'value-key'?: string;
263
- 'fetch-suggestions'?: Function;
264
- 'popper-class'?: string;
265
- 'trigger-on-focus'?: boolean;
266
- 'select-when-unmatched'?: boolean;
267
- 'hide-loading'?: boolean;
268
- 'popper-append-to-body'?: boolean;
269
- 'highlight-first-item'?: boolean;
270
- 'text-color'?: string;
271
- 'fill'?: string;
272
- attr?: Record<string, any>;
273
- events?: Record<string, Function>;
274
- slot?: {
275
- prefix?: string;
276
- suffix?: string;
277
- prepend?: string;
278
- append?: string;
279
- };
280
- children?: NfTableActionBtnAttributes[];
281
- }
1
+ import { NfSearchFormItemOption } from '@94ai/nf-search-form/lib/types';
2
+ export declare type ElTableEventKey = 'select' | 'select-all' | 'selection-change ' | 'cell-mouse-enter' | 'cell-mouse-leave' | 'cell-click' | 'cell-dblclick' | 'row-click' | 'row-contextmenu' | 'row-dblclick' | 'header-click' | 'header-contextmenu' | 'sort-change' | 'filter-change' | 'current-change' | 'header-dragend' | 'expand-change';
3
+ export declare type ElPaginationEventKey = 'size-change' | 'current-change' | 'prev-click' | 'next-click';
4
+ export declare type NfSearchFormEventKey = 'open' | 'opened' | 'close' | 'closed' | 'on-change' | 'itemsChange' | 'onSearch' | 'onExport' | 'onResetFields';
5
+ export interface NfSearchFormAttributes {
6
+ upIcon?: string;
7
+ downIcon?: string;
8
+ columns?: number;
9
+ showBtn?: boolean;
10
+ isCollapse?: boolean;
11
+ labelPosition?: 'top' | 'right' | 'left';
12
+ inline?: boolean;
13
+ rules?: Record<string, any>;
14
+ labelSuffix?: string;
15
+ hideRequiredAsterisk?: boolean;
16
+ showMessage?: boolean;
17
+ inlineMessage?: boolean;
18
+ statusIcon?: boolean;
19
+ validateOnRuleChange?: boolean;
20
+ size?: 'medium' | 'small' | 'mini';
21
+ disabled?: boolean;
22
+ labelWidth?: number;
23
+ formOptions?: NfSearchFormItemOption[];
24
+ showItems?: string[];
25
+ closable?: boolean;
26
+ itemWidth?: number;
27
+ btnItems?: string[] | 'search' | 'export' | 'reset' | '';
28
+ isShowAdd?: boolean;
29
+ btnBoxLabel?: string;
30
+ btnModel?: 'inline' | 'flex';
31
+ checkBtnIcon?: string;
32
+ checkBtnType?: string;
33
+ checkBtnPlain?: boolean;
34
+ checkBtnSize?: string;
35
+ checkBtnRound?: boolean;
36
+ checkBtnCircle?: boolean;
37
+ checkBtnLoading?: boolean;
38
+ checkBtnDisabled?: boolean;
39
+ checkBtnText?: string;
40
+ checkBtnClass?: string;
41
+ exportBtnIcon?: string;
42
+ exportBtnType?: string;
43
+ exportBtnPlain?: boolean;
44
+ exportBtnSize?: string;
45
+ exportBtnRound?: boolean;
46
+ exportBtnCircle?: boolean;
47
+ exportBtnLoading?: boolean;
48
+ exportBtnDisabled?: boolean;
49
+ exportBtnText?: string;
50
+ exportBtnClass?: string;
51
+ queryBtnIcon?: string;
52
+ queryBtnType?: string;
53
+ queryBtnPlain?: boolean;
54
+ queryBtnSize?: string;
55
+ queryBtnRound?: boolean;
56
+ queryBtnCircle?: boolean;
57
+ queryBtnLoading?: boolean;
58
+ queryBtnDisabled?: boolean;
59
+ queryBtnText?: string;
60
+ queryBtnClass?: string;
61
+ resetBtnIcon?: string;
62
+ resetBtnType?: string;
63
+ resetBtnPlain?: boolean;
64
+ resetBtnSize?: string;
65
+ resetBtnRound?: boolean;
66
+ resetBtnCircle?: boolean;
67
+ resetBtnLoading?: boolean;
68
+ resetBtnDisabled?: boolean;
69
+ resetBtnText?: string;
70
+ resetBtnClass?: string;
71
+ reverseBtnSlot?: boolean;
72
+ moreDialogWidth?: string;
73
+ moreDialogTitle?: string;
74
+ modalAppendToBody?: boolean;
75
+ modal?: boolean;
76
+ fullscreen?: boolean;
77
+ top?: string;
78
+ appendToBody?: boolean;
79
+ lockScroll?: boolean;
80
+ customClass?: string;
81
+ closeOnlickModal?: boolean;
82
+ closeOnPressEscape?: boolean;
83
+ showClose?: boolean;
84
+ beforeClose?: Function;
85
+ center?: boolean;
86
+ destroyOnClose?: boolean;
87
+ }
88
+ export interface ElTableAttributes {
89
+ 'data'?: Record<string, any>[];
90
+ 'height'?: string | number;
91
+ 'max-height'?: string | number;
92
+ 'stripe'?: boolean;
93
+ 'border'?: boolean;
94
+ 'size'?: 'medium' | 'small' | 'mini';
95
+ 'fit'?: boolean;
96
+ 'show-header'?: boolean;
97
+ 'highlight-current-row'?: boolean;
98
+ 'highlight-selection-row'?: boolean;
99
+ 'current-row-key'?: string | number;
100
+ 'row-class-name'?: Function | string;
101
+ 'row-style'?: Function | Record<string, string>;
102
+ 'cell-class-name'?: Function | string;
103
+ 'cell-style'?: Function | Record<string, string>;
104
+ 'header-row-class-name'?: Function | string;
105
+ 'header-row-style'?: Function | Record<string, string>;
106
+ 'header-cell-class-name'?: Function | string;
107
+ 'header-cell-style'?: Function | Record<string, string>;
108
+ 'row-key'?: Function | string;
109
+ 'empty-text'?: string;
110
+ 'default-expand-all'?: boolean;
111
+ 'expand-row-keys'?: string[];
112
+ 'default-sort'?: {
113
+ prop?: string;
114
+ order?: 'descending' | 'ascending';
115
+ };
116
+ 'tooltip-effect'?: 'dark' | 'light';
117
+ 'show-summary'?: boolean;
118
+ 'sum-text'?: string;
119
+ 'summary-method'?: Function;
120
+ 'span-method'?: Function;
121
+ 'select-on-indeterminate'?: boolean;
122
+ 'indent'?: number;
123
+ 'lazy'?: boolean;
124
+ 'load'?: Function;
125
+ 'tree-props'?: {
126
+ hasChildren: string;
127
+ children: string;
128
+ };
129
+ }
130
+ export interface ElTableColumnAttributes {
131
+ type?: 'selection' | 'index' | 'expand';
132
+ label?: string;
133
+ prop?: string;
134
+ index?: number | ((index: number) => number);
135
+ 'column-key'?: string;
136
+ width?: string;
137
+ 'min-width'?: string;
138
+ fixed?: 'left' | 'right' | boolean;
139
+ 'render-header'?: Function;
140
+ sortable?: boolean | 'custom';
141
+ 'sort-method'?: Function;
142
+ 'sort-by'?: string | string[] | Function;
143
+ 'sort-orders'?: ['ascending' | 'descending' | null, 'ascending' | 'descending' | null, 'ascending' | 'descending' | null];
144
+ resizable?: boolean;
145
+ formatter?: Function;
146
+ 'show-overflow-tooltip'?: boolean;
147
+ align?: 'left' | 'center' | 'right';
148
+ 'class-name'?: string;
149
+ 'label-class-name'?: string;
150
+ selectable?: Function;
151
+ 'reserve-selection'?: boolean;
152
+ filters?: {
153
+ text?: string | number;
154
+ value?: string | number;
155
+ }[];
156
+ 'filter-placement'?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
157
+ 'filter-multiple'?: boolean;
158
+ 'filter-method'?: Function;
159
+ 'filtered-value'?: string[];
160
+ }
161
+ export interface ElPaginationAttributes {
162
+ small?: boolean;
163
+ background?: boolean;
164
+ 'page-size'?: number;
165
+ total?: number;
166
+ 'page-count'?: number;
167
+ 'pager-count'?: number;
168
+ 'current-page'?: number;
169
+ layout?: 'prev' | 'pager' | 'next' | 'jumper' | '->' | 'total';
170
+ 'page-sizes'?: number[];
171
+ 'popper-class'?: string;
172
+ 'prev-text'?: string;
173
+ 'next-text'?: string;
174
+ 'disabled'?: boolean;
175
+ 'hide-on-single-page'?: boolean;
176
+ }
177
+ export interface NfTableColumnAttributes {
178
+ _index?: number;
179
+ __index?: number;
180
+ initHidden?: boolean;
181
+ destory?: boolean | ((any: any) => boolean);
182
+ type?: 'selection' | 'index' | 'expand';
183
+ label?: string;
184
+ addLabel?: string;
185
+ prop?: string;
186
+ render?: Function;
187
+ slot?: any;
188
+ headerSlot?: any;
189
+ labelTooltip?: string;
190
+ labelTooltipPlacement?: string;
191
+ unit?: string;
192
+ options: {
193
+ label: string;
194
+ value: string | number;
195
+ tagType?: any;
196
+ }[];
197
+ getOptions?: Function;
198
+ singleHeadMutiColSlot?: any;
199
+ operationSpan?: number;
200
+ operationList?: object[];
201
+ attr?: ElTableColumnAttributes;
202
+ }
203
+ export interface NfTableActionBtnAttributes {
204
+ value?: string | number | boolean | (string | number | boolean)[];
205
+ element?: 'el-button' | 'el-checkbox' | 'el-radio' | 'el-input' | 'el-switch' | 'el-input-number' | 'el-autocomplete' | 'el-checkbox-group' | 'el-checkbox-button' | 'el-radio-group' | 'el-radio-button' | 'text';
206
+ size?: 'medium' | 'small' | 'mini' | 'large';
207
+ type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
208
+ disabled?: boolean;
209
+ loading?: boolean;
210
+ class?: string;
211
+ plain?: boolean;
212
+ icon?: string;
213
+ round?: boolean;
214
+ circle?: boolean;
215
+ style?: string;
216
+ key?: number | string;
217
+ text?: string;
218
+ min?: number;
219
+ max?: number;
220
+ step?: number;
221
+ 'step-strictly'?: boolean;
222
+ precision?: number;
223
+ controls?: boolean;
224
+ 'controls-position': 'right';
225
+ name?: string;
226
+ label?: string;
227
+ placeholder?: string;
228
+ 'true-label'?: string | number;
229
+ 'false-label'?: string | number;
230
+ border?: boolean;
231
+ checked?: boolean;
232
+ indeterminate?: boolean;
233
+ width?: number;
234
+ 'active-icon-class'?: string;
235
+ 'inactive-icon-class'?: string;
236
+ 'active-text'?: string;
237
+ 'inactive-text'?: string;
238
+ 'inactive-value'?: string | boolean | number;
239
+ 'active-color'?: string;
240
+ 'inactive-color'?: string;
241
+ 'validate-event'?: boolean;
242
+ maxlength?: number;
243
+ minlength?: number;
244
+ clearable?: boolean;
245
+ 'show-word-limit'?: boolean;
246
+ 'prefix-icon'?: string;
247
+ 'suffix-icon'?: string;
248
+ 'show-password'?: boolean;
249
+ rows?: number;
250
+ autosize?: boolean | {
251
+ minRows?: number;
252
+ maxRows?: number;
253
+ };
254
+ autocomplete?: 'on' | 'off';
255
+ readonly?: boolean;
256
+ resize?: 'none' | 'both' | 'horizontal' | 'vertical';
257
+ autofocus?: boolean;
258
+ form?: string;
259
+ tabindex?: string;
260
+ debounce?: number;
261
+ placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
262
+ 'value-key'?: string;
263
+ 'fetch-suggestions'?: Function;
264
+ 'popper-class'?: string;
265
+ 'trigger-on-focus'?: boolean;
266
+ 'select-when-unmatched'?: boolean;
267
+ 'hide-loading'?: boolean;
268
+ 'popper-append-to-body'?: boolean;
269
+ 'highlight-first-item'?: boolean;
270
+ 'text-color'?: string;
271
+ 'fill'?: string;
272
+ attr?: Record<string, any>;
273
+ events?: Record<string, Function>;
274
+ slot?: {
275
+ prefix?: string;
276
+ suffix?: string;
277
+ prepend?: string;
278
+ append?: string;
279
+ };
280
+ children?: NfTableActionBtnAttributes[];
281
+ }