@vue-start/element-pro 0.1.0 → 0.1.1

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/index.d.ts CHANGED
@@ -1,13 +1,249 @@
1
1
  import * as vue from 'vue';
2
2
  import { VNode, ExtractPropTypes, PropType, Component } from 'vue';
3
3
  import { FormItemProps, ButtonProps as ButtonProps$1, FormInstance, ElSelect } from 'element-plus';
4
- import { DefineComponent } from '@vue/runtime-core';
5
4
  import { FilterMethods, Filters } from 'element-plus/es/components/table/src/table-column/defaults';
5
+ import { TColumn as TColumn$1, TElementMap } from '@vue-start/pro';
6
6
  import { FormItemRule } from 'element-plus/es/tokens/form';
7
7
  import { Ref, UnwrapNestedRefs } from '@vue/reactivity';
8
+ import { DefineComponent } from '@vue/runtime-core';
8
9
  import * as element_plus_es_components_table_src_table_defaults from 'element-plus/es/components/table/src/table/defaults';
9
10
  import { TableProps } from 'element-plus/es/components/table/src/table/defaults';
10
- import { IRequestActor } from '@vue-start/request';
11
+
12
+ interface IOperateItem {
13
+ value: string | number;
14
+ label?: string | VNode;
15
+ element?: (record: Record<string, any>, item: IOperateItem) => VNode;
16
+ show?: boolean | ((record: Record<string, any>) => boolean);
17
+ disabled?: boolean | ((record: Record<string, any>) => boolean);
18
+ onClick?: (record: Record<string, any>) => void;
19
+ sort?: number;
20
+ }
21
+ interface ITableOperate {
22
+ column?: TableColumnCtx<any>;
23
+ items?: IOperateItem[];
24
+ itemState?: {
25
+ [key: string]: Omit<IOperateItem, "value">;
26
+ };
27
+ }
28
+ declare const proTableProps: () => {
29
+ operate: {
30
+ type: PropType<ITableOperate>;
31
+ };
32
+ columnEmptyText: {
33
+ type: StringConstructor;
34
+ };
35
+ /**
36
+ * 公共column,会merge到columns item中
37
+ */
38
+ column: {
39
+ type: PropType<TableColumnCtx<any>>;
40
+ };
41
+ columns: {
42
+ type: PropType<TColumns>;
43
+ };
44
+ /**
45
+ * 展示控件集合,readonly模式下使用这些组件渲染
46
+ */
47
+ elementMap: {
48
+ type: PropType<{
49
+ [key: string]: any;
50
+ }>;
51
+ };
52
+ /**
53
+ * loading
54
+ */
55
+ loading: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ };
60
+ declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & Omit<TableProps<any>, "tableLayout" | "flexible" | "data"> & {
61
+ tableLayout?: "fixed" | "auto";
62
+ flexible?: boolean;
63
+ data?: any;
64
+ };
65
+ declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {
66
+ data: any;
67
+ }>;
68
+
69
+ interface PaginationProps {
70
+ total?: number;
71
+ pageSize?: number;
72
+ defaultPageSize?: number;
73
+ currentPage?: number;
74
+ defaultCurrentPage?: number;
75
+ pageCount?: number;
76
+ pagerCount?: number;
77
+ layout?: string;
78
+ pageSizes?: number[];
79
+ popperClass?: string;
80
+ prevText?: string;
81
+ nextText?: string;
82
+ small?: boolean;
83
+ background?: boolean;
84
+ disabled?: boolean;
85
+ hideOnSinglePage?: boolean;
86
+ onSizeChange?: (val: number) => void;
87
+ onCurrentChange?: (val: number) => void;
88
+ }
89
+ declare type TPageState = {
90
+ page: number;
91
+ pageSize: number;
92
+ };
93
+ declare const defaultPage: TPageState;
94
+ declare const proListProps: () => {
95
+ /**
96
+ * extra 是否放到SearchForm中
97
+ */
98
+ extraInSearch: {
99
+ type: BooleanConstructor;
100
+ default: undefined;
101
+ };
102
+ searchProps: {
103
+ type: PropType<ProSearchFormProps>;
104
+ };
105
+ tableProps: {
106
+ type: PropType<Partial<ExtractPropTypes<{
107
+ operate: {
108
+ type: PropType<ITableOperate>;
109
+ };
110
+ columnEmptyText: {
111
+ type: StringConstructor;
112
+ };
113
+ column: {
114
+ type: PropType<TableColumnCtx<any>>;
115
+ };
116
+ columns: {
117
+ type: PropType<TColumns>;
118
+ };
119
+ elementMap: {
120
+ type: PropType<{
121
+ [key: string]: any;
122
+ }>;
123
+ };
124
+ loading: {
125
+ type: BooleanConstructor;
126
+ default: boolean;
127
+ };
128
+ }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
129
+ tableLayout?: "fixed" | "auto" | undefined;
130
+ flexible?: boolean | undefined;
131
+ data?: any;
132
+ } & {
133
+ slots?: Readonly<{
134
+ [name: string]: vue.Slot | undefined;
135
+ }> | undefined;
136
+ }>;
137
+ };
138
+ paginationProps: {
139
+ type: PropType<PaginationProps>;
140
+ };
141
+ pageState: {
142
+ type: PropType<TPageState>;
143
+ };
144
+ };
145
+ declare type ProListProps = Partial<ExtractPropTypes<ReturnType<typeof proListProps>>>;
146
+ declare const ProList: vue.DefineComponent<Partial<ExtractPropTypes<{
147
+ /**
148
+ * extra 是否放到SearchForm中
149
+ */
150
+ extraInSearch: {
151
+ type: BooleanConstructor;
152
+ default: undefined;
153
+ };
154
+ searchProps: {
155
+ type: PropType<ProSearchFormProps>;
156
+ };
157
+ tableProps: {
158
+ type: PropType<Partial<ExtractPropTypes<{
159
+ operate: {
160
+ type: PropType<ITableOperate>;
161
+ };
162
+ columnEmptyText: {
163
+ type: StringConstructor;
164
+ };
165
+ column: {
166
+ type: PropType<TableColumnCtx<any>>;
167
+ };
168
+ columns: {
169
+ type: PropType<TColumns>;
170
+ };
171
+ elementMap: {
172
+ type: PropType<{
173
+ [key: string]: any;
174
+ }>;
175
+ };
176
+ loading: {
177
+ type: BooleanConstructor;
178
+ default: boolean;
179
+ };
180
+ }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
181
+ tableLayout?: "fixed" | "auto" | undefined;
182
+ flexible?: boolean | undefined;
183
+ data?: any;
184
+ } & {
185
+ slots?: Readonly<{
186
+ [name: string]: vue.Slot | undefined;
187
+ }> | undefined;
188
+ }>;
189
+ };
190
+ paginationProps: {
191
+ type: PropType<PaginationProps>;
192
+ };
193
+ pageState: {
194
+ type: PropType<TPageState>;
195
+ };
196
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
197
+ /**
198
+ * extra 是否放到SearchForm中
199
+ */
200
+ extraInSearch: {
201
+ type: BooleanConstructor;
202
+ default: undefined;
203
+ };
204
+ searchProps: {
205
+ type: PropType<ProSearchFormProps>;
206
+ };
207
+ tableProps: {
208
+ type: PropType<Partial<ExtractPropTypes<{
209
+ operate: {
210
+ type: PropType<ITableOperate>;
211
+ };
212
+ columnEmptyText: {
213
+ type: StringConstructor;
214
+ };
215
+ column: {
216
+ type: PropType<TableColumnCtx<any>>;
217
+ };
218
+ columns: {
219
+ type: PropType<TColumns>;
220
+ };
221
+ elementMap: {
222
+ type: PropType<{
223
+ [key: string]: any;
224
+ }>;
225
+ };
226
+ loading: {
227
+ type: BooleanConstructor;
228
+ default: boolean;
229
+ };
230
+ }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
231
+ tableLayout?: "fixed" | "auto" | undefined;
232
+ flexible?: boolean | undefined;
233
+ data?: any;
234
+ } & {
235
+ slots?: Readonly<{
236
+ [name: string]: vue.Slot | undefined;
237
+ }> | undefined;
238
+ }>;
239
+ };
240
+ paginationProps: {
241
+ type: PropType<PaginationProps>;
242
+ };
243
+ pageState: {
244
+ type: PropType<TPageState>;
245
+ };
246
+ }>>>, {}>;
11
247
 
12
248
  declare type TOption = {
13
249
  label?: string;
@@ -15,28 +251,10 @@ declare type TOption = {
15
251
  disabled?: boolean;
16
252
  };
17
253
  declare type TOptions = TOption[];
18
- declare type TColumn = TableColumnCtx<any> & {
19
- valueType?: TValueType;
20
- formValueType?: TValueType;
21
- showProps?: Record<string, any>;
254
+ declare type TColumn = TableColumnCtx<any> & Omit<TColumn$1, "formItemProps" | "title" | "dataIndex"> & {
22
255
  formItemProps?: ProFormItemProps;
23
- formFieldProps?: Record<string, any>;
24
- search?: boolean;
25
- hideInTable?: boolean;
26
- hideInForm?: boolean;
27
- hideInDetail?: boolean;
28
- searchSort?: boolean;
29
- tableSort?: boolean;
30
- formSort?: boolean;
31
- descSort?: boolean;
32
- extra?: {
33
- desc?: any;
34
- };
35
256
  };
36
257
  declare type TColumns = TColumn[];
37
- declare type BooleanObjType = {
38
- [key: string]: boolean;
39
- };
40
258
  declare type BooleanRulesObjType = {
41
259
  [key: string]: (record: any) => boolean;
42
260
  };
@@ -110,7 +328,7 @@ declare const proFormItemProps$1: () => {
110
328
  };
111
329
  };
112
330
  declare type ProFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof proFormItemProps$1>>> & FormItemProps;
113
- declare const ProFormItem: DefineComponent<ProFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormItemProps>, {}>;
331
+ declare const ProFormItem: vue.DefineComponent<ProFormItemProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormItemProps>, {}>;
114
332
  declare const proFormProps: () => {
115
333
  /**
116
334
  * 子组件是否只读样式
@@ -157,9 +375,7 @@ declare const proFormProps: () => {
157
375
  * 展示控件集合,readonly模式下使用这些组件渲染
158
376
  */
159
377
  elementMap: {
160
- type: PropType<{
161
- [key: string]: DefineComponent<{}, {}, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
162
- }>;
378
+ type: PropType<TElementMap>;
163
379
  };
164
380
  /**
165
381
  * provide传递
@@ -190,7 +406,7 @@ declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormPr
190
406
  onFinish?: (showValues: Record<string, any>, values: Record<string, any>) => void;
191
407
  onFinishFailed?: (invalidFields: Record<string, any>) => void;
192
408
  };
193
- declare const ProForm: DefineComponent<ProFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormProps>, {}>;
409
+ declare const ProForm: vue.DefineComponent<ProFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProFormProps>, {}>;
194
410
 
195
411
  declare const proSchemaFormProps: () => {
196
412
  columns: {
@@ -200,9 +416,7 @@ declare const proSchemaFormProps: () => {
200
416
  * 录入控件集合,通过column->valueType 查找对应的录入组件
201
417
  */
202
418
  formElementMap: {
203
- type: PropType<{
204
- [key: string]: any;
205
- }>;
419
+ type: PropType<TElementMap>;
206
420
  };
207
421
  /**
208
422
  * 是否启用rules验证
@@ -364,361 +578,6 @@ interface IProFormListProvide {
364
578
  declare const useProFormList: () => IProFormListProvide;
365
579
  declare const provideProFormList: (ctx: IProFormListProvide) => void;
366
580
 
367
- interface IOperateItem {
368
- value: string | number;
369
- label?: string | VNode;
370
- element?: (record: Record<string, any>, item: IOperateItem) => VNode;
371
- show?: boolean | ((record: Record<string, any>) => boolean);
372
- disabled?: boolean | ((record: Record<string, any>) => boolean);
373
- onClick?: (record: Record<string, any>) => void;
374
- sort?: number;
375
- }
376
- interface ITableOperate {
377
- column?: TableColumnCtx<any>;
378
- items?: IOperateItem[];
379
- itemState?: {
380
- [key: string]: Omit<IOperateItem, "value">;
381
- };
382
- }
383
- declare const proTableProps: () => {
384
- operate: {
385
- type: PropType<ITableOperate>;
386
- };
387
- columnEmptyText: {
388
- type: StringConstructor;
389
- };
390
- /**
391
- * 公共column,会merge到columns item中
392
- */
393
- column: {
394
- type: PropType<TableColumnCtx<any>>;
395
- };
396
- columns: {
397
- type: PropType<TColumns>;
398
- };
399
- /**
400
- * 展示控件集合,readonly模式下使用这些组件渲染
401
- */
402
- elementMap: {
403
- type: PropType<{
404
- [key: string]: any;
405
- }>;
406
- };
407
- };
408
- declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>> & Omit<TableProps<any>, "tableLayout" | "flexible" | "data"> & {
409
- tableLayout?: "fixed" | "auto";
410
- flexible?: boolean;
411
- data?: any;
412
- };
413
- declare const ProTable: vue.DefineComponent<ProTableProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProTableProps>, {
414
- data: any;
415
- }>;
416
-
417
- interface PaginationProps {
418
- total?: number;
419
- pageSize?: number;
420
- defaultPageSize?: number;
421
- currentPage?: number;
422
- defaultCurrentPage?: number;
423
- pageCount?: number;
424
- pagerCount?: number;
425
- layout?: string;
426
- pageSizes?: number[];
427
- popperClass?: string;
428
- prevText?: string;
429
- nextText?: string;
430
- small?: boolean;
431
- background?: boolean;
432
- disabled?: boolean;
433
- hideOnSinglePage?: boolean;
434
- onSizeChange?: (val: number) => void;
435
- onCurrentChange?: (val: number) => void;
436
- }
437
- declare type TPageState = {
438
- page: number;
439
- pageSize: number;
440
- };
441
- declare const defaultPage: TPageState;
442
- declare const curdListProps: () => {
443
- /**
444
- * extra 是否放到SearchForm中
445
- */
446
- extraInSearch: {
447
- type: BooleanConstructor;
448
- default: undefined;
449
- };
450
- searchProps: {
451
- type: PropType<ProSearchFormProps>;
452
- };
453
- tableProps: {
454
- type: PropType<Partial<ExtractPropTypes<{
455
- operate: {
456
- type: PropType<ITableOperate>;
457
- };
458
- columnEmptyText: {
459
- type: StringConstructor;
460
- };
461
- column: {
462
- type: PropType<TableColumnCtx<any>>;
463
- };
464
- columns: {
465
- type: PropType<TColumns>;
466
- };
467
- elementMap: {
468
- type: PropType<{
469
- [key: string]: any;
470
- }>;
471
- };
472
- }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
473
- tableLayout?: "fixed" | "auto" | undefined;
474
- flexible?: boolean | undefined;
475
- data?: any;
476
- } & {
477
- slots?: Readonly<{
478
- [name: string]: vue.Slot | undefined;
479
- }> | undefined;
480
- }>;
481
- };
482
- paginationProps: {
483
- type: PropType<PaginationProps>;
484
- };
485
- pageState: {
486
- type: PropType<TPageState>;
487
- };
488
- };
489
- declare type ProCurdListProps = Partial<ExtractPropTypes<ReturnType<typeof curdListProps>>>;
490
- /**
491
- * 组合列表
492
- * SearchForm + Table + Pagination
493
- */
494
- declare const ProCurdList: vue.DefineComponent<Partial<ExtractPropTypes<{
495
- /**
496
- * extra 是否放到SearchForm中
497
- */
498
- extraInSearch: {
499
- type: BooleanConstructor;
500
- default: undefined;
501
- };
502
- searchProps: {
503
- type: PropType<ProSearchFormProps>;
504
- };
505
- tableProps: {
506
- type: PropType<Partial<ExtractPropTypes<{
507
- operate: {
508
- type: PropType<ITableOperate>;
509
- };
510
- columnEmptyText: {
511
- type: StringConstructor;
512
- };
513
- column: {
514
- type: PropType<TableColumnCtx<any>>;
515
- };
516
- columns: {
517
- type: PropType<TColumns>;
518
- };
519
- elementMap: {
520
- type: PropType<{
521
- [key: string]: any;
522
- }>;
523
- };
524
- }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
525
- tableLayout?: "fixed" | "auto" | undefined;
526
- flexible?: boolean | undefined;
527
- data?: any;
528
- } & {
529
- slots?: Readonly<{
530
- [name: string]: vue.Slot | undefined;
531
- }> | undefined;
532
- }>;
533
- };
534
- paginationProps: {
535
- type: PropType<PaginationProps>;
536
- };
537
- pageState: {
538
- type: PropType<TPageState>;
539
- };
540
- }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
541
- /**
542
- * extra 是否放到SearchForm中
543
- */
544
- extraInSearch: {
545
- type: BooleanConstructor;
546
- default: undefined;
547
- };
548
- searchProps: {
549
- type: PropType<ProSearchFormProps>;
550
- };
551
- tableProps: {
552
- type: PropType<Partial<ExtractPropTypes<{
553
- operate: {
554
- type: PropType<ITableOperate>;
555
- };
556
- columnEmptyText: {
557
- type: StringConstructor;
558
- };
559
- column: {
560
- type: PropType<TableColumnCtx<any>>;
561
- };
562
- columns: {
563
- type: PropType<TColumns>;
564
- };
565
- elementMap: {
566
- type: PropType<{
567
- [key: string]: any;
568
- }>;
569
- };
570
- }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
571
- tableLayout?: "fixed" | "auto" | undefined;
572
- flexible?: boolean | undefined;
573
- data?: any;
574
- } & {
575
- slots?: Readonly<{
576
- [name: string]: vue.Slot | undefined;
577
- }> | undefined;
578
- }>;
579
- };
580
- paginationProps: {
581
- type: PropType<PaginationProps>;
582
- };
583
- pageState: {
584
- type: PropType<TPageState>;
585
- };
586
- }>>>, {}>;
587
- declare const ProCurdListConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
588
-
589
- interface IProModuleProvide {
590
- columns: Ref<TColumns>;
591
- getFormItemVNode: (column: TColumn, needRules: boolean | undefined) => VNode | null;
592
- getItemVNode: (column: TColumn, value: any) => VNode | null;
593
- elementMap: {
594
- [key: string]: any;
595
- };
596
- formElementMap: {
597
- [key: string]: any;
598
- };
599
- }
600
- declare const useProModule: () => IProModuleProvide;
601
- declare const provideProModule: (ctx: IProModuleProvide) => void;
602
-
603
- /**
604
- * 获取Column的valueType,默认"text"
605
- * @param column
606
- */
607
- declare const getColumnValueType: (column: TColumn) => TValueType;
608
- /**
609
- *获取Column的FormItem name
610
- * @param column
611
- */
612
- declare const getColumnFormItemName: (column: TColumn) => string | number | undefined;
613
- /**
614
- * 根据Column生成FormItem VNode
615
- * formFieldProps中的slots参数会以v-slots的形式传递到FormItem的录入组件(子组件)中
616
- * @param formElementMap
617
- * @param column
618
- * @param needRules
619
- */
620
- declare const getFormItemEl: (formElementMap: any, column: TColumn, needRules?: boolean | undefined) => VNode | null;
621
- /**
622
- * 根据Column生成Item VNode
623
- * @param elementMap
624
- * @param column
625
- * @param value
626
- */
627
- declare const getItemEl: (elementMap: any, column: TColumn, value: any) => VNode | null;
628
- declare const proModuleProps: () => {
629
- /**
630
- * 配置(静态)
631
- */
632
- columns: {
633
- type: PropType<TColumns>;
634
- };
635
- /**
636
- * 配置(动态)
637
- * columns动态属性兼容
638
- */
639
- columnState: {
640
- type: PropType<Record<string, any>>;
641
- };
642
- /**
643
- * 展示组件集
644
- */
645
- elementMap: {
646
- type: PropType<{
647
- [key: string]: any;
648
- }>;
649
- };
650
- /**
651
- * 录入组件集
652
- */
653
- formElementMap: {
654
- type: PropType<{
655
- [key: string]: any;
656
- }>;
657
- };
658
- };
659
- declare type ProModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proModuleProps>>>;
660
- declare const ProModule: vue.DefineComponent<Partial<ExtractPropTypes<{
661
- /**
662
- * 配置(静态)
663
- */
664
- columns: {
665
- type: PropType<TColumns>;
666
- };
667
- /**
668
- * 配置(动态)
669
- * columns动态属性兼容
670
- */
671
- columnState: {
672
- type: PropType<Record<string, any>>;
673
- };
674
- /**
675
- * 展示组件集
676
- */
677
- elementMap: {
678
- type: PropType<{
679
- [key: string]: any;
680
- }>;
681
- };
682
- /**
683
- * 录入组件集
684
- */
685
- formElementMap: {
686
- type: PropType<{
687
- [key: string]: any;
688
- }>;
689
- };
690
- }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
691
- /**
692
- * 配置(静态)
693
- */
694
- columns: {
695
- type: PropType<TColumns>;
696
- };
697
- /**
698
- * 配置(动态)
699
- * columns动态属性兼容
700
- */
701
- columnState: {
702
- type: PropType<Record<string, any>>;
703
- };
704
- /**
705
- * 展示组件集
706
- */
707
- elementMap: {
708
- type: PropType<{
709
- [key: string]: any;
710
- }>;
711
- };
712
- /**
713
- * 录入组件集
714
- */
715
- formElementMap: {
716
- type: PropType<{
717
- [key: string]: any;
718
- }>;
719
- };
720
- }>>>, {}>;
721
-
722
581
  /**
723
582
  * 添加 和 修改 时候的确定按钮
724
583
  */
@@ -811,254 +670,121 @@ declare const proCurdFormProps: () => {
811
670
  }>>>;
812
671
  };
813
672
  };
814
- declare type ProCurdFormProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdFormProps>>> & ProFormProps;
673
+ declare type ProCurdFormProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdFormProps>>> & ProSchemaFormProps;
815
674
  declare const ProCurdForm: vue.DefineComponent<ProCurdFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdFormProps>, {}>;
816
675
  declare const ProCurdFormConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ExtractPropTypes<{}>>, {}>;
817
676
 
818
- interface ModalProps {
819
- appendToBody?: boolean;
820
- beforeClose?: (done: () => void) => void;
821
- destroyOnClose?: boolean;
822
- closeOnClickModal?: boolean;
823
- closeOnPressEscape?: boolean;
824
- lockScroll?: boolean;
825
- modal?: boolean;
826
- openDelay?: number;
827
- closeDelay?: number;
828
- top?: string;
829
- modelValue?: boolean;
830
- modalClass?: string;
831
- width?: string | number;
832
- zIndex?: number;
833
- trapFocus?: boolean;
834
- center?: boolean;
835
- customClass?: string;
836
- draggable?: boolean;
837
- fullscreen?: boolean;
838
- showClose?: boolean;
839
- title?: string;
840
- }
841
-
842
- interface DescriptionsProps {
843
- border?: boolean;
844
- column?: number;
845
- direction?: "vertical" | "horizontal";
846
- size?: "default" | "small" | "large";
847
- title?: string;
848
- extra?: string;
849
- }
850
- declare const ProCurdDesc: vue.DefineComponent<DescriptionsProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<DescriptionsProps>, {}>;
851
- declare const ProCurdDescConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
852
-
853
- /**
854
- * curd 操作模式
855
- */
856
- declare enum CurdCurrentMode {
857
- ADD = "ADD",
858
- EDIT = "EDIT",
859
- DETAIL = "DETAIL"
860
- }
861
- declare type ICurdCurrentMode = keyof typeof CurdCurrentMode;
862
- /**
863
- * curd add 模式下 标记 "确定" "确定并继续" 触发
864
- */
865
- declare enum CurdAddAction {
866
- NORMAL = "NORMAL",
867
- CONTINUE = "CONTINUE"
868
- }
869
- declare type ICurdAddAction = keyof typeof CurdAddAction;
870
- interface IListData extends Record<string, any> {
871
- total: number;
872
- dataSource: Record<string, any>[];
873
- }
874
- interface ICurdState extends Record<string, any> {
875
- listLoading?: boolean;
876
- listData?: IListData;
877
- mode?: ICurdCurrentMode;
878
- detailLoading?: boolean;
879
- detailData?: Record<string, any>;
880
- operateLoading?: boolean;
881
- addAction?: ICurdAddAction;
882
- }
883
- declare type BooleanOrFun = boolean | ((record: Record<string, any>) => boolean);
884
677
  /**
885
- * `on${Action}Bobble`: 冒泡
678
+ * 组合列表
679
+ * SearchForm + Table + Pagination
886
680
  */
887
- interface IOperate {
888
- onList?: (values: Record<string, any>) => void;
889
- detail?: BooleanOrFun;
890
- detailLabel?: string | VNode;
891
- onDetail?: (record: Record<string, any>) => void;
892
- edit?: BooleanOrFun;
893
- editLabel?: string | VNode;
894
- onEdit?: (record: Record<string, any>) => void;
895
- onEditExecute?: (values: Record<string, any>) => void;
896
- add?: BooleanOrFun;
897
- addLabel?: string | VNode;
898
- onAdd?: () => void;
899
- onAddExecute?: (values: Record<string, any>) => void;
900
- delete?: BooleanOrFun;
901
- deleteLabel?: string | VNode;
902
- onDelete?: (record: Record<string, any>) => void;
903
- tableOperate?: ITableOperate;
904
- }
905
- declare const proCurdModuleProps: () => {
906
- /**
907
- * 状态
908
- */
909
- curdState: {
910
- type: PropType<{
911
- [x: string]: any;
912
- listLoading?: boolean | undefined;
913
- listData?: {
914
- [x: string]: any;
915
- total: number;
916
- dataSource: {
917
- [x: string]: any;
918
- }[];
919
- } | undefined;
920
- mode?: "ADD" | "EDIT" | "DETAIL" | undefined;
921
- detailLoading?: boolean | undefined;
922
- detailData?: {
923
- [x: string]: any;
924
- } | undefined;
925
- operateLoading?: boolean | undefined;
926
- addAction?: "NORMAL" | "CONTINUE" | undefined;
681
+ declare const ProCurdList: vue.DefineComponent<Partial<vue.ExtractPropTypes<{
682
+ extraInSearch: {
683
+ type: BooleanConstructor;
684
+ default: undefined;
685
+ };
686
+ searchProps: {
687
+ type: vue.PropType<ProSearchFormProps>;
688
+ };
689
+ tableProps: {
690
+ type: vue.PropType<Partial<vue.ExtractPropTypes<{
691
+ operate: {
692
+ type: vue.PropType<ITableOperate>;
693
+ };
694
+ columnEmptyText: {
695
+ type: StringConstructor;
696
+ };
697
+ column: {
698
+ type: vue.PropType<TableColumnCtx<any>>;
699
+ };
700
+ columns: {
701
+ type: vue.PropType<TColumns>;
702
+ };
703
+ elementMap: {
704
+ type: vue.PropType<{
705
+ [key: string]: any;
706
+ }>;
707
+ };
708
+ loading: {
709
+ type: BooleanConstructor;
710
+ default: boolean;
711
+ };
712
+ }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
713
+ tableLayout?: "fixed" | "auto" | undefined;
714
+ flexible?: boolean | undefined;
715
+ data?: any;
716
+ } & {
717
+ slots?: Readonly<{
718
+ [name: string]: vue.Slot | undefined;
719
+ }> | undefined;
927
720
  }>;
928
721
  };
929
- /**
930
- * 操作配置
931
- */
932
- operate: {
933
- type: PropType<IOperate>;
722
+ paginationProps: {
723
+ type: vue.PropType<PaginationProps>;
934
724
  };
935
- /**
936
- * 列表 或 详情 的唯一标识
937
- */
938
- rowKey: {
939
- type: StringConstructor;
940
- default: string;
725
+ pageState: {
726
+ type: vue.PropType<TPageState>;
941
727
  };
942
- /************************* 子组件props *******************************/
943
- listProps: {
944
- type: PropType<Partial<ExtractPropTypes<{
945
- extraInSearch: {
946
- type: BooleanConstructor;
947
- default: undefined;
728
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<vue.ExtractPropTypes<{
729
+ extraInSearch: {
730
+ type: BooleanConstructor;
731
+ default: undefined;
732
+ };
733
+ searchProps: {
734
+ type: vue.PropType<ProSearchFormProps>;
735
+ };
736
+ tableProps: {
737
+ type: vue.PropType<Partial<vue.ExtractPropTypes<{
738
+ operate: {
739
+ type: vue.PropType<ITableOperate>;
948
740
  };
949
- searchProps: {
950
- type: PropType<ProSearchFormProps>;
741
+ columnEmptyText: {
742
+ type: StringConstructor;
951
743
  };
952
- tableProps: {
953
- type: PropType<Partial<ExtractPropTypes<{
954
- operate: {
955
- type: PropType<ITableOperate>;
956
- };
957
- columnEmptyText: {
958
- type: StringConstructor;
959
- };
960
- column: {
961
- type: PropType<TableColumnCtx<any>>;
962
- };
963
- columns: {
964
- type: PropType<TColumns>;
965
- };
966
- elementMap: {
967
- type: PropType<{
968
- [key: string]: any;
969
- }>;
970
- };
971
- }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
972
- tableLayout?: "fixed" | "auto" | undefined;
973
- flexible?: boolean | undefined;
974
- data?: any;
975
- } & {
976
- slots?: Readonly<{
977
- [name: string]: vue.Slot | undefined;
978
- }> | undefined;
979
- }>;
744
+ column: {
745
+ type: vue.PropType<TableColumnCtx<any>>;
980
746
  };
981
- paginationProps: {
982
- type: PropType<PaginationProps>;
747
+ columns: {
748
+ type: vue.PropType<TColumns>;
983
749
  };
984
- pageState: {
985
- type: PropType<TPageState>;
750
+ elementMap: {
751
+ type: vue.PropType<{
752
+ [key: string]: any;
753
+ }>;
986
754
  };
987
- }>>>;
988
- };
989
- formProps: {
990
- type: PropType<ProCurdFormProps>;
755
+ loading: {
756
+ type: BooleanConstructor;
757
+ default: boolean;
758
+ };
759
+ }>> & Omit<element_plus_es_components_table_src_table_defaults.TableProps<any>, "data" | "tableLayout" | "flexible"> & {
760
+ tableLayout?: "fixed" | "auto" | undefined;
761
+ flexible?: boolean | undefined;
762
+ data?: any;
763
+ } & {
764
+ slots?: Readonly<{
765
+ [name: string]: vue.Slot | undefined;
766
+ }> | undefined;
767
+ }>;
991
768
  };
992
- descProps: {
993
- type: PropType<DescriptionsProps>;
769
+ paginationProps: {
770
+ type: vue.PropType<PaginationProps>;
994
771
  };
995
- modalProps: {
996
- type: PropType<ModalProps>;
772
+ pageState: {
773
+ type: vue.PropType<TPageState>;
997
774
  };
998
- };
999
- declare type CurdModuleProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdModuleProps>>>;
1000
- declare type ProCurdModuleProps = CurdModuleProps & ProModuleProps;
1001
- declare const ProCurd: vue.DefineComponent<ProCurdModuleProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdModuleProps>, {}>;
1002
-
1003
- interface IProCurdModuleProvide {
1004
- rowKey: string;
1005
- curdState: UnwrapNestedRefs<ICurdState>;
1006
- formColumns: Ref<TColumns>;
1007
- descColumns: Ref<TColumns>;
1008
- tableColumns: Ref<TColumns>;
1009
- searchColumns: Ref<TColumns>;
1010
- operate: IOperate;
1011
- /******************子组件参数*******************/
1012
- listProps?: ProCurdListProps;
1013
- formProps?: ProCurdFormProps;
1014
- descProps?: DescriptionsProps;
1015
- modalProps?: ModalProps;
1016
- }
1017
- declare const useProCurdModule: () => IProCurdModuleProvide;
1018
- declare const provideProCurdModule: (ctx: IProCurdModuleProvide) => void;
775
+ }>>>, {}>;
776
+ declare const ProCurdListConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
1019
777
 
1020
- interface ICurdNetConvert {
1021
- convertAddParams?: (values: Record<string, any>, record: Record<string, any>) => Record<string, any>;
1022
- convertEditParams?: (values: Record<string, any>, record: Record<string, any>) => Record<string, any>;
1023
- convertListParams?: (values: Record<string, any>) => Record<string, any>;
1024
- convertListData?: (actor: IRequestActor) => IListData;
1025
- convertDetailParams?: (record: Record<string, any>, rowKey: string) => Record<string, any>;
1026
- convertDetailData?: (actor: IRequestActor) => Record<string, any>;
1027
- convertDeleteParams?: (record: Record<string, any>, rowKey: string) => Record<string, any>;
1028
- }
1029
- /**
1030
- * `on{Action}Bubble`
1031
- * 各个回调中都会调用该方法
1032
- * 场景:不改变原有方法逻辑,但是需要在对应的节点添加其他处理
1033
- * 如果直接重写`on{Action}...`,将不会再调用对应的bubble方法
1034
- */
1035
- interface INetOperate extends IOperate {
1036
- onListDone?: (actor: IRequestActor) => void;
1037
- onListFail?: (actor: IRequestActor) => void;
1038
- onListBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
1039
- onDetailDone?: (actor: IRequestActor) => void;
1040
- onDetailFail?: (actor: IRequestActor) => void;
1041
- onDetailBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
1042
- onEditDone?: (actor: IRequestActor) => void;
1043
- onEditFail?: (actor: IRequestActor) => void;
1044
- onEditBubble?: (type: "emit" | "execute" | "done" | "fail", ...rest: any[]) => void;
1045
- onAddDone?: (actor: IRequestActor) => void;
1046
- onAddFail?: (actor: IRequestActor) => void;
1047
- onAddBubble?: (type: "emit" | "execute" | "done" | "fail", ...rest: any[]) => void;
1048
- onDeleteDone?: (actor: IRequestActor) => void;
1049
- onDeleteFail?: (actor: IRequestActor) => void;
1050
- onDeleteBubble?: (type: "emit" | "done" | "fail", ...rest: any[]) => void;
778
+ interface DescriptionsProps {
779
+ border?: boolean;
780
+ column?: number;
781
+ direction?: "vertical" | "horizontal";
782
+ size?: "default" | "small" | "large";
783
+ title?: string;
784
+ extra?: string;
1051
785
  }
1052
- declare const proCurdNetProps: () => {
1053
- converts: {
1054
- type: PropType<ICurdNetConvert>;
1055
- };
1056
- operate: {
1057
- type: PropType<INetOperate>;
1058
- };
1059
- };
1060
- declare type ProCurdNetProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdNetProps>>> & Omit<ProCurdModuleProps, "operate">;
1061
- declare const ProCurdNet: vue.DefineComponent<ProCurdNetProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdNetProps>, {}>;
786
+ declare const ProCurdDesc: vue.DefineComponent<DescriptionsProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<DescriptionsProps>, {}>;
787
+ declare const ProCurdDescConnect: vue.DefineComponent<{}, () => JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{}>>, {}>;
1062
788
 
1063
789
  declare const proSelectProps: () => {
1064
790
  options: PropType<TOptions>;
@@ -1068,17 +794,4 @@ declare const ProSelect: vue.DefineComponent<any, {}, {}, {}, {}, vue.ComponentO
1068
794
  [x: string]: any;
1069
795
  }>;
1070
796
 
1071
- /**
1072
- * 剔除showState或showStateRules规则为!true的值
1073
- * @param values
1074
- * @param showState
1075
- * @param showStateRules
1076
- */
1077
- declare const getValidValues: (values: Record<string, any>, showState?: BooleanObjType | undefined, showStateRules?: BooleanRulesObjType | undefined) => Record<string, any>;
1078
- /**
1079
- * string类型的path转为arr
1080
- * @param path
1081
- */
1082
- declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
1083
-
1084
- export { ButtonProps, ContinueAddButton, CurdAddAction, CurdCurrentMode, DescriptionsProps, ICurdAddAction, ICurdCurrentMode, ICurdNetConvert, ICurdState, IListData, INetOperate, IOperate, IOperateItem, IProCurdModuleProvide, IProModuleProvide, ISearchMode, ITableOperate, OkButton, PaginationProps, ProCreateFormItemProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModuleProps, ProCurdNet, ProCurdNetProps, ProForm, ProFormCascader, ProFormCheckbox, ProFormDatePicker, ProFormItem, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProFormRadio, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextNumber, ProFormTimePicker, ProFormTreeSelect, ProModule, ProModuleProps, ProOperateButton, ProOperateButtonProps, ProSchemaForm, ProSchemaFormProps, ProSearchForm, ProSearchFormProps, ProSelect, ProSelectProps, ProSubmitButton, ProTable, ProTableProps, SearchMode, TPageState, convertPathToList, createFormItemComponent, defaultPage, getColumnFormItemName, getColumnValueType, getFormItemEl, getItemEl, getValidValues, provideProCurdModule, provideProForm, provideProFormList, provideProModule, useProCurdModule, useProForm, useProFormList, useProModule };
797
+ export { ButtonProps, ContinueAddButton, DescriptionsProps, IOperateItem, ISearchMode, ITableOperate, OkButton, PaginationProps, ProCreateFormItemProps, ProCurdDesc, ProCurdDescConnect, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProForm, ProFormCascader, ProFormCheckbox, ProFormDatePicker, ProFormItem, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProFormRadio, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextNumber, ProFormTimePicker, ProFormTreeSelect, ProList, ProListProps, ProOperateButton, ProOperateButtonProps, ProSchemaForm, ProSchemaFormProps, ProSearchForm, ProSearchFormProps, ProSelect, ProSelectProps, ProSubmitButton, ProTable, ProTableProps, SearchMode, TPageState, createFormItemComponent, defaultPage, provideProForm, provideProFormList, useProForm, useProFormList };