el-plus-crud 0.0.78 → 0.0.80
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/CHANGELOG.md +4 -0
- package/dist/el-plus-crud.mjs +3830 -3864
- package/lib/components/el-plus-form/ElPlusForm.vue +2 -2
- package/lib/components/el-plus-form/components/ElPlusFormNumber.vue +152 -149
- package/lib/components/el-plus-table/ElPlusTable.vue +744 -807
- package/lib/components/el-plus-table/ElPlusTableColumn.vue +47 -0
- package/lib/components/el-plus-table/components/columnItem.vue +5 -3
- package/lib/components/el-plus-table/components/settingColumn.vue +172 -180
- package/lib/components/el-plus-table/util/index.ts +194 -148
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +468 -466
package/types/index.d.ts
CHANGED
|
@@ -1,466 +1,468 @@
|
|
|
1
|
-
// 基础类型
|
|
2
|
-
export type IBaseObj = IBaseObj
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 表单回调
|
|
6
|
-
*/
|
|
7
|
-
export interface IFormBack {
|
|
8
|
-
response?: any
|
|
9
|
-
formData?: IBaseObj
|
|
10
|
-
callBack: Function
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 按钮回调data
|
|
15
|
-
*/
|
|
16
|
-
export interface IBtnBack {
|
|
17
|
-
row: IBaseObj
|
|
18
|
-
callBack?: Function
|
|
19
|
-
field: string
|
|
20
|
-
rowIndex: number
|
|
21
|
-
files?: Array<any>
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 通用请求
|
|
26
|
-
*/
|
|
27
|
-
export interface IFetch<T> {
|
|
28
|
-
// 查询数据的方法,入参和返回格式固定
|
|
29
|
-
(data?: any): Promise<T | null>
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 表单描述
|
|
34
|
-
*/
|
|
35
|
-
export interface IFormDesc {
|
|
36
|
-
[key: string]: IFormDescItem
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 基础的descItem
|
|
41
|
-
*/
|
|
42
|
-
export type IDescItem = {
|
|
43
|
-
type?: string
|
|
44
|
-
label?: string | ((data?: any) => string)
|
|
45
|
-
prop?: string | ((data?: any) => string)
|
|
46
|
-
width?: string
|
|
47
|
-
format?: string | ((data?: any) => string)
|
|
48
|
-
vif?: boolean | ((data?: any) => boolean)
|
|
49
|
-
vshow?: boolean | ((data?: any) => boolean)
|
|
50
|
-
limit?: number
|
|
51
|
-
required?: boolean | ((data?: any) => boolean)
|
|
52
|
-
style?: IBaseObj | ((data?: any) => IBaseObj)
|
|
53
|
-
// 事件
|
|
54
|
-
on?: { [key: string]: Function }
|
|
55
|
-
// 查看详情
|
|
56
|
-
linkId?: string | ((val: any, formData: any) => string)
|
|
57
|
-
linkType?: string | ((val: any, formData: any) => string)
|
|
58
|
-
linkLabel?: string | ((val: any, formData: any) => string)
|
|
59
|
-
// 内部使用属性
|
|
60
|
-
_vif?: boolean
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
// key的前缀-方便同一个表单中,存在多个daterange等组件
|
|
106
|
-
propPrefix?: string
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* option描述
|
|
111
|
-
*/
|
|
112
|
-
export interface IFormDescItemOptionItem {
|
|
113
|
-
l?: string
|
|
114
|
-
v?: string | number
|
|
115
|
-
label?: string
|
|
116
|
-
value?: string | number
|
|
117
|
-
children?: Array<IFormDescItemOptionItem>
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* 表单配置
|
|
122
|
-
*/
|
|
123
|
-
export interface IFormConfig {
|
|
124
|
-
// 表单描述对象
|
|
125
|
-
formDesc: IFormDesc
|
|
126
|
-
// 表单的列数,默认是1
|
|
127
|
-
column?: number
|
|
128
|
-
// 提交前执行
|
|
129
|
-
beforeRequest?: (data?: any) => any
|
|
130
|
-
// 请求地址
|
|
131
|
-
requestFn?: (data?: any) => Promise<T>
|
|
132
|
-
// 更新的函数
|
|
133
|
-
updateFn?: (data?: any) => Promise<T>
|
|
134
|
-
// 请求成功时
|
|
135
|
-
success?: (data?: IFormBack) => any
|
|
136
|
-
// 成功时的提醒文本
|
|
137
|
-
successTip?: string | ((data?: any) => string)
|
|
138
|
-
// 列表的ref
|
|
139
|
-
tableRef?: any
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* group表单配置
|
|
144
|
-
*/
|
|
145
|
-
export interface IFormGroupConfig {
|
|
146
|
-
// 表单的列数,默认是1
|
|
147
|
-
column?: number
|
|
148
|
-
// 提交前执行
|
|
149
|
-
beforeRequest?: (data: T) => T
|
|
150
|
-
// 请求地址
|
|
151
|
-
requestFn?: (data?: any) => Promise<T>
|
|
152
|
-
// 更新的函数
|
|
153
|
-
updateFn?: (data?: any) => Promise<T>
|
|
154
|
-
// 请求成功时
|
|
155
|
-
success?: (data: IFormBack) => any
|
|
156
|
-
// 成功时的提醒文本
|
|
157
|
-
successTip?: string | ((data?: any) => string)
|
|
158
|
-
// 列表的ref
|
|
159
|
-
tableRef?: any
|
|
160
|
-
// 分组配置信息
|
|
161
|
-
group: Array<{
|
|
162
|
-
// 小标题
|
|
163
|
-
title?: string
|
|
164
|
-
// 表单的列数,默认是1
|
|
165
|
-
column?: number
|
|
166
|
-
// 表单描述对象
|
|
167
|
-
formDesc: IFormDesc
|
|
168
|
-
// 是否显示
|
|
169
|
-
vif?: boolean | ((data?: any) => boolean)
|
|
170
|
-
}>
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/************************************列表************************************ */
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* 表格项
|
|
177
|
-
*/
|
|
178
|
-
export interface IColumnItem extends IDescItem {
|
|
179
|
-
minWidth?: string
|
|
180
|
-
color?: string | Array<string>
|
|
181
|
-
align?: string
|
|
182
|
-
headerAlign?: string
|
|
183
|
-
btns?: Array<IColumnItem>
|
|
184
|
-
isBatch?: Boolean
|
|
185
|
-
fixed?: 'left' | 'right'
|
|
186
|
-
count?: number
|
|
187
|
-
nodes?: Array<any>
|
|
188
|
-
inline?: Boolean
|
|
189
|
-
text?: Boolean
|
|
190
|
-
|
|
191
|
-
scShow?: boolean
|
|
192
|
-
showOverflowTooltip?: boolean
|
|
193
|
-
content?: any
|
|
194
|
-
hstyle?: any
|
|
195
|
-
noHide?: boolean | ((data?: any) => boolean)
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
//
|
|
207
|
-
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
//
|
|
211
|
-
|
|
212
|
-
//
|
|
213
|
-
|
|
214
|
-
//
|
|
215
|
-
|
|
216
|
-
//
|
|
217
|
-
|
|
218
|
-
//
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
//
|
|
229
|
-
|
|
230
|
-
//
|
|
231
|
-
|
|
232
|
-
//
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
//
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
//
|
|
253
|
-
|
|
254
|
-
//
|
|
255
|
-
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
//
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
//
|
|
280
|
-
|
|
281
|
-
//
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
//
|
|
301
|
-
|
|
302
|
-
//
|
|
303
|
-
|
|
304
|
-
//
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
//
|
|
321
|
-
|
|
322
|
-
//
|
|
323
|
-
|
|
324
|
-
//
|
|
325
|
-
|
|
326
|
-
//
|
|
327
|
-
|
|
328
|
-
//
|
|
329
|
-
|
|
330
|
-
//
|
|
331
|
-
|
|
332
|
-
//
|
|
333
|
-
|
|
334
|
-
//
|
|
335
|
-
|
|
336
|
-
//
|
|
337
|
-
|
|
338
|
-
//
|
|
339
|
-
|
|
340
|
-
//
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
//
|
|
370
|
-
|
|
371
|
-
//
|
|
372
|
-
|
|
373
|
-
//
|
|
374
|
-
|
|
375
|
-
//
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
//
|
|
388
|
-
|
|
389
|
-
//
|
|
390
|
-
|
|
391
|
-
//
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
//
|
|
402
|
-
|
|
403
|
-
//
|
|
404
|
-
|
|
405
|
-
//
|
|
406
|
-
|
|
407
|
-
//
|
|
408
|
-
|
|
409
|
-
//
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
//
|
|
420
|
-
|
|
421
|
-
//
|
|
422
|
-
|
|
423
|
-
//
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
1
|
+
// 基础类型
|
|
2
|
+
export type IBaseObj = IBaseObj
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 表单回调
|
|
6
|
+
*/
|
|
7
|
+
export interface IFormBack {
|
|
8
|
+
response?: any
|
|
9
|
+
formData?: IBaseObj
|
|
10
|
+
callBack: Function
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 按钮回调data
|
|
15
|
+
*/
|
|
16
|
+
export interface IBtnBack {
|
|
17
|
+
row: IBaseObj
|
|
18
|
+
callBack?: Function
|
|
19
|
+
field: string
|
|
20
|
+
rowIndex: number
|
|
21
|
+
files?: Array<any>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 通用请求
|
|
26
|
+
*/
|
|
27
|
+
export interface IFetch<T> {
|
|
28
|
+
// 查询数据的方法,入参和返回格式固定
|
|
29
|
+
(data?: any): Promise<T | null>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 表单描述
|
|
34
|
+
*/
|
|
35
|
+
export interface IFormDesc {
|
|
36
|
+
[key: string]: IFormDescItem
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 基础的descItem
|
|
41
|
+
*/
|
|
42
|
+
export type IDescItem = {
|
|
43
|
+
type?: string
|
|
44
|
+
label?: string | ((data?: any) => string)
|
|
45
|
+
prop?: string | ((data?: any) => string)
|
|
46
|
+
width?: string
|
|
47
|
+
format?: string | ((data?: any) => string)
|
|
48
|
+
vif?: boolean | ((data?: any) => boolean)
|
|
49
|
+
vshow?: boolean | ((data?: any) => boolean)
|
|
50
|
+
limit?: number
|
|
51
|
+
required?: boolean | ((data?: any) => boolean)
|
|
52
|
+
style?: IBaseObj | ((data?: any) => IBaseObj)
|
|
53
|
+
// 事件
|
|
54
|
+
on?: { [key: string]: Function }
|
|
55
|
+
// 查看详情
|
|
56
|
+
linkId?: string | ((val: any, formData: any) => string)
|
|
57
|
+
linkType?: string | ((val: any, formData: any) => string)
|
|
58
|
+
linkLabel?: string | ((val: any, formData: any) => string)
|
|
59
|
+
// 内部使用属性
|
|
60
|
+
_vif?: boolean
|
|
61
|
+
// 权限
|
|
62
|
+
auth?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 表单项描述
|
|
67
|
+
*/
|
|
68
|
+
export interface IFormDescItem extends IDescItem {
|
|
69
|
+
field?: string
|
|
70
|
+
disabled?: boolean | ((data?: any) => boolean)
|
|
71
|
+
showLabel?: boolean
|
|
72
|
+
labelWidth?: string | number
|
|
73
|
+
tip?: string | ((data?: any) => string)
|
|
74
|
+
size?: string
|
|
75
|
+
placeholder?: string
|
|
76
|
+
attrs?: IBaseObj | ((data?: any) => IBaseObj)
|
|
77
|
+
options?: Array<IFormDescItemOptionItem> | IFetch<Array<IFormDescItemOptionItem>> | string
|
|
78
|
+
default?: string | boolean | number
|
|
79
|
+
defaultItem?: { value: string | number; label: string; dataItem?: IBaseObj }
|
|
80
|
+
rules?: string | Array<any>
|
|
81
|
+
valueFormat?: Function
|
|
82
|
+
isBlank?: boolean
|
|
83
|
+
colspan?: number
|
|
84
|
+
upType?: string
|
|
85
|
+
multiple?: boolean
|
|
86
|
+
noTip?: boolean
|
|
87
|
+
maxSize?: number
|
|
88
|
+
remote?: Function
|
|
89
|
+
// 如果是列表
|
|
90
|
+
tableConfig?: ITableConfig
|
|
91
|
+
tableAttr?: IBaseObj
|
|
92
|
+
tableEvent?: IBaseObj
|
|
93
|
+
|
|
94
|
+
// 内部接口
|
|
95
|
+
_type?: string
|
|
96
|
+
_tip?: string
|
|
97
|
+
_disabled?: boolean
|
|
98
|
+
_attrs?: IBaseObj
|
|
99
|
+
_label?: string
|
|
100
|
+
_prop?: IBaseObj
|
|
101
|
+
_options?: Array<IFormDescItemOptionItem>
|
|
102
|
+
// 其他属性
|
|
103
|
+
// 级联下拉是否只选中最后一级
|
|
104
|
+
checkStrictly?: boolean
|
|
105
|
+
// key的前缀-方便同一个表单中,存在多个daterange等组件
|
|
106
|
+
propPrefix?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* option描述
|
|
111
|
+
*/
|
|
112
|
+
export interface IFormDescItemOptionItem {
|
|
113
|
+
l?: string
|
|
114
|
+
v?: string | number
|
|
115
|
+
label?: string
|
|
116
|
+
value?: string | number
|
|
117
|
+
children?: Array<IFormDescItemOptionItem>
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 表单配置
|
|
122
|
+
*/
|
|
123
|
+
export interface IFormConfig {
|
|
124
|
+
// 表单描述对象
|
|
125
|
+
formDesc: IFormDesc
|
|
126
|
+
// 表单的列数,默认是1
|
|
127
|
+
column?: number
|
|
128
|
+
// 提交前执行
|
|
129
|
+
beforeRequest?: (data?: any) => any
|
|
130
|
+
// 请求地址
|
|
131
|
+
requestFn?: (data?: any) => Promise<T>
|
|
132
|
+
// 更新的函数
|
|
133
|
+
updateFn?: (data?: any) => Promise<T>
|
|
134
|
+
// 请求成功时
|
|
135
|
+
success?: (data?: IFormBack) => any
|
|
136
|
+
// 成功时的提醒文本
|
|
137
|
+
successTip?: string | ((data?: any) => string)
|
|
138
|
+
// 列表的ref
|
|
139
|
+
tableRef?: any
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* group表单配置
|
|
144
|
+
*/
|
|
145
|
+
export interface IFormGroupConfig {
|
|
146
|
+
// 表单的列数,默认是1
|
|
147
|
+
column?: number
|
|
148
|
+
// 提交前执行
|
|
149
|
+
beforeRequest?: (data: T) => T
|
|
150
|
+
// 请求地址
|
|
151
|
+
requestFn?: (data?: any) => Promise<T>
|
|
152
|
+
// 更新的函数
|
|
153
|
+
updateFn?: (data?: any) => Promise<T>
|
|
154
|
+
// 请求成功时
|
|
155
|
+
success?: (data: IFormBack) => any
|
|
156
|
+
// 成功时的提醒文本
|
|
157
|
+
successTip?: string | ((data?: any) => string)
|
|
158
|
+
// 列表的ref
|
|
159
|
+
tableRef?: any
|
|
160
|
+
// 分组配置信息
|
|
161
|
+
group: Array<{
|
|
162
|
+
// 小标题
|
|
163
|
+
title?: string
|
|
164
|
+
// 表单的列数,默认是1
|
|
165
|
+
column?: number
|
|
166
|
+
// 表单描述对象
|
|
167
|
+
formDesc: IFormDesc
|
|
168
|
+
// 是否显示
|
|
169
|
+
vif?: boolean | ((data?: any) => boolean)
|
|
170
|
+
}>
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/************************************列表************************************ */
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 表格项
|
|
177
|
+
*/
|
|
178
|
+
export interface IColumnItem extends IDescItem {
|
|
179
|
+
minWidth?: string
|
|
180
|
+
color?: string | Array<string>
|
|
181
|
+
align?: string
|
|
182
|
+
headerAlign?: string
|
|
183
|
+
btns?: Array<IColumnItem>
|
|
184
|
+
isBatch?: Boolean
|
|
185
|
+
fixed?: 'left' | 'right'
|
|
186
|
+
count?: number
|
|
187
|
+
nodes?: Array<any>
|
|
188
|
+
inline?: Boolean
|
|
189
|
+
text?: Boolean
|
|
190
|
+
children?: Array<IColumnItem>
|
|
191
|
+
scShow?: boolean
|
|
192
|
+
showOverflowTooltip?: boolean
|
|
193
|
+
content?: any
|
|
194
|
+
hstyle?: any
|
|
195
|
+
noHide?: boolean | ((data?: any) => boolean)
|
|
196
|
+
// 真正的vif
|
|
197
|
+
__vif?: boolean
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 导出项
|
|
202
|
+
*/
|
|
203
|
+
export interface IExportConfig {
|
|
204
|
+
// 导出的URL接口地址
|
|
205
|
+
url?: string
|
|
206
|
+
// 查询导出URL的fetch
|
|
207
|
+
fetch?: IFetch<string>
|
|
208
|
+
// 请求夹带的数据
|
|
209
|
+
data?: Object
|
|
210
|
+
// 文件名
|
|
211
|
+
name?: string
|
|
212
|
+
// 是否增加token权限
|
|
213
|
+
isAuth?: Boolean
|
|
214
|
+
// 是否需要拼接查询条件
|
|
215
|
+
noQuery?: Boolean
|
|
216
|
+
// 导出文件的后缀
|
|
217
|
+
suffix?: string
|
|
218
|
+
// 请求类型
|
|
219
|
+
method?: 'get' | 'post'
|
|
220
|
+
// 请求数据处理
|
|
221
|
+
beforeRequest?: Function
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 列表工具
|
|
226
|
+
*/
|
|
227
|
+
export interface ITableToolbar {
|
|
228
|
+
// 列表顶部的功能按钮
|
|
229
|
+
btns?: Array<any>
|
|
230
|
+
// btn靠右显示, 只有当formConfig为null,可设置改属性
|
|
231
|
+
btnRight?: boolean
|
|
232
|
+
// 顶部查询条件的form
|
|
233
|
+
formConfig?: IFormConfig
|
|
234
|
+
// 顶部导出excel配置
|
|
235
|
+
export?: IExportConfig
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* 表单数解析
|
|
240
|
+
*/
|
|
241
|
+
export interface ITreeProps {
|
|
242
|
+
// 子集的key字段
|
|
243
|
+
children: string
|
|
244
|
+
// 是否拥有子集的key
|
|
245
|
+
hasChildren?: boolean
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* 展开配置
|
|
250
|
+
*/
|
|
251
|
+
export interface IExpConfig {
|
|
252
|
+
// 是否自动展开
|
|
253
|
+
isAutoLoadData?: Boolean
|
|
254
|
+
// 展开自身的查询主键的Id名称
|
|
255
|
+
idName?: string
|
|
256
|
+
// 渲染嵌套数据的配置选项
|
|
257
|
+
treeProps?: ITreeProps
|
|
258
|
+
// 需要查询的父类ID-展开类型的列表时采用;;
|
|
259
|
+
queryId?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* 统计项
|
|
264
|
+
*/
|
|
265
|
+
export interface IStatisticConfig {
|
|
266
|
+
// 数据库对应字段
|
|
267
|
+
dbKeys: Array<string>
|
|
268
|
+
// 需要统计的字段信息
|
|
269
|
+
keys: Array<Object>
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* 列表的选项卡配置
|
|
274
|
+
*/
|
|
275
|
+
export interface ITableTabConf {
|
|
276
|
+
prop: string
|
|
277
|
+
tabs: Array<ITableTabItem>
|
|
278
|
+
attrs?: IBaseObj | Function
|
|
279
|
+
// 远程拉取数量信息
|
|
280
|
+
fetch?: IFetch<any>
|
|
281
|
+
// 查询条件
|
|
282
|
+
queryMap?: any
|
|
283
|
+
// 默认选中的下标
|
|
284
|
+
default?: number
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* 列表的选项配置
|
|
289
|
+
*/
|
|
290
|
+
export interface ITableTabItem {
|
|
291
|
+
label: string | ((data?: any) => string)
|
|
292
|
+
value: string | number
|
|
293
|
+
key?: string
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* 尾行合计配置
|
|
298
|
+
*/
|
|
299
|
+
export interface ISummaryConf {
|
|
300
|
+
// 尾行合计的属性名, 多个用逗号分割
|
|
301
|
+
prop: string
|
|
302
|
+
// 尾行合计的显示名称, 多个用逗号分割
|
|
303
|
+
label?: string
|
|
304
|
+
// 格式化
|
|
305
|
+
format?: string
|
|
306
|
+
// 尾行合计的合并方法
|
|
307
|
+
sumFn?: (tableData: any[], allSelectRowList?: any[]) => string
|
|
308
|
+
//尾行合计的样式
|
|
309
|
+
hstyle?: any
|
|
310
|
+
vif?: boolean | ((data?: any) => boolean)
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* 列表配置
|
|
315
|
+
*/
|
|
316
|
+
export interface ITableConfig {
|
|
317
|
+
// 列表的名称,全局唯一,且固定,方便存储列表设置
|
|
318
|
+
tbName?: string
|
|
319
|
+
tabConf?: ITableTabConf
|
|
320
|
+
// 调用接口
|
|
321
|
+
fetch?: IFetch<any>
|
|
322
|
+
// 列表配置,包含表头,每列信息等
|
|
323
|
+
column: Array<IColumnItem>
|
|
324
|
+
// 查询条件
|
|
325
|
+
queryMap?: any
|
|
326
|
+
// 列表顶部的工具栏
|
|
327
|
+
toolbar?: ITableToolbar
|
|
328
|
+
// 每行自身展开配置项
|
|
329
|
+
explan?: IExplanConfig
|
|
330
|
+
// 针对每行的class进行单独控制
|
|
331
|
+
formatRowClass?: Function
|
|
332
|
+
// 如果数据返回有多级,那么这里就是解析的地方 比如 ['res', 'data', 'list'] 这说明,要获取的是请求返回数据中,rea.data.list 这个数据
|
|
333
|
+
dataListModel?: Array<string>
|
|
334
|
+
// 统计信息
|
|
335
|
+
statistic?: IStatisticConfig
|
|
336
|
+
// 最大高度
|
|
337
|
+
maxHeight?: number
|
|
338
|
+
// 表格属性
|
|
339
|
+
tableAttr?: any
|
|
340
|
+
// 显示选中项的名称Key
|
|
341
|
+
showSelectNameKey?: String
|
|
342
|
+
// 配置通用的合计行
|
|
343
|
+
summaryConf?: ISummaryConf
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* 对象存储Info
|
|
348
|
+
*/
|
|
349
|
+
export interface IOssInfo {
|
|
350
|
+
id?: string
|
|
351
|
+
name?: string
|
|
352
|
+
furl?: string
|
|
353
|
+
mimeType?: string
|
|
354
|
+
fsize?: number
|
|
355
|
+
suffix?: string
|
|
356
|
+
busId?: string
|
|
357
|
+
busType?: number
|
|
358
|
+
// upload组件需要的字段
|
|
359
|
+
url?: string
|
|
360
|
+
uid?: number
|
|
361
|
+
previewUrl?: string
|
|
362
|
+
shareUrl?: string
|
|
363
|
+
uploadId?: string
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/************************************表单详情************************************ */
|
|
367
|
+
export interface IFormGroupItem {
|
|
368
|
+
title?: string
|
|
369
|
+
// 表单描述对象
|
|
370
|
+
formDesc: IFormDesc
|
|
371
|
+
// 表单的列数,默认是1
|
|
372
|
+
column?: number
|
|
373
|
+
// 最大宽度
|
|
374
|
+
maxWidth?: string
|
|
375
|
+
// 是否是表格
|
|
376
|
+
isTable?: boolean
|
|
377
|
+
// labelWidth
|
|
378
|
+
labelWidth?: string
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/************************************批量下载************************************ */
|
|
382
|
+
/**
|
|
383
|
+
* 文件(夹)信息
|
|
384
|
+
*/
|
|
385
|
+
export interface IFiles {
|
|
386
|
+
id: string
|
|
387
|
+
// 是否是文件夹
|
|
388
|
+
folder?: 0 | 1
|
|
389
|
+
// 文件(夹)名称
|
|
390
|
+
name: string
|
|
391
|
+
// 文件地址
|
|
392
|
+
url?: string
|
|
393
|
+
// 文件夹中的文件列表
|
|
394
|
+
files?: Array<IFiles>
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* 下载信息
|
|
399
|
+
*/
|
|
400
|
+
export interface IDownInfo {
|
|
401
|
+
// 文件名
|
|
402
|
+
name: string
|
|
403
|
+
// 到期时间
|
|
404
|
+
endData?: string
|
|
405
|
+
// 来源
|
|
406
|
+
sc?: string
|
|
407
|
+
// 状态:1可下载;2已过期;3已删除;4无权限; 5无效
|
|
408
|
+
status: 1 | 2 | 3 | 4 | 5
|
|
409
|
+
// 是否zip压缩,如果不是压缩,则默认下载files[0]
|
|
410
|
+
zip: 0 | 1
|
|
411
|
+
// 文件列表
|
|
412
|
+
files: Array<IFiles>
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* 下载文件信息
|
|
417
|
+
*/
|
|
418
|
+
export interface IDownFile {
|
|
419
|
+
// 文件名
|
|
420
|
+
name: string
|
|
421
|
+
// 文件夹名
|
|
422
|
+
folder: string
|
|
423
|
+
// 文件地址
|
|
424
|
+
url: string
|
|
425
|
+
// 上传进度
|
|
426
|
+
percent?: number
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* 注册curd配置
|
|
431
|
+
*/
|
|
432
|
+
export interface ICRUDConfig {
|
|
433
|
+
debug?: boolean
|
|
434
|
+
size?: 'default' | 'small' | 'large'
|
|
435
|
+
storagePrefix?: string
|
|
436
|
+
form?: {
|
|
437
|
+
leng?: {
|
|
438
|
+
input?: number
|
|
439
|
+
textare?: number
|
|
440
|
+
nbinput?: {
|
|
441
|
+
min: number
|
|
442
|
+
max: number
|
|
443
|
+
precision: number
|
|
444
|
+
controlsPosition: 'right' | ''
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
linkUser?: {
|
|
448
|
+
getUserList: IFetch<any>
|
|
449
|
+
deptListKey: string
|
|
450
|
+
}
|
|
451
|
+
// 用户自定义form组件的名称,使用这个,全局注册的名字为el-plus-form-xxx,form中就可以使用xxx进行引入
|
|
452
|
+
comList?: string[]
|
|
453
|
+
}
|
|
454
|
+
upload?: {
|
|
455
|
+
type: 'minio' | 'quniu'
|
|
456
|
+
action?: string | ((data?: any) => string)
|
|
457
|
+
maxISize?: number
|
|
458
|
+
maxFSize?: number
|
|
459
|
+
minio?: {
|
|
460
|
+
getUploadUrl: (fileName?: string) => Promise<any>
|
|
461
|
+
doElUpload: (fileName?: string) => Promise<any>
|
|
462
|
+
getObjectAuthUrl: (fileName?: string) => Promise<any>
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
token?: string | ((data?: any) => string)
|
|
466
|
+
// 按钮权限方法
|
|
467
|
+
auth?: (data?: any) => boolean
|
|
468
|
+
}
|