@94ai/nf-table 5.0.36 → 5.0.38
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.
- package/lib/index.d.ts +2062 -2062
- package/lib/nf-table.cjs.js +22 -48
- package/lib/nf-table.esm-bundler.js +22 -48
- package/lib/nf-table.vue.d.ts +577 -577
- package/lib/types.d.ts +270 -270
- package/package/nf-table.vue +21 -12
- package/package.json +8 -8
package/lib/types.d.ts
CHANGED
|
@@ -1,270 +1,270 @@
|
|
|
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
|
-
singleHeadMutiColSlot?: any;
|
|
190
|
-
attr?: ElTableColumnAttributes;
|
|
191
|
-
}
|
|
192
|
-
export interface NfTableActionBtnAttributes {
|
|
193
|
-
value?: string | number | boolean | (string | number | boolean)[];
|
|
194
|
-
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';
|
|
195
|
-
size?: 'medium' | 'small' | 'mini' | 'large';
|
|
196
|
-
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
|
197
|
-
disabled?: boolean;
|
|
198
|
-
loading?: boolean;
|
|
199
|
-
class?: string;
|
|
200
|
-
plain?: boolean;
|
|
201
|
-
icon?: string;
|
|
202
|
-
round?: boolean;
|
|
203
|
-
circle?: boolean;
|
|
204
|
-
style?: string;
|
|
205
|
-
key?: number | string;
|
|
206
|
-
text?: string;
|
|
207
|
-
min?: number;
|
|
208
|
-
max?: number;
|
|
209
|
-
step?: number;
|
|
210
|
-
'step-strictly'?: boolean;
|
|
211
|
-
precision?: number;
|
|
212
|
-
controls?: boolean;
|
|
213
|
-
'controls-position': 'right';
|
|
214
|
-
name?: string;
|
|
215
|
-
label?: string;
|
|
216
|
-
placeholder?: string;
|
|
217
|
-
'true-label'?: string | number;
|
|
218
|
-
'false-label'?: string | number;
|
|
219
|
-
border?: boolean;
|
|
220
|
-
checked?: boolean;
|
|
221
|
-
indeterminate?: boolean;
|
|
222
|
-
width?: number;
|
|
223
|
-
'active-icon-class'?: string;
|
|
224
|
-
'inactive-icon-class'?: string;
|
|
225
|
-
'active-text'?: string;
|
|
226
|
-
'inactive-text'?: string;
|
|
227
|
-
'inactive-value'?: string | boolean | number;
|
|
228
|
-
'active-color'?: string;
|
|
229
|
-
'inactive-color'?: string;
|
|
230
|
-
'validate-event'?: boolean;
|
|
231
|
-
maxlength?: number;
|
|
232
|
-
minlength?: number;
|
|
233
|
-
clearable?: boolean;
|
|
234
|
-
'show-word-limit'?: boolean;
|
|
235
|
-
'prefix-icon'?: string;
|
|
236
|
-
'suffix-icon'?: string;
|
|
237
|
-
'show-password'?: boolean;
|
|
238
|
-
rows?: number;
|
|
239
|
-
autosize?: boolean | {
|
|
240
|
-
minRows?: number;
|
|
241
|
-
maxRows?: number;
|
|
242
|
-
};
|
|
243
|
-
autocomplete?: 'on' | 'off';
|
|
244
|
-
readonly?: boolean;
|
|
245
|
-
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
246
|
-
autofocus?: boolean;
|
|
247
|
-
form?: string;
|
|
248
|
-
tabindex?: string;
|
|
249
|
-
debounce?: number;
|
|
250
|
-
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
|
251
|
-
'value-key'?: string;
|
|
252
|
-
'fetch-suggestions'?: Function;
|
|
253
|
-
'popper-class'?: string;
|
|
254
|
-
'trigger-on-focus'?: boolean;
|
|
255
|
-
'select-when-unmatched'?: boolean;
|
|
256
|
-
'hide-loading'?: boolean;
|
|
257
|
-
'popper-append-to-body'?: boolean;
|
|
258
|
-
'highlight-first-item'?: boolean;
|
|
259
|
-
'text-color'?: string;
|
|
260
|
-
'fill'?: string;
|
|
261
|
-
attr?: Record<string, any>;
|
|
262
|
-
events?: Record<string, Function>;
|
|
263
|
-
slot?: {
|
|
264
|
-
prefix?: string;
|
|
265
|
-
suffix?: string;
|
|
266
|
-
prepend?: string;
|
|
267
|
-
append?: string;
|
|
268
|
-
};
|
|
269
|
-
children?: NfTableActionBtnAttributes[];
|
|
270
|
-
}
|
|
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
|
+
singleHeadMutiColSlot?: any;
|
|
190
|
+
attr?: ElTableColumnAttributes;
|
|
191
|
+
}
|
|
192
|
+
export interface NfTableActionBtnAttributes {
|
|
193
|
+
value?: string | number | boolean | (string | number | boolean)[];
|
|
194
|
+
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';
|
|
195
|
+
size?: 'medium' | 'small' | 'mini' | 'large';
|
|
196
|
+
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text';
|
|
197
|
+
disabled?: boolean;
|
|
198
|
+
loading?: boolean;
|
|
199
|
+
class?: string;
|
|
200
|
+
plain?: boolean;
|
|
201
|
+
icon?: string;
|
|
202
|
+
round?: boolean;
|
|
203
|
+
circle?: boolean;
|
|
204
|
+
style?: string;
|
|
205
|
+
key?: number | string;
|
|
206
|
+
text?: string;
|
|
207
|
+
min?: number;
|
|
208
|
+
max?: number;
|
|
209
|
+
step?: number;
|
|
210
|
+
'step-strictly'?: boolean;
|
|
211
|
+
precision?: number;
|
|
212
|
+
controls?: boolean;
|
|
213
|
+
'controls-position': 'right';
|
|
214
|
+
name?: string;
|
|
215
|
+
label?: string;
|
|
216
|
+
placeholder?: string;
|
|
217
|
+
'true-label'?: string | number;
|
|
218
|
+
'false-label'?: string | number;
|
|
219
|
+
border?: boolean;
|
|
220
|
+
checked?: boolean;
|
|
221
|
+
indeterminate?: boolean;
|
|
222
|
+
width?: number;
|
|
223
|
+
'active-icon-class'?: string;
|
|
224
|
+
'inactive-icon-class'?: string;
|
|
225
|
+
'active-text'?: string;
|
|
226
|
+
'inactive-text'?: string;
|
|
227
|
+
'inactive-value'?: string | boolean | number;
|
|
228
|
+
'active-color'?: string;
|
|
229
|
+
'inactive-color'?: string;
|
|
230
|
+
'validate-event'?: boolean;
|
|
231
|
+
maxlength?: number;
|
|
232
|
+
minlength?: number;
|
|
233
|
+
clearable?: boolean;
|
|
234
|
+
'show-word-limit'?: boolean;
|
|
235
|
+
'prefix-icon'?: string;
|
|
236
|
+
'suffix-icon'?: string;
|
|
237
|
+
'show-password'?: boolean;
|
|
238
|
+
rows?: number;
|
|
239
|
+
autosize?: boolean | {
|
|
240
|
+
minRows?: number;
|
|
241
|
+
maxRows?: number;
|
|
242
|
+
};
|
|
243
|
+
autocomplete?: 'on' | 'off';
|
|
244
|
+
readonly?: boolean;
|
|
245
|
+
resize?: 'none' | 'both' | 'horizontal' | 'vertical';
|
|
246
|
+
autofocus?: boolean;
|
|
247
|
+
form?: string;
|
|
248
|
+
tabindex?: string;
|
|
249
|
+
debounce?: number;
|
|
250
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
|
|
251
|
+
'value-key'?: string;
|
|
252
|
+
'fetch-suggestions'?: Function;
|
|
253
|
+
'popper-class'?: string;
|
|
254
|
+
'trigger-on-focus'?: boolean;
|
|
255
|
+
'select-when-unmatched'?: boolean;
|
|
256
|
+
'hide-loading'?: boolean;
|
|
257
|
+
'popper-append-to-body'?: boolean;
|
|
258
|
+
'highlight-first-item'?: boolean;
|
|
259
|
+
'text-color'?: string;
|
|
260
|
+
'fill'?: string;
|
|
261
|
+
attr?: Record<string, any>;
|
|
262
|
+
events?: Record<string, Function>;
|
|
263
|
+
slot?: {
|
|
264
|
+
prefix?: string;
|
|
265
|
+
suffix?: string;
|
|
266
|
+
prepend?: string;
|
|
267
|
+
append?: string;
|
|
268
|
+
};
|
|
269
|
+
children?: NfTableActionBtnAttributes[];
|
|
270
|
+
}
|
package/package/nf-table.vue
CHANGED
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
:icon="item.icon"
|
|
172
172
|
:round="item.round"
|
|
173
173
|
:circle="item.circle"
|
|
174
|
-
:style="
|
|
174
|
+
:style="getActionBarItemStyle(item, {marginLeft: '0px'})"
|
|
175
175
|
v-on="item.events"
|
|
176
176
|
>{{ item.value }}
|
|
177
177
|
</nf-button>
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
:name="item.name"
|
|
189
189
|
:checked="item.checked"
|
|
190
190
|
:indeterminate="item.indeterminate"
|
|
191
|
-
:style="
|
|
191
|
+
:style="getActionBarItemStyle(item)"
|
|
192
192
|
v-if="item.element === 'el-checkbox'"
|
|
193
193
|
v-on="item.events"
|
|
194
194
|
>{{ item.text }}
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
:name="item.name"
|
|
207
207
|
:checked="item.checked"
|
|
208
208
|
:indeterminate="item.indeterminate"
|
|
209
|
-
:style="
|
|
209
|
+
:style="getActionBarItemStyle(item)"
|
|
210
210
|
v-if="item.element === 'el-checkbox-group'"
|
|
211
211
|
v-on="item.events"
|
|
212
212
|
>
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
:name="item.name"
|
|
267
267
|
:checked="item.checked"
|
|
268
268
|
:indeterminate="item.indeterminate"
|
|
269
|
-
:style="
|
|
269
|
+
:style="getActionBarItemStyle(item)"
|
|
270
270
|
v-if="item.element === 'el-checkbox-button'"
|
|
271
271
|
v-on="item.events"
|
|
272
272
|
>{{ item.text }}
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
:name="item.name"
|
|
281
281
|
:size="item.size"
|
|
282
282
|
:class="item.class"
|
|
283
|
-
:style="
|
|
283
|
+
:style="getActionBarItemStyle(item)"
|
|
284
284
|
v-if="item.element === 'el-radio'"
|
|
285
285
|
v-on="item.events"
|
|
286
286
|
>{{ item.text }}
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
:class="item.class"
|
|
294
294
|
:text-color="item['text-color']"
|
|
295
295
|
:fill="item['fill']"
|
|
296
|
-
:style="
|
|
296
|
+
:style="getActionBarItemStyle(item)"
|
|
297
297
|
v-if="item.element === 'el-radio-group'"
|
|
298
298
|
v-on="item.events"
|
|
299
299
|
>
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
:name="item.name"
|
|
342
342
|
:size="item.size"
|
|
343
343
|
:class="item.class"
|
|
344
|
-
:style="
|
|
344
|
+
:style="getActionBarItemStyle(item)"
|
|
345
345
|
v-if="item.element === 'el-radio-button'"
|
|
346
346
|
v-on="item.events"
|
|
347
347
|
>{{ item.text }}
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
:autofocus="item.autofocus"
|
|
376
376
|
:form="item.form"
|
|
377
377
|
:tabindex="item.tabindex"
|
|
378
|
-
:style="
|
|
378
|
+
:style="getActionBarItemStyle(item)"
|
|
379
379
|
v-if="item.element === 'el-input'"
|
|
380
380
|
v-on="item.events"
|
|
381
381
|
>
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
:key="item.key || index"
|
|
389
389
|
v-model="item.value"
|
|
390
390
|
:class="item.class"
|
|
391
|
-
:style="
|
|
391
|
+
:style="getActionBarItemStyle(item)"
|
|
392
392
|
:value-key="item['value-key']"
|
|
393
393
|
:fetch-suggestions="item['fetch-suggestions']"
|
|
394
394
|
:popper-class="item['popper-class']"
|
|
@@ -429,7 +429,7 @@
|
|
|
429
429
|
:inactive-color="item['inactive-color']"
|
|
430
430
|
:validate-event="item['validate-event']"
|
|
431
431
|
:class="item.class"
|
|
432
|
-
:style="
|
|
432
|
+
:style="getActionBarItemStyle(item)"
|
|
433
433
|
v-if="item.element === 'el-switch'"
|
|
434
434
|
v-on="item.events"
|
|
435
435
|
>{{ item.text }}
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
:name="item.name"
|
|
451
451
|
:label="item.label"
|
|
452
452
|
:placeholder="item.placeholder"
|
|
453
|
-
:style="
|
|
453
|
+
:style="getActionBarItemStyle(item)"
|
|
454
454
|
v-if="item.element === 'el-input-number'"
|
|
455
455
|
v-on="item.events"
|
|
456
456
|
></el-input-number>
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
:key="item.key || index"
|
|
459
459
|
:class="item.class"
|
|
460
460
|
v-if="item.element === 'text'"
|
|
461
|
-
:style="
|
|
461
|
+
:style="getActionBarItemStyle(item)"
|
|
462
462
|
v-on="item.events"
|
|
463
463
|
v-bind="item.attr"
|
|
464
464
|
>
|
|
@@ -1156,6 +1156,15 @@ const sort = (prop, order) => {
|
|
|
1156
1156
|
elTableRef.value?.sort(prop, order)
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
|
+
const getActionBarItemStyle = (item: {style: Record<string, any>}, additionStyle: Record<string, any>) => {
|
|
1160
|
+
return {
|
|
1161
|
+
// action默认右边距为8px
|
|
1162
|
+
marginRight: '8px',
|
|
1163
|
+
...(additionStyle || {}),
|
|
1164
|
+
...(item.style || {})
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1159
1168
|
const headerDragend = async (newWidth, oldWidth, column, event) => {
|
|
1160
1169
|
await nextTick()
|
|
1161
1170
|
const minWidth = getMinWidth(column)
|