@vue-start/pro 0.2.0 → 0.3.2
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 +28 -0
- package/dist/index.d.ts +203 -311
- package/dist/index.es.js +1388 -407
- package/dist/index.js +1401 -408
- package/package.json +10 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { ExtractPropTypes, PropType, VNode, Ref as Ref$1 } from 'vue';
|
|
3
3
|
import { Ref, UnwrapNestedRefs, ComputedRef } from '@vue/reactivity';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { IRequestActor } from '@vue-start/request';
|
|
6
6
|
|
|
7
|
+
declare const proGridProps: () => {
|
|
8
|
+
row: {
|
|
9
|
+
type: PropType<Record<string, any>>;
|
|
10
|
+
default: undefined;
|
|
11
|
+
};
|
|
12
|
+
col: {
|
|
13
|
+
type: PropType<Record<string, any>>;
|
|
14
|
+
};
|
|
15
|
+
items: {
|
|
16
|
+
type: PropType<{
|
|
17
|
+
vNode: VNode;
|
|
18
|
+
rowKey?: string | number | undefined;
|
|
19
|
+
col?: Record<string, any> | undefined;
|
|
20
|
+
}[]>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
declare type GridProps = Partial<ExtractPropTypes<ReturnType<typeof proGridProps>>>;
|
|
24
|
+
declare const createGrid: (Row: any, Col: any) => any;
|
|
25
|
+
|
|
7
26
|
declare type TDefaultValueType = "text" | "textarea" | "password" | "digit" | "date" | "dateRange" | "time" | "timeRange" | "select" | "treeSelect" | "checkbox" | "radio" | "slider" | "switch" | "rate" | "cascader";
|
|
8
27
|
declare type TValueType = TDefaultValueType | string;
|
|
9
28
|
declare type TOption = {
|
|
@@ -42,6 +61,12 @@ declare type TColumns = TColumn[];
|
|
|
42
61
|
declare type TActionEvent = {
|
|
43
62
|
type: string;
|
|
44
63
|
payload?: any;
|
|
64
|
+
/**
|
|
65
|
+
* 发送事件源
|
|
66
|
+
* 公共组件(如:Curd)只处理source为undefined的事件
|
|
67
|
+
* 业务组件可以传入该参数覆盖之前的默认行为
|
|
68
|
+
*/
|
|
69
|
+
source?: string;
|
|
45
70
|
extra?: Record<string, any>;
|
|
46
71
|
};
|
|
47
72
|
/**
|
|
@@ -61,7 +86,15 @@ declare type BooleanObjType = {
|
|
|
61
86
|
};
|
|
62
87
|
declare type BooleanRulesObjType = {
|
|
63
88
|
[key: string]: (record: any) => boolean;
|
|
64
|
-
};
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
interface FieldNames {
|
|
94
|
+
value?: string;
|
|
95
|
+
label?: string;
|
|
96
|
+
children?: string;
|
|
97
|
+
}
|
|
65
98
|
|
|
66
99
|
/**
|
|
67
100
|
* 获取Column的valueType,默认"text"
|
|
@@ -267,8 +300,9 @@ declare type TTableColumn = {
|
|
|
267
300
|
record: Record<string, any>;
|
|
268
301
|
index: number;
|
|
269
302
|
column: TTableColumn;
|
|
270
|
-
}) => VNode;
|
|
303
|
+
}) => VNode | string | number;
|
|
271
304
|
fixed?: boolean | string;
|
|
305
|
+
width?: number | string;
|
|
272
306
|
} & TColumn;
|
|
273
307
|
declare type TTableColumns = TTableColumn[];
|
|
274
308
|
/**
|
|
@@ -309,41 +343,8 @@ declare const proTableProps: () => {
|
|
|
309
343
|
columns: {
|
|
310
344
|
type: PropType<TTableColumns>;
|
|
311
345
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
*/
|
|
315
|
-
elementMap: {
|
|
316
|
-
type: PropType<TElementMap>;
|
|
317
|
-
};
|
|
318
|
-
/**
|
|
319
|
-
* loading
|
|
320
|
-
*/
|
|
321
|
-
loading: {
|
|
322
|
-
type: BooleanConstructor;
|
|
323
|
-
};
|
|
324
|
-
/**
|
|
325
|
-
* provide传递
|
|
326
|
-
*/
|
|
327
|
-
provideExtra: {
|
|
328
|
-
type: PropType<IProTableProvideExtra>;
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>>;
|
|
332
|
-
declare const ProTable: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
333
|
-
operate: {
|
|
334
|
-
type: PropType<ITableOperate>;
|
|
335
|
-
};
|
|
336
|
-
columnEmptyText: {
|
|
337
|
-
type: StringConstructor;
|
|
338
|
-
};
|
|
339
|
-
/**
|
|
340
|
-
* 公共column,会merge到columns item中
|
|
341
|
-
*/
|
|
342
|
-
column: {
|
|
343
|
-
type: PropType<TTableColumn>;
|
|
344
|
-
};
|
|
345
|
-
columns: {
|
|
346
|
-
type: PropType<TTableColumns>;
|
|
346
|
+
columnState: {
|
|
347
|
+
type: PropType<Record<string, any>>;
|
|
347
348
|
};
|
|
348
349
|
/**
|
|
349
350
|
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
@@ -352,44 +353,19 @@ declare const ProTable: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
|
352
353
|
type: PropType<TElementMap>;
|
|
353
354
|
};
|
|
354
355
|
/**
|
|
355
|
-
*
|
|
356
|
+
* 序号
|
|
356
357
|
*/
|
|
357
|
-
|
|
358
|
+
serialNumber: {
|
|
358
359
|
type: BooleanConstructor;
|
|
359
360
|
};
|
|
360
361
|
/**
|
|
361
|
-
*
|
|
362
|
-
*/
|
|
363
|
-
provideExtra: {
|
|
364
|
-
type: PropType<IProTableProvideExtra>;
|
|
365
|
-
};
|
|
366
|
-
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
367
|
-
operate: {
|
|
368
|
-
type: PropType<ITableOperate>;
|
|
369
|
-
};
|
|
370
|
-
columnEmptyText: {
|
|
371
|
-
type: StringConstructor;
|
|
372
|
-
};
|
|
373
|
-
/**
|
|
374
|
-
* 公共column,会merge到columns item中
|
|
375
|
-
*/
|
|
376
|
-
column: {
|
|
377
|
-
type: PropType<TTableColumn>;
|
|
378
|
-
};
|
|
379
|
-
columns: {
|
|
380
|
-
type: PropType<TTableColumns>;
|
|
381
|
-
};
|
|
382
|
-
/**
|
|
383
|
-
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
384
|
-
*/
|
|
385
|
-
elementMap: {
|
|
386
|
-
type: PropType<TElementMap>;
|
|
387
|
-
};
|
|
388
|
-
/**
|
|
389
|
-
* loading
|
|
362
|
+
* 分页
|
|
390
363
|
*/
|
|
391
|
-
|
|
392
|
-
type:
|
|
364
|
+
paginationState: {
|
|
365
|
+
type: PropType<{
|
|
366
|
+
page?: number | undefined;
|
|
367
|
+
pageSize?: number | undefined;
|
|
368
|
+
}>;
|
|
393
369
|
};
|
|
394
370
|
/**
|
|
395
371
|
* provide传递
|
|
@@ -397,8 +373,15 @@ declare const ProTable: vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
|
397
373
|
provideExtra: {
|
|
398
374
|
type: PropType<IProTableProvideExtra>;
|
|
399
375
|
};
|
|
400
|
-
}
|
|
376
|
+
};
|
|
377
|
+
declare type ProTableProps = Partial<ExtractPropTypes<ReturnType<typeof proTableProps>>>;
|
|
378
|
+
declare const createTable: (Table: any, Props?: any) => any;
|
|
401
379
|
|
|
380
|
+
declare type TPageState = {
|
|
381
|
+
page: number;
|
|
382
|
+
pageSize: number;
|
|
383
|
+
};
|
|
384
|
+
declare const defaultPage: TPageState;
|
|
402
385
|
interface IListData extends Record<string, any> {
|
|
403
386
|
total: number;
|
|
404
387
|
dataSource: Record<string, any>[];
|
|
@@ -417,13 +400,14 @@ interface ICurdState extends Record<string, any> {
|
|
|
417
400
|
*/
|
|
418
401
|
interface ICurdOperateOpts extends Omit<IRequestOpts, "actor" | "action">, Omit<IOperateItem, "value"> {
|
|
419
402
|
action: ICurdAction;
|
|
420
|
-
actor?:
|
|
403
|
+
actor?: IRequestActor;
|
|
421
404
|
}
|
|
422
405
|
declare type TCurdActionEvent = {
|
|
423
406
|
action: ICurdAction;
|
|
424
407
|
type: ICurdSubAction;
|
|
425
408
|
record?: Record<string, any>;
|
|
426
409
|
values?: Record<string, any>;
|
|
410
|
+
source?: TActionEvent["source"];
|
|
427
411
|
};
|
|
428
412
|
declare const proCurdProps: () => {
|
|
429
413
|
/**
|
|
@@ -455,7 +439,7 @@ declare const proCurdProps: () => {
|
|
|
455
439
|
};
|
|
456
440
|
declare type CurdProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdProps>>>;
|
|
457
441
|
declare type ProCurdProps = CurdProps & Omit<ProModuleProps, "state" | "requests"> & {
|
|
458
|
-
curdState
|
|
442
|
+
curdState?: UnwrapNestedRefs<ICurdState>;
|
|
459
443
|
};
|
|
460
444
|
declare const ProCurd: vue.DefineComponent<ProCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProCurdProps>, {}>;
|
|
461
445
|
|
|
@@ -518,170 +502,125 @@ declare enum CurdAddAction {
|
|
|
518
502
|
}
|
|
519
503
|
declare type ICurdAddAction = keyof typeof CurdAddAction;
|
|
520
504
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
interface IProFormProvide extends IProFormProvideExtra {
|
|
524
|
-
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
525
|
-
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
526
|
-
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
527
|
-
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
528
|
-
readonly: Ref<boolean | undefined>;
|
|
529
|
-
elementMap?: TElementMap;
|
|
530
|
-
formElementMap?: TElementMap;
|
|
531
|
-
formItemVNodes: Ref<(VNode | null)[]>;
|
|
532
|
-
}
|
|
533
|
-
declare const useProForm: () => IProFormProvide;
|
|
534
|
-
declare const proFormProps: () => {
|
|
535
|
-
/**
|
|
536
|
-
* 同 antd 或 element form中的model
|
|
537
|
-
*/
|
|
538
|
-
model: {
|
|
505
|
+
declare const modalCurdProps: () => {
|
|
506
|
+
defaultAddRecord: {
|
|
539
507
|
type: PropType<Record<string, any>>;
|
|
540
508
|
};
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
* FormComponent 根据此项来确定组件是否显示
|
|
550
|
-
* rules 根据rules中方法生成showState对象
|
|
551
|
-
*/
|
|
552
|
-
showState: {
|
|
553
|
-
type: PropType<BooleanObjType>;
|
|
554
|
-
};
|
|
555
|
-
showStateRules: {
|
|
556
|
-
type: PropType<BooleanRulesObjType>;
|
|
509
|
+
};
|
|
510
|
+
declare type ModalCurdProps = Partial<ExtractPropTypes<ReturnType<typeof modalCurdProps>>>;
|
|
511
|
+
declare type ProModalCurdProps = ModalCurdProps & ProCurdProps;
|
|
512
|
+
declare const ProModalCurd: vue.DefineComponent<ProModalCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProModalCurdProps>, {}>;
|
|
513
|
+
|
|
514
|
+
declare const pageCurdProps: () => {
|
|
515
|
+
defaultAddRecord: {
|
|
516
|
+
type: PropType<Record<string, any>>;
|
|
557
517
|
};
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
*/
|
|
561
|
-
readonlyState: {
|
|
562
|
-
type: PropType<BooleanObjType>;
|
|
518
|
+
routeBack: {
|
|
519
|
+
type: PropType<(action: ICurdAction) => void>;
|
|
563
520
|
};
|
|
564
|
-
|
|
565
|
-
|
|
521
|
+
};
|
|
522
|
+
declare type PageCurdProps = Partial<ExtractPropTypes<ReturnType<typeof pageCurdProps>>>;
|
|
523
|
+
declare type ProPageCurdProps = PageCurdProps & ProCurdProps;
|
|
524
|
+
declare const ProPageCurd: vue.DefineComponent<ProPageCurdProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageCurdProps>, {}>;
|
|
525
|
+
|
|
526
|
+
declare const createCurdDesc: (Descriptions: any, DescriptionsItem: any) => any;
|
|
527
|
+
|
|
528
|
+
declare const proCurdAddOrEditProps: () => {
|
|
529
|
+
operateBar: {
|
|
530
|
+
type: BooleanConstructor;
|
|
531
|
+
default: boolean;
|
|
566
532
|
};
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
disableState: {
|
|
571
|
-
type: PropType<BooleanObjType>;
|
|
533
|
+
showContinueAdd: {
|
|
534
|
+
type: BooleanConstructor;
|
|
535
|
+
default: boolean;
|
|
572
536
|
};
|
|
573
|
-
|
|
574
|
-
type:
|
|
537
|
+
okText: {
|
|
538
|
+
type: StringConstructor;
|
|
539
|
+
default: string;
|
|
575
540
|
};
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
*/
|
|
579
|
-
columns: {
|
|
580
|
-
type: PropType<TColumns>;
|
|
541
|
+
okButtonProps: {
|
|
542
|
+
type: PropType<Record<string, any>>;
|
|
581
543
|
};
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
elementMap: {
|
|
586
|
-
type: PropType<TElementMap>;
|
|
544
|
+
continueText: {
|
|
545
|
+
type: StringConstructor;
|
|
546
|
+
default: string;
|
|
587
547
|
};
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
*/
|
|
591
|
-
formElementMap: {
|
|
592
|
-
type: PropType<TElementMap>;
|
|
548
|
+
continueButtonProps: {
|
|
549
|
+
type: PropType<Record<string, any>>;
|
|
593
550
|
};
|
|
551
|
+
};
|
|
552
|
+
declare type ProCurdAddOrEditProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdAddOrEditProps>>>;
|
|
553
|
+
declare const createCurdForm: (Form: any, Button: any, convertFormProps?: ((curdState: ICurdState) => Record<string, any>) | undefined) => any;
|
|
554
|
+
|
|
555
|
+
declare const proCurdListProps: () => {
|
|
594
556
|
/**
|
|
595
|
-
*
|
|
557
|
+
* extra 是否放到SearchForm中
|
|
596
558
|
*/
|
|
597
|
-
|
|
559
|
+
extraInSearch: {
|
|
598
560
|
type: BooleanConstructor;
|
|
599
|
-
default:
|
|
561
|
+
default: undefined;
|
|
600
562
|
};
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
*/
|
|
604
|
-
provideExtra: {
|
|
605
|
-
type: PropType<IProFormProvideExtra>;
|
|
563
|
+
searchProps: {
|
|
564
|
+
type: PropType<Record<string, any>>;
|
|
606
565
|
};
|
|
607
|
-
|
|
608
|
-
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
|
|
609
|
-
declare const ProForm: vue.DefineComponent<{
|
|
610
|
-
/**
|
|
611
|
-
* 同 antd 或 element form中的model
|
|
612
|
-
*/
|
|
613
|
-
model: {
|
|
566
|
+
tableProps: {
|
|
614
567
|
type: PropType<Record<string, any>>;
|
|
615
568
|
};
|
|
569
|
+
pageState: {
|
|
570
|
+
type: PropType<TPageState>;
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
declare type ProCurdListProps = Partial<ExtractPropTypes<ReturnType<typeof proCurdListProps>>>;
|
|
574
|
+
declare const createCurdList: (SearchForm: any, Table: any) => vue.DefineComponent<Partial<ExtractPropTypes<{
|
|
616
575
|
/**
|
|
617
|
-
*
|
|
576
|
+
* extra 是否放到SearchForm中
|
|
618
577
|
*/
|
|
619
|
-
|
|
578
|
+
extraInSearch: {
|
|
620
579
|
type: BooleanConstructor;
|
|
621
580
|
default: undefined;
|
|
622
581
|
};
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
* rules 根据rules中方法生成showState对象
|
|
626
|
-
*/
|
|
627
|
-
showState: {
|
|
628
|
-
type: PropType<BooleanObjType>;
|
|
629
|
-
};
|
|
630
|
-
showStateRules: {
|
|
631
|
-
type: PropType<BooleanRulesObjType>;
|
|
632
|
-
};
|
|
633
|
-
/**
|
|
634
|
-
* 是否只读
|
|
635
|
-
*/
|
|
636
|
-
readonlyState: {
|
|
637
|
-
type: PropType<BooleanObjType>;
|
|
638
|
-
};
|
|
639
|
-
readonlyStateRules: {
|
|
640
|
-
type: PropType<BooleanRulesObjType>;
|
|
582
|
+
searchProps: {
|
|
583
|
+
type: PropType<Record<string, any>>;
|
|
641
584
|
};
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
*/
|
|
645
|
-
disableState: {
|
|
646
|
-
type: PropType<BooleanObjType>;
|
|
585
|
+
tableProps: {
|
|
586
|
+
type: PropType<Record<string, any>>;
|
|
647
587
|
};
|
|
648
|
-
|
|
649
|
-
type: PropType<
|
|
650
|
-
};
|
|
651
|
-
/**
|
|
652
|
-
*
|
|
653
|
-
*/
|
|
654
|
-
columns: {
|
|
655
|
-
type: PropType<TColumns>;
|
|
588
|
+
pageState: {
|
|
589
|
+
type: PropType<TPageState>;
|
|
656
590
|
};
|
|
591
|
+
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
657
592
|
/**
|
|
658
|
-
*
|
|
593
|
+
* extra 是否放到SearchForm中
|
|
659
594
|
*/
|
|
660
|
-
|
|
661
|
-
type:
|
|
595
|
+
extraInSearch: {
|
|
596
|
+
type: BooleanConstructor;
|
|
597
|
+
default: undefined;
|
|
662
598
|
};
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
*/
|
|
666
|
-
formElementMap: {
|
|
667
|
-
type: PropType<TElementMap>;
|
|
599
|
+
searchProps: {
|
|
600
|
+
type: PropType<Record<string, any>>;
|
|
668
601
|
};
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
*/
|
|
672
|
-
needRules: {
|
|
673
|
-
type: BooleanConstructor;
|
|
674
|
-
default: boolean;
|
|
602
|
+
tableProps: {
|
|
603
|
+
type: PropType<Record<string, any>>;
|
|
675
604
|
};
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
*/
|
|
679
|
-
provideExtra: {
|
|
680
|
-
type: PropType<IProFormProvideExtra>;
|
|
605
|
+
pageState: {
|
|
606
|
+
type: PropType<TPageState>;
|
|
681
607
|
};
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
608
|
+
}>>>, {}>;
|
|
609
|
+
|
|
610
|
+
interface IProFormProvideExtra extends Record<string, any> {
|
|
611
|
+
}
|
|
612
|
+
interface IProFormProvide extends IProFormProvideExtra {
|
|
613
|
+
formState: UnwrapNestedRefs<Record<string, any>>;
|
|
614
|
+
showState: UnwrapNestedRefs<Record<string, any>>;
|
|
615
|
+
readonlyState: UnwrapNestedRefs<Record<string, any>>;
|
|
616
|
+
disableState: UnwrapNestedRefs<Record<string, any>>;
|
|
617
|
+
readonly: Ref<boolean | undefined>;
|
|
618
|
+
elementMap?: TElementMap;
|
|
619
|
+
formElementMap?: TElementMap;
|
|
620
|
+
columns: Ref<TColumns>;
|
|
621
|
+
}
|
|
622
|
+
declare const useProForm: () => IProFormProvide;
|
|
623
|
+
declare const proFormProps: () => {
|
|
685
624
|
/**
|
|
686
625
|
* 同 antd 或 element form中的model
|
|
687
626
|
*/
|
|
@@ -729,6 +668,9 @@ declare const ProForm: vue.DefineComponent<{
|
|
|
729
668
|
columns: {
|
|
730
669
|
type: PropType<TColumns>;
|
|
731
670
|
};
|
|
671
|
+
columnState: {
|
|
672
|
+
type: PropType<Record<string, any>>;
|
|
673
|
+
};
|
|
732
674
|
/**
|
|
733
675
|
* 展示控件集合,readonly模式下使用这些组件渲染
|
|
734
676
|
*/
|
|
@@ -754,10 +696,9 @@ declare const ProForm: vue.DefineComponent<{
|
|
|
754
696
|
provideExtra: {
|
|
755
697
|
type: PropType<IProFormProvideExtra>;
|
|
756
698
|
};
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
}>;
|
|
699
|
+
};
|
|
700
|
+
declare type ProFormProps = Partial<ExtractPropTypes<ReturnType<typeof proFormProps>>>;
|
|
701
|
+
declare const createForm: (Form: any, Grid: any) => any;
|
|
761
702
|
|
|
762
703
|
declare enum SearchMode {
|
|
763
704
|
AUTO = "AUTO",
|
|
@@ -799,6 +740,10 @@ declare const proSearchFormProps: () => {
|
|
|
799
740
|
debounceKeys: {
|
|
800
741
|
type: PropType<string[]>;
|
|
801
742
|
};
|
|
743
|
+
debounceTypes: {
|
|
744
|
+
type: PropType<string[]>;
|
|
745
|
+
default: string[];
|
|
746
|
+
};
|
|
802
747
|
debounceTime: {
|
|
803
748
|
type: NumberConstructor;
|
|
804
749
|
default: number;
|
|
@@ -809,85 +754,7 @@ declare type ProSearchFormProps = Partial<ExtractPropTypes<ReturnType<typeof pro
|
|
|
809
754
|
* 该组件只是个模式,最终返回null,不做任何渲染,应配合着ProForm的包装类一起使用
|
|
810
755
|
* 针对传入的model(监听对象)做相应的finish(回调)处理
|
|
811
756
|
*/
|
|
812
|
-
declare const
|
|
813
|
-
/**
|
|
814
|
-
* 需要监听的对象
|
|
815
|
-
*/
|
|
816
|
-
model: {
|
|
817
|
-
type: PropType<Record<string, any>>;
|
|
818
|
-
required: boolean;
|
|
819
|
-
};
|
|
820
|
-
/**
|
|
821
|
-
* 初始化触发 onFinish
|
|
822
|
-
*/
|
|
823
|
-
initEmit: {
|
|
824
|
-
type: BooleanConstructor;
|
|
825
|
-
default: boolean;
|
|
826
|
-
};
|
|
827
|
-
/**
|
|
828
|
-
* 模式 自动触发或者手动触发 onFinish
|
|
829
|
-
*/
|
|
830
|
-
searchMode: {
|
|
831
|
-
type: PropType<"AUTO" | "MANUAL">;
|
|
832
|
-
default: SearchMode;
|
|
833
|
-
};
|
|
834
|
-
/**
|
|
835
|
-
* 配置 同ProForm中的columns
|
|
836
|
-
* 可以根据column中valueType计算出默认的debounceKeys
|
|
837
|
-
*/
|
|
838
|
-
columns: {
|
|
839
|
-
type: PropType<TColumns>;
|
|
840
|
-
};
|
|
841
|
-
/**
|
|
842
|
-
* 需要debounce处理的字段
|
|
843
|
-
*/
|
|
844
|
-
debounceKeys: {
|
|
845
|
-
type: PropType<string[]>;
|
|
846
|
-
};
|
|
847
|
-
debounceTime: {
|
|
848
|
-
type: NumberConstructor;
|
|
849
|
-
default: number;
|
|
850
|
-
};
|
|
851
|
-
}>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
|
|
852
|
-
/**
|
|
853
|
-
* 需要监听的对象
|
|
854
|
-
*/
|
|
855
|
-
model: {
|
|
856
|
-
type: PropType<Record<string, any>>;
|
|
857
|
-
required: boolean;
|
|
858
|
-
};
|
|
859
|
-
/**
|
|
860
|
-
* 初始化触发 onFinish
|
|
861
|
-
*/
|
|
862
|
-
initEmit: {
|
|
863
|
-
type: BooleanConstructor;
|
|
864
|
-
default: boolean;
|
|
865
|
-
};
|
|
866
|
-
/**
|
|
867
|
-
* 模式 自动触发或者手动触发 onFinish
|
|
868
|
-
*/
|
|
869
|
-
searchMode: {
|
|
870
|
-
type: PropType<"AUTO" | "MANUAL">;
|
|
871
|
-
default: SearchMode;
|
|
872
|
-
};
|
|
873
|
-
/**
|
|
874
|
-
* 配置 同ProForm中的columns
|
|
875
|
-
* 可以根据column中valueType计算出默认的debounceKeys
|
|
876
|
-
*/
|
|
877
|
-
columns: {
|
|
878
|
-
type: PropType<TColumns>;
|
|
879
|
-
};
|
|
880
|
-
/**
|
|
881
|
-
* 需要debounce处理的字段
|
|
882
|
-
*/
|
|
883
|
-
debounceKeys: {
|
|
884
|
-
type: PropType<string[]>;
|
|
885
|
-
};
|
|
886
|
-
debounceTime: {
|
|
887
|
-
type: NumberConstructor;
|
|
888
|
-
default: number;
|
|
889
|
-
};
|
|
890
|
-
}>>>, {}>;
|
|
757
|
+
declare const createSearchForm: (Form: any, Props: any) => any;
|
|
891
758
|
|
|
892
759
|
interface FormItemProps {
|
|
893
760
|
name?: string | number | (string | number)[];
|
|
@@ -1001,25 +868,32 @@ declare const proFormListProps: () => {
|
|
|
1001
868
|
};
|
|
1002
869
|
};
|
|
1003
870
|
declare type ProFormListProps = Partial<ExtractPropTypes<ReturnType<typeof proFormListProps>>>;
|
|
1004
|
-
declare const
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
871
|
+
declare const createFormList: (FormItem: any) => any;
|
|
872
|
+
|
|
873
|
+
declare type TData = Record<string, any>;
|
|
874
|
+
/**
|
|
875
|
+
* 根据value从treeData中找到对象
|
|
876
|
+
* @param data
|
|
877
|
+
* @param value
|
|
878
|
+
* @param fieldNames
|
|
879
|
+
* @param cb 对象:同步 方法:回调,可以理解为异步
|
|
880
|
+
*/
|
|
881
|
+
declare const findTargetInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
882
|
+
target?: TData | undefined;
|
|
883
|
+
index?: number | undefined;
|
|
884
|
+
list?: TData[] | undefined;
|
|
885
|
+
} | ((index: number, target: TData, list: TData[]) => void)) => void;
|
|
886
|
+
/**
|
|
887
|
+
* 根据value从treeData中找出对象及父列表
|
|
888
|
+
* @param data
|
|
889
|
+
* @param value
|
|
890
|
+
* @param fieldNames
|
|
891
|
+
* @param cb
|
|
892
|
+
* @param parent
|
|
893
|
+
*/
|
|
894
|
+
declare const findTargetListInTree: (data: TData[], value: TOption["value"], fieldNames: FieldNames, cb: {
|
|
895
|
+
list?: TData[] | undefined;
|
|
896
|
+
} | ((list?: TData[] | undefined) => void), parent?: TData[]) => void;
|
|
1023
897
|
|
|
1024
898
|
/**
|
|
1025
899
|
* 剔除showState或showStateRules规则为!true的值
|
|
@@ -1032,6 +906,24 @@ declare const getValidValues: (values: Record<string, any>, showState?: BooleanO
|
|
|
1032
906
|
* string类型的path转为arr
|
|
1033
907
|
* @param path
|
|
1034
908
|
*/
|
|
1035
|
-
declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
|
|
909
|
+
declare const convertPathToList: (path: undefined | string | number | (string | number)[]) => undefined | (string | number)[];
|
|
910
|
+
/**
|
|
911
|
+
* 将listState 中的数据通过id merge到 list item中
|
|
912
|
+
* ps:数组会替换
|
|
913
|
+
* 注意:mergeWith 会改变原始对象
|
|
914
|
+
* @param list
|
|
915
|
+
* @param listState
|
|
916
|
+
* @param id
|
|
917
|
+
*/
|
|
918
|
+
declare const mergeStateToList: (list: Record<string, any>[], listState: Record<string, any>, id: string | number | ((item: Record<string, any>) => string | number)) => Record<string, any>[];
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* 唯一id
|
|
922
|
+
*/
|
|
923
|
+
declare const generateId: () => string;
|
|
924
|
+
/**
|
|
925
|
+
* ref 传递
|
|
926
|
+
*/
|
|
927
|
+
declare const createExpose: (methods: string[], targetRef: Ref$1) => {};
|
|
1036
928
|
|
|
1037
|
-
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdSubAction, FormItemProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, ProCurd,
|
|
929
|
+
export { BooleanObjType, BooleanRulesObjType, CurdAction, CurdAddAction, CurdCurrentMode, CurdSubAction, FieldNames, FormItemProps, GridProps, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IListData, IOperateItem, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, ProCurd, ProCurdAddOrEditProps, ProCurdListProps, ProCurdProps, ProFormItemProps, ProFormListProps, ProFormProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProPageCurd, ProPageCurdProps, ProSearchFormProps, ProTableProps, RequestAction, SearchMode, TActionEvent, TActionState, TColumn, TColumns, TCurdActionEvent, TData, TDefaultValueType, TElementMap, TOption, TOptions, TPageState, TTableColumn, TTableColumns, TValueType, convertPathToList, createCurdDesc, createCurdForm, createCurdList, createExpose, createForm, createFormItemCompFn, createFormList, createGrid, createSearchForm, createTable, defaultPage, findTargetInTree, findTargetListInTree, generateId, getColumnFormItemName, getColumnValueType, getFormItemEl, getItemEl, getValidValues, mergeStateToList, provideProCurd, provideProModule, useComposeRequestActor, useDoneRequestActor, useFailedRequestActor, useModuleEvent, useProCurd, useProForm, useProFormList, useProModule, useProTable };
|