@tmagic/form 1.0.0 → 1.0.3
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/dist/style.css +3 -0
- package/dist/tmagic-form.es.js +226 -228
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +228 -230
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Fieldset.vue.d.ts +54 -31
- package/dist/types/src/containers/Table.vue.d.ts +778 -0
- package/dist/types/src/containers/Tabs.vue.d.ts +2 -0
- package/dist/types/src/fields/SelectOptionGroups.vue.d.ts +13 -0
- package/dist/types/src/fields/SelectOptions.vue.d.ts +21 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/schema.d.ts +10 -1
- package/package.json +8 -9
- package/src/containers/Fieldset.vue +45 -73
- package/src/containers/GroupList.vue +4 -0
- package/src/containers/Table.vue +2 -19
- package/src/containers/Tabs.vue +11 -2
- package/src/fields/Cascader.vue +2 -1
- package/src/fields/DateTime.vue +1 -1
- package/src/fields/Daterange.vue +1 -1
- package/src/fields/Select.vue +10 -23
- package/src/fields/SelectOptionGroups.vue +20 -0
- package/src/fields/SelectOptions.vue +18 -0
- package/src/index.ts +1 -1
- package/src/schema.ts +10 -1
- package/src/theme/fieldset.scss +4 -0
- package/src/utils/form.ts +4 -13
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
import type { DebouncedFunc } from 'lodash-es';
|
|
2
|
+
import type { default } from 'element-plus/es/components/table/src/table-layout';
|
|
3
|
+
import type { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
|
|
4
|
+
import type { SummaryMethod, ColumnCls, ColumnStyle, Sort, TreeNode, Table } from 'element-plus/es/components/table/src/table/defaults';
|
|
5
|
+
import type { DefineComponent, Ref, ComponentInternalInstance, CSSProperties, ExtractPropTypes, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, EmitsOptions, PropType } from 'vue';
|
|
6
|
+
import type { Translator, UploadFile } from 'element-plus';
|
|
7
|
+
import { ColumnConfig, FormState, SortProp, TableConfig } from '../schema';
|
|
8
|
+
declare const _default: DefineComponent<{
|
|
9
|
+
name: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
model: {
|
|
14
|
+
type: ObjectConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
default: () => {};
|
|
17
|
+
};
|
|
18
|
+
config: {
|
|
19
|
+
type: PropType<TableConfig>;
|
|
20
|
+
required: true;
|
|
21
|
+
default: () => {};
|
|
22
|
+
};
|
|
23
|
+
prop: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
};
|
|
26
|
+
labelWidth: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
sort: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
sortKey: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
size: StringConstructor;
|
|
41
|
+
enableToggleMode: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
mForm: FormState | undefined;
|
|
47
|
+
pagesize: Ref<number>;
|
|
48
|
+
pagecontext: Ref<number>;
|
|
49
|
+
foreUpdate: () => void;
|
|
50
|
+
isFullscreen: Ref<boolean>;
|
|
51
|
+
elTable: Ref<({
|
|
52
|
+
$: ComponentInternalInstance;
|
|
53
|
+
$data: {};
|
|
54
|
+
$props: Partial<{
|
|
55
|
+
lazy: boolean;
|
|
56
|
+
style: CSSProperties;
|
|
57
|
+
className: string;
|
|
58
|
+
border: boolean;
|
|
59
|
+
tableLayout: "fixed" | "auto";
|
|
60
|
+
data: any[];
|
|
61
|
+
fit: boolean;
|
|
62
|
+
scrollbarAlwaysOn: boolean;
|
|
63
|
+
stripe: boolean;
|
|
64
|
+
treeProps: {
|
|
65
|
+
hasChildren?: string | undefined;
|
|
66
|
+
children?: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
showHeader: boolean;
|
|
69
|
+
showSummary: boolean;
|
|
70
|
+
highlightCurrentRow: boolean;
|
|
71
|
+
defaultExpandAll: boolean;
|
|
72
|
+
selectOnIndeterminate: boolean;
|
|
73
|
+
indent: number;
|
|
74
|
+
flexible: boolean;
|
|
75
|
+
}> & Omit<Readonly<ExtractPropTypes<{
|
|
76
|
+
data: {
|
|
77
|
+
type: PropType<any[]>;
|
|
78
|
+
default: () => never[];
|
|
79
|
+
};
|
|
80
|
+
size: StringConstructor;
|
|
81
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
82
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
83
|
+
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
84
|
+
fit: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
stripe: BooleanConstructor;
|
|
89
|
+
border: BooleanConstructor;
|
|
90
|
+
rowKey: PropType<string | ((row: any) => string) | undefined>;
|
|
91
|
+
showHeader: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
showSummary: BooleanConstructor;
|
|
96
|
+
sumText: StringConstructor;
|
|
97
|
+
summaryMethod: PropType<SummaryMethod<any> | undefined>;
|
|
98
|
+
rowClassName: PropType<ColumnCls<any> | undefined>;
|
|
99
|
+
rowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
100
|
+
cellClassName: PropType<string | ((data: {
|
|
101
|
+
row: any;
|
|
102
|
+
rowIndex: number;
|
|
103
|
+
column: TableColumnCtx<any>;
|
|
104
|
+
columnIndex: number;
|
|
105
|
+
}) => string) | undefined>;
|
|
106
|
+
cellStyle: PropType<CSSProperties | ((data: {
|
|
107
|
+
row: any;
|
|
108
|
+
rowIndex: number;
|
|
109
|
+
column: TableColumnCtx<any>;
|
|
110
|
+
columnIndex: number;
|
|
111
|
+
}) => CSSProperties) | undefined>;
|
|
112
|
+
headerRowClassName: PropType<ColumnCls<any> | undefined>;
|
|
113
|
+
headerRowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
114
|
+
headerCellClassName: PropType<string | ((data: {
|
|
115
|
+
row: any;
|
|
116
|
+
rowIndex: number;
|
|
117
|
+
column: TableColumnCtx<any>;
|
|
118
|
+
columnIndex: number;
|
|
119
|
+
}) => string) | undefined>;
|
|
120
|
+
headerCellStyle: PropType<CSSProperties | ((data: {
|
|
121
|
+
row: any;
|
|
122
|
+
rowIndex: number;
|
|
123
|
+
column: TableColumnCtx<any>;
|
|
124
|
+
columnIndex: number;
|
|
125
|
+
}) => CSSProperties) | undefined>;
|
|
126
|
+
highlightCurrentRow: BooleanConstructor;
|
|
127
|
+
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
128
|
+
emptyText: StringConstructor;
|
|
129
|
+
expandRowKeys: PropType<any[] | undefined>;
|
|
130
|
+
defaultExpandAll: BooleanConstructor;
|
|
131
|
+
defaultSort: PropType<Sort | undefined>;
|
|
132
|
+
tooltipEffect: StringConstructor;
|
|
133
|
+
spanMethod: PropType<((data: {
|
|
134
|
+
row: any;
|
|
135
|
+
rowIndex: number;
|
|
136
|
+
column: TableColumnCtx<any>;
|
|
137
|
+
columnIndex: number;
|
|
138
|
+
}) => number[] | {
|
|
139
|
+
rowspan: number;
|
|
140
|
+
colspan: number;
|
|
141
|
+
}) | undefined>;
|
|
142
|
+
selectOnIndeterminate: {
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
|
+
indent: {
|
|
147
|
+
type: NumberConstructor;
|
|
148
|
+
default: number;
|
|
149
|
+
};
|
|
150
|
+
treeProps: {
|
|
151
|
+
type: PropType<{
|
|
152
|
+
hasChildren?: string | undefined;
|
|
153
|
+
children?: string | undefined;
|
|
154
|
+
} | undefined>;
|
|
155
|
+
default: () => {
|
|
156
|
+
hasChildren: string;
|
|
157
|
+
children: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
lazy: BooleanConstructor;
|
|
161
|
+
load: PropType<((row: any, treeNode: TreeNode, resolve: (data: any[]) => void) => void) | undefined>;
|
|
162
|
+
style: {
|
|
163
|
+
type: PropType<CSSProperties>;
|
|
164
|
+
default: () => {};
|
|
165
|
+
};
|
|
166
|
+
className: {
|
|
167
|
+
type: StringConstructor;
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
tableLayout: {
|
|
171
|
+
type: PropType<"fixed" | "auto">;
|
|
172
|
+
default: string;
|
|
173
|
+
};
|
|
174
|
+
scrollbarAlwaysOn: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
default: boolean;
|
|
177
|
+
};
|
|
178
|
+
flexible: BooleanConstructor;
|
|
179
|
+
}>> & {
|
|
180
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
181
|
+
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
182
|
+
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
183
|
+
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
184
|
+
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
185
|
+
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
186
|
+
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
187
|
+
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
188
|
+
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
190
|
+
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
191
|
+
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
192
|
+
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
193
|
+
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
194
|
+
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
195
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
196
|
+
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
197
|
+
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
198
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "className" | "border" | "lazy" | "style" | "data" | "fit" | "stripe" | "showHeader" | "showSummary" | "highlightCurrentRow" | "defaultExpandAll" | "selectOnIndeterminate" | "indent" | "treeProps" | "tableLayout" | "scrollbarAlwaysOn" | "flexible">;
|
|
199
|
+
$attrs: {
|
|
200
|
+
[x: string]: unknown;
|
|
201
|
+
};
|
|
202
|
+
$refs: {
|
|
203
|
+
[x: string]: unknown;
|
|
204
|
+
};
|
|
205
|
+
$slots: Readonly<{
|
|
206
|
+
[name: string]: Slot | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
$root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
209
|
+
$parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
210
|
+
$emit: (event: "select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend", ...args: any[]) => void;
|
|
211
|
+
$el: any;
|
|
212
|
+
$options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
|
|
213
|
+
data: {
|
|
214
|
+
type: PropType<any[]>;
|
|
215
|
+
default: () => never[];
|
|
216
|
+
};
|
|
217
|
+
size: StringConstructor;
|
|
218
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
219
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
220
|
+
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
221
|
+
fit: {
|
|
222
|
+
type: BooleanConstructor;
|
|
223
|
+
default: boolean;
|
|
224
|
+
};
|
|
225
|
+
stripe: BooleanConstructor;
|
|
226
|
+
border: BooleanConstructor;
|
|
227
|
+
rowKey: PropType<string | ((row: any) => string) | undefined>;
|
|
228
|
+
showHeader: {
|
|
229
|
+
type: BooleanConstructor;
|
|
230
|
+
default: boolean;
|
|
231
|
+
};
|
|
232
|
+
showSummary: BooleanConstructor;
|
|
233
|
+
sumText: StringConstructor;
|
|
234
|
+
summaryMethod: PropType<SummaryMethod<any> | undefined>;
|
|
235
|
+
rowClassName: PropType<ColumnCls<any> | undefined>;
|
|
236
|
+
rowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
237
|
+
cellClassName: PropType<string | ((data: {
|
|
238
|
+
row: any;
|
|
239
|
+
rowIndex: number;
|
|
240
|
+
column: TableColumnCtx<any>;
|
|
241
|
+
columnIndex: number;
|
|
242
|
+
}) => string) | undefined>;
|
|
243
|
+
cellStyle: PropType<CSSProperties | ((data: {
|
|
244
|
+
row: any;
|
|
245
|
+
rowIndex: number;
|
|
246
|
+
column: TableColumnCtx<any>;
|
|
247
|
+
columnIndex: number;
|
|
248
|
+
}) => CSSProperties) | undefined>;
|
|
249
|
+
headerRowClassName: PropType<ColumnCls<any> | undefined>;
|
|
250
|
+
headerRowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
251
|
+
headerCellClassName: PropType<string | ((data: {
|
|
252
|
+
row: any;
|
|
253
|
+
rowIndex: number;
|
|
254
|
+
column: TableColumnCtx<any>;
|
|
255
|
+
columnIndex: number;
|
|
256
|
+
}) => string) | undefined>;
|
|
257
|
+
headerCellStyle: PropType<CSSProperties | ((data: {
|
|
258
|
+
row: any;
|
|
259
|
+
rowIndex: number;
|
|
260
|
+
column: TableColumnCtx<any>;
|
|
261
|
+
columnIndex: number;
|
|
262
|
+
}) => CSSProperties) | undefined>;
|
|
263
|
+
highlightCurrentRow: BooleanConstructor;
|
|
264
|
+
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
265
|
+
emptyText: StringConstructor;
|
|
266
|
+
expandRowKeys: PropType<any[] | undefined>;
|
|
267
|
+
defaultExpandAll: BooleanConstructor;
|
|
268
|
+
defaultSort: PropType<Sort | undefined>;
|
|
269
|
+
tooltipEffect: StringConstructor;
|
|
270
|
+
spanMethod: PropType<((data: {
|
|
271
|
+
row: any;
|
|
272
|
+
rowIndex: number;
|
|
273
|
+
column: TableColumnCtx<any>;
|
|
274
|
+
columnIndex: number;
|
|
275
|
+
}) => number[] | {
|
|
276
|
+
rowspan: number;
|
|
277
|
+
colspan: number;
|
|
278
|
+
}) | undefined>;
|
|
279
|
+
selectOnIndeterminate: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: boolean;
|
|
282
|
+
};
|
|
283
|
+
indent: {
|
|
284
|
+
type: NumberConstructor;
|
|
285
|
+
default: number;
|
|
286
|
+
};
|
|
287
|
+
treeProps: {
|
|
288
|
+
type: PropType<{
|
|
289
|
+
hasChildren?: string | undefined;
|
|
290
|
+
children?: string | undefined;
|
|
291
|
+
} | undefined>;
|
|
292
|
+
default: () => {
|
|
293
|
+
hasChildren: string;
|
|
294
|
+
children: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
lazy: BooleanConstructor;
|
|
298
|
+
load: PropType<((row: any, treeNode: TreeNode, resolve: (data: any[]) => void) => void) | undefined>;
|
|
299
|
+
style: {
|
|
300
|
+
type: PropType<CSSProperties>;
|
|
301
|
+
default: () => {};
|
|
302
|
+
};
|
|
303
|
+
className: {
|
|
304
|
+
type: StringConstructor;
|
|
305
|
+
default: string;
|
|
306
|
+
};
|
|
307
|
+
tableLayout: {
|
|
308
|
+
type: PropType<"fixed" | "auto">;
|
|
309
|
+
default: string;
|
|
310
|
+
};
|
|
311
|
+
scrollbarAlwaysOn: {
|
|
312
|
+
type: BooleanConstructor;
|
|
313
|
+
default: boolean;
|
|
314
|
+
};
|
|
315
|
+
flexible: BooleanConstructor;
|
|
316
|
+
}>> & {
|
|
317
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
318
|
+
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
319
|
+
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
320
|
+
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
321
|
+
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
322
|
+
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
323
|
+
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
324
|
+
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
325
|
+
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
326
|
+
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
327
|
+
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
328
|
+
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
329
|
+
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
330
|
+
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
331
|
+
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
332
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
333
|
+
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
334
|
+
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
335
|
+
}, {
|
|
336
|
+
ns: {
|
|
337
|
+
namespace: ComputedRef<string>;
|
|
338
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
339
|
+
e: (element?: string | undefined) => string;
|
|
340
|
+
m: (modifier?: string | undefined) => string;
|
|
341
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
342
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
343
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
344
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
345
|
+
is: {
|
|
346
|
+
(name: string, state: boolean | undefined): string;
|
|
347
|
+
(name: string): string;
|
|
348
|
+
};
|
|
349
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
350
|
+
cssVarName: (name: string) => string;
|
|
351
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
352
|
+
cssVarBlockName: (name: string) => string;
|
|
353
|
+
};
|
|
354
|
+
layout: default<any>;
|
|
355
|
+
store: any;
|
|
356
|
+
handleHeaderFooterMousewheel: (event: any, data: any) => void;
|
|
357
|
+
handleMouseLeave: () => void;
|
|
358
|
+
tableId: string;
|
|
359
|
+
tableSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
360
|
+
isHidden: Ref<boolean>;
|
|
361
|
+
isEmpty: ComputedRef<boolean>;
|
|
362
|
+
renderExpanded: Ref<null>;
|
|
363
|
+
resizeProxyVisible: Ref<boolean>;
|
|
364
|
+
resizeState: Ref<{
|
|
365
|
+
width: number | null;
|
|
366
|
+
height: number | null;
|
|
367
|
+
}>;
|
|
368
|
+
isGroup: Ref<boolean>;
|
|
369
|
+
bodyWidth: ComputedRef<string>;
|
|
370
|
+
bodyHeight: ComputedRef<{
|
|
371
|
+
height: string;
|
|
372
|
+
'max-height'?: undefined;
|
|
373
|
+
} | {
|
|
374
|
+
'max-height': string;
|
|
375
|
+
height?: undefined;
|
|
376
|
+
} | {
|
|
377
|
+
height?: undefined;
|
|
378
|
+
'max-height'?: undefined;
|
|
379
|
+
}>;
|
|
380
|
+
height: ComputedRef<string | number | undefined>;
|
|
381
|
+
tableBodyStyles: ComputedRef<{
|
|
382
|
+
width: string;
|
|
383
|
+
}>;
|
|
384
|
+
emptyBlockStyle: ComputedRef<{
|
|
385
|
+
width: string;
|
|
386
|
+
height: string;
|
|
387
|
+
} | null>;
|
|
388
|
+
debouncedUpdateLayout: DebouncedFunc<() => void>;
|
|
389
|
+
handleFixedMousewheel: (event: any, data: any) => void;
|
|
390
|
+
fixedHeight: ComputedRef<{
|
|
391
|
+
bottom: number;
|
|
392
|
+
height?: undefined;
|
|
393
|
+
} | {
|
|
394
|
+
bottom: string;
|
|
395
|
+
height?: undefined;
|
|
396
|
+
} | {
|
|
397
|
+
height: string;
|
|
398
|
+
bottom?: undefined;
|
|
399
|
+
}>;
|
|
400
|
+
fixedBodyHeight: ComputedRef<{
|
|
401
|
+
height: string;
|
|
402
|
+
'max-height'?: undefined;
|
|
403
|
+
} | {
|
|
404
|
+
'max-height': string;
|
|
405
|
+
height?: undefined;
|
|
406
|
+
} | {
|
|
407
|
+
height?: undefined;
|
|
408
|
+
'max-height'?: undefined;
|
|
409
|
+
}>;
|
|
410
|
+
setCurrentRow: (row: any) => void;
|
|
411
|
+
getSelectionRows: () => any;
|
|
412
|
+
toggleRowSelection: (row: any, selected: boolean) => void;
|
|
413
|
+
clearSelection: () => void;
|
|
414
|
+
clearFilter: (columnKeys: string[]) => void;
|
|
415
|
+
toggleAllSelection: () => void;
|
|
416
|
+
toggleRowExpansion: (row: any, expanded: boolean) => void;
|
|
417
|
+
clearSort: () => void;
|
|
418
|
+
doLayout: () => void;
|
|
419
|
+
sort: (prop: string, order: string) => void;
|
|
420
|
+
t: Translator;
|
|
421
|
+
setDragVisible: (visible: boolean) => void;
|
|
422
|
+
context: Table<any>;
|
|
423
|
+
computedSumText: ComputedRef<string>;
|
|
424
|
+
computedEmptyText: ComputedRef<string>;
|
|
425
|
+
tableLayout: ComputedRef<"fixed" | "auto">;
|
|
426
|
+
scrollbarViewStyle: {
|
|
427
|
+
display: string;
|
|
428
|
+
verticalAlign: string;
|
|
429
|
+
};
|
|
430
|
+
scrollBarRef: Ref<any>;
|
|
431
|
+
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
432
|
+
setScrollLeft: (left?: number | undefined) => void;
|
|
433
|
+
setScrollTop: (top?: number | undefined) => void;
|
|
434
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("select" | "select-all" | "expand-change" | "current-change" | "selection-change" | "cell-mouse-enter" | "cell-mouse-leave" | "cell-contextmenu" | "cell-click" | "cell-dblclick" | "row-click" | "row-contextmenu" | "row-dblclick" | "header-click" | "header-contextmenu" | "sort-change" | "filter-change" | "header-dragend")[], string, {
|
|
435
|
+
lazy: boolean;
|
|
436
|
+
style: CSSProperties;
|
|
437
|
+
className: string;
|
|
438
|
+
border: boolean;
|
|
439
|
+
tableLayout: "fixed" | "auto";
|
|
440
|
+
data: any[];
|
|
441
|
+
fit: boolean;
|
|
442
|
+
scrollbarAlwaysOn: boolean;
|
|
443
|
+
stripe: boolean;
|
|
444
|
+
treeProps: {
|
|
445
|
+
hasChildren?: string | undefined;
|
|
446
|
+
children?: string | undefined;
|
|
447
|
+
} | undefined;
|
|
448
|
+
showHeader: boolean;
|
|
449
|
+
showSummary: boolean;
|
|
450
|
+
highlightCurrentRow: boolean;
|
|
451
|
+
defaultExpandAll: boolean;
|
|
452
|
+
selectOnIndeterminate: boolean;
|
|
453
|
+
indent: number;
|
|
454
|
+
flexible: boolean;
|
|
455
|
+
}> & {
|
|
456
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
457
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
458
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
459
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
460
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
461
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
462
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
463
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
464
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
465
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
466
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
467
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
468
|
+
renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
469
|
+
renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
470
|
+
errorCaptured?: (((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
471
|
+
};
|
|
472
|
+
$forceUpdate: () => void;
|
|
473
|
+
$nextTick: typeof nextTick;
|
|
474
|
+
$watch(source: string | Function, cb: Function, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
475
|
+
} & Readonly<ExtractPropTypes<{
|
|
476
|
+
data: {
|
|
477
|
+
type: PropType<any[]>;
|
|
478
|
+
default: () => never[];
|
|
479
|
+
};
|
|
480
|
+
size: StringConstructor;
|
|
481
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
482
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
483
|
+
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
484
|
+
fit: {
|
|
485
|
+
type: BooleanConstructor;
|
|
486
|
+
default: boolean;
|
|
487
|
+
};
|
|
488
|
+
stripe: BooleanConstructor;
|
|
489
|
+
border: BooleanConstructor;
|
|
490
|
+
rowKey: PropType<string | ((row: any) => string) | undefined>;
|
|
491
|
+
showHeader: {
|
|
492
|
+
type: BooleanConstructor;
|
|
493
|
+
default: boolean;
|
|
494
|
+
};
|
|
495
|
+
showSummary: BooleanConstructor;
|
|
496
|
+
sumText: StringConstructor;
|
|
497
|
+
summaryMethod: PropType<SummaryMethod<any> | undefined>;
|
|
498
|
+
rowClassName: PropType<ColumnCls<any> | undefined>;
|
|
499
|
+
rowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
500
|
+
cellClassName: PropType<string | ((data: {
|
|
501
|
+
row: any;
|
|
502
|
+
rowIndex: number;
|
|
503
|
+
column: TableColumnCtx<any>;
|
|
504
|
+
columnIndex: number;
|
|
505
|
+
}) => string) | undefined>;
|
|
506
|
+
cellStyle: PropType<CSSProperties | ((data: {
|
|
507
|
+
row: any;
|
|
508
|
+
rowIndex: number;
|
|
509
|
+
column: TableColumnCtx<any>;
|
|
510
|
+
columnIndex: number;
|
|
511
|
+
}) => CSSProperties) | undefined>;
|
|
512
|
+
headerRowClassName: PropType<ColumnCls<any> | undefined>;
|
|
513
|
+
headerRowStyle: PropType<ColumnStyle<any> | undefined>;
|
|
514
|
+
headerCellClassName: PropType<string | ((data: {
|
|
515
|
+
row: any;
|
|
516
|
+
rowIndex: number;
|
|
517
|
+
column: TableColumnCtx<any>;
|
|
518
|
+
columnIndex: number;
|
|
519
|
+
}) => string) | undefined>;
|
|
520
|
+
headerCellStyle: PropType<CSSProperties | ((data: {
|
|
521
|
+
row: any;
|
|
522
|
+
rowIndex: number;
|
|
523
|
+
column: TableColumnCtx<any>;
|
|
524
|
+
columnIndex: number;
|
|
525
|
+
}) => CSSProperties) | undefined>;
|
|
526
|
+
highlightCurrentRow: BooleanConstructor;
|
|
527
|
+
currentRowKey: (StringConstructor | NumberConstructor)[];
|
|
528
|
+
emptyText: StringConstructor;
|
|
529
|
+
expandRowKeys: PropType<any[] | undefined>;
|
|
530
|
+
defaultExpandAll: BooleanConstructor;
|
|
531
|
+
defaultSort: PropType<Sort | undefined>;
|
|
532
|
+
tooltipEffect: StringConstructor;
|
|
533
|
+
spanMethod: PropType<((data: {
|
|
534
|
+
row: any;
|
|
535
|
+
rowIndex: number;
|
|
536
|
+
column: TableColumnCtx<any>;
|
|
537
|
+
columnIndex: number;
|
|
538
|
+
}) => number[] | {
|
|
539
|
+
rowspan: number;
|
|
540
|
+
colspan: number;
|
|
541
|
+
}) | undefined>;
|
|
542
|
+
selectOnIndeterminate: {
|
|
543
|
+
type: BooleanConstructor;
|
|
544
|
+
default: boolean;
|
|
545
|
+
};
|
|
546
|
+
indent: {
|
|
547
|
+
type: NumberConstructor;
|
|
548
|
+
default: number;
|
|
549
|
+
};
|
|
550
|
+
treeProps: {
|
|
551
|
+
type: PropType<{
|
|
552
|
+
hasChildren?: string | undefined;
|
|
553
|
+
children?: string | undefined;
|
|
554
|
+
} | undefined>;
|
|
555
|
+
default: () => {
|
|
556
|
+
hasChildren: string;
|
|
557
|
+
children: string;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
lazy: BooleanConstructor;
|
|
561
|
+
load: PropType<((row: any, treeNode: TreeNode, resolve: (data: any[]) => void) => void) | undefined>;
|
|
562
|
+
style: {
|
|
563
|
+
type: PropType<CSSProperties>;
|
|
564
|
+
default: () => {};
|
|
565
|
+
};
|
|
566
|
+
className: {
|
|
567
|
+
type: StringConstructor;
|
|
568
|
+
default: string;
|
|
569
|
+
};
|
|
570
|
+
tableLayout: {
|
|
571
|
+
type: PropType<"fixed" | "auto">;
|
|
572
|
+
default: string;
|
|
573
|
+
};
|
|
574
|
+
scrollbarAlwaysOn: {
|
|
575
|
+
type: BooleanConstructor;
|
|
576
|
+
default: boolean;
|
|
577
|
+
};
|
|
578
|
+
flexible: BooleanConstructor;
|
|
579
|
+
}>> & {
|
|
580
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
581
|
+
"onExpand-change"?: ((...args: any[]) => any) | undefined;
|
|
582
|
+
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
583
|
+
"onSelect-all"?: ((...args: any[]) => any) | undefined;
|
|
584
|
+
"onSelection-change"?: ((...args: any[]) => any) | undefined;
|
|
585
|
+
"onCell-mouse-enter"?: ((...args: any[]) => any) | undefined;
|
|
586
|
+
"onCell-mouse-leave"?: ((...args: any[]) => any) | undefined;
|
|
587
|
+
"onCell-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
588
|
+
"onCell-click"?: ((...args: any[]) => any) | undefined;
|
|
589
|
+
"onCell-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
590
|
+
"onRow-click"?: ((...args: any[]) => any) | undefined;
|
|
591
|
+
"onRow-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
592
|
+
"onRow-dblclick"?: ((...args: any[]) => any) | undefined;
|
|
593
|
+
"onHeader-click"?: ((...args: any[]) => any) | undefined;
|
|
594
|
+
"onHeader-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
595
|
+
"onSort-change"?: ((...args: any[]) => any) | undefined;
|
|
596
|
+
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
597
|
+
"onHeader-dragend"?: ((...args: any[]) => any) | undefined;
|
|
598
|
+
} & ShallowUnwrapRef<{
|
|
599
|
+
ns: {
|
|
600
|
+
namespace: ComputedRef<string>;
|
|
601
|
+
b: (blockSuffix?: string | undefined) => string;
|
|
602
|
+
e: (element?: string | undefined) => string;
|
|
603
|
+
m: (modifier?: string | undefined) => string;
|
|
604
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
605
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
606
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
607
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
608
|
+
is: {
|
|
609
|
+
(name: string, state: boolean | undefined): string;
|
|
610
|
+
(name: string): string;
|
|
611
|
+
};
|
|
612
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
613
|
+
cssVarName: (name: string) => string;
|
|
614
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
615
|
+
cssVarBlockName: (name: string) => string;
|
|
616
|
+
};
|
|
617
|
+
layout: default<any>;
|
|
618
|
+
store: any;
|
|
619
|
+
handleHeaderFooterMousewheel: (event: any, data: any) => void;
|
|
620
|
+
handleMouseLeave: () => void;
|
|
621
|
+
tableId: string;
|
|
622
|
+
tableSize: ComputedRef<"" | "small" | "default" | "large">;
|
|
623
|
+
isHidden: Ref<boolean>;
|
|
624
|
+
isEmpty: ComputedRef<boolean>;
|
|
625
|
+
renderExpanded: Ref<null>;
|
|
626
|
+
resizeProxyVisible: Ref<boolean>;
|
|
627
|
+
resizeState: Ref<{
|
|
628
|
+
width: number | null;
|
|
629
|
+
height: number | null;
|
|
630
|
+
}>;
|
|
631
|
+
isGroup: Ref<boolean>;
|
|
632
|
+
bodyWidth: ComputedRef<string>;
|
|
633
|
+
bodyHeight: ComputedRef<{
|
|
634
|
+
height: string;
|
|
635
|
+
'max-height'?: undefined;
|
|
636
|
+
} | {
|
|
637
|
+
'max-height': string;
|
|
638
|
+
height?: undefined;
|
|
639
|
+
} | {
|
|
640
|
+
height?: undefined;
|
|
641
|
+
'max-height'?: undefined;
|
|
642
|
+
}>;
|
|
643
|
+
height: ComputedRef<string | number | undefined>;
|
|
644
|
+
tableBodyStyles: ComputedRef<{
|
|
645
|
+
width: string;
|
|
646
|
+
}>;
|
|
647
|
+
emptyBlockStyle: ComputedRef<{
|
|
648
|
+
width: string;
|
|
649
|
+
height: string;
|
|
650
|
+
} | null>;
|
|
651
|
+
debouncedUpdateLayout: DebouncedFunc<() => void>;
|
|
652
|
+
handleFixedMousewheel: (event: any, data: any) => void;
|
|
653
|
+
fixedHeight: ComputedRef<{
|
|
654
|
+
bottom: number;
|
|
655
|
+
height?: undefined;
|
|
656
|
+
} | {
|
|
657
|
+
bottom: string;
|
|
658
|
+
height?: undefined;
|
|
659
|
+
} | {
|
|
660
|
+
height: string;
|
|
661
|
+
bottom?: undefined;
|
|
662
|
+
}>;
|
|
663
|
+
fixedBodyHeight: ComputedRef<{
|
|
664
|
+
height: string;
|
|
665
|
+
'max-height'?: undefined;
|
|
666
|
+
} | {
|
|
667
|
+
'max-height': string;
|
|
668
|
+
height?: undefined;
|
|
669
|
+
} | {
|
|
670
|
+
height?: undefined;
|
|
671
|
+
'max-height'?: undefined;
|
|
672
|
+
}>;
|
|
673
|
+
setCurrentRow: (row: any) => void;
|
|
674
|
+
getSelectionRows: () => any;
|
|
675
|
+
toggleRowSelection: (row: any, selected: boolean) => void;
|
|
676
|
+
clearSelection: () => void;
|
|
677
|
+
clearFilter: (columnKeys: string[]) => void;
|
|
678
|
+
toggleAllSelection: () => void;
|
|
679
|
+
toggleRowExpansion: (row: any, expanded: boolean) => void;
|
|
680
|
+
clearSort: () => void;
|
|
681
|
+
doLayout: () => void;
|
|
682
|
+
sort: (prop: string, order: string) => void;
|
|
683
|
+
t: Translator;
|
|
684
|
+
setDragVisible: (visible: boolean) => void;
|
|
685
|
+
context: Table<any>;
|
|
686
|
+
computedSumText: ComputedRef<string>;
|
|
687
|
+
computedEmptyText: ComputedRef<string>;
|
|
688
|
+
tableLayout: ComputedRef<"fixed" | "auto">;
|
|
689
|
+
scrollbarViewStyle: {
|
|
690
|
+
display: string;
|
|
691
|
+
verticalAlign: string;
|
|
692
|
+
};
|
|
693
|
+
scrollBarRef: Ref<any>;
|
|
694
|
+
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
695
|
+
setScrollLeft: (left?: number | undefined) => void;
|
|
696
|
+
setScrollTop: (top?: number | undefined) => void;
|
|
697
|
+
}> & {} & ComponentCustomProperties) | undefined>;
|
|
698
|
+
mTable: Ref<HTMLDivElement | undefined>;
|
|
699
|
+
excelBtn: Ref<any>;
|
|
700
|
+
modelName: ComputedRef<string | number>;
|
|
701
|
+
updateKey: Ref<number>;
|
|
702
|
+
ArrowDown: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
|
703
|
+
ArrowUp: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
|
704
|
+
Delete: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
|
705
|
+
FullScreen: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
|
706
|
+
Grid: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{}>, {}>;
|
|
707
|
+
data: ComputedRef<any>;
|
|
708
|
+
addable: ComputedRef<boolean | "undefined">;
|
|
709
|
+
selection: ComputedRef<boolean | "single" | undefined>;
|
|
710
|
+
importable: ComputedRef<boolean | "undefined">;
|
|
711
|
+
sortChange: ({ prop, order }: SortProp) => void;
|
|
712
|
+
display(fuc: any): any;
|
|
713
|
+
itemExtra(fuc: any, index: number): any;
|
|
714
|
+
newHandler: (row?: any) => Promise<void>;
|
|
715
|
+
removeHandler(index: number): void;
|
|
716
|
+
selectHandle(selection: any, row: any): void;
|
|
717
|
+
toggleRowSelection(row: any, selected: boolean): void;
|
|
718
|
+
makeConfig(config: ColumnConfig): ColumnConfig;
|
|
719
|
+
upHandler(index: number): void;
|
|
720
|
+
topHandler(index: number): void;
|
|
721
|
+
downHandler(index: number): void;
|
|
722
|
+
bottomHandler(index: number): void;
|
|
723
|
+
showDelete(index: number): boolean;
|
|
724
|
+
clearHandler(): void;
|
|
725
|
+
excelHandler(file: UploadFile): false;
|
|
726
|
+
handleSizeChange(val: number): void;
|
|
727
|
+
handleCurrentChange(val: number): void;
|
|
728
|
+
toggleMode(): void;
|
|
729
|
+
toggleFullscreen(): void;
|
|
730
|
+
getProp(index: number): string;
|
|
731
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("change" | "select")[], "change" | "select", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
732
|
+
name: {
|
|
733
|
+
type: StringConstructor;
|
|
734
|
+
required: true;
|
|
735
|
+
};
|
|
736
|
+
model: {
|
|
737
|
+
type: ObjectConstructor;
|
|
738
|
+
required: true;
|
|
739
|
+
default: () => {};
|
|
740
|
+
};
|
|
741
|
+
config: {
|
|
742
|
+
type: PropType<TableConfig>;
|
|
743
|
+
required: true;
|
|
744
|
+
default: () => {};
|
|
745
|
+
};
|
|
746
|
+
prop: {
|
|
747
|
+
type: StringConstructor;
|
|
748
|
+
};
|
|
749
|
+
labelWidth: {
|
|
750
|
+
type: StringConstructor;
|
|
751
|
+
};
|
|
752
|
+
sort: {
|
|
753
|
+
type: BooleanConstructor;
|
|
754
|
+
default: boolean;
|
|
755
|
+
};
|
|
756
|
+
sortKey: {
|
|
757
|
+
type: StringConstructor;
|
|
758
|
+
default: string;
|
|
759
|
+
};
|
|
760
|
+
text: {
|
|
761
|
+
type: StringConstructor;
|
|
762
|
+
};
|
|
763
|
+
size: StringConstructor;
|
|
764
|
+
enableToggleMode: {
|
|
765
|
+
type: BooleanConstructor;
|
|
766
|
+
default: boolean;
|
|
767
|
+
};
|
|
768
|
+
}>> & {
|
|
769
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
770
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
771
|
+
}, {
|
|
772
|
+
sort: boolean;
|
|
773
|
+
config: TableConfig;
|
|
774
|
+
model: Record<string, any>;
|
|
775
|
+
enableToggleMode: boolean;
|
|
776
|
+
sortKey: string;
|
|
777
|
+
}>;
|
|
778
|
+
export default _default;
|