@robot-admin/naive-ui-components 0.29.1 → 0.29.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/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/README_EN.md +1 -1
- package/dist/C_ActionBar.css +49 -49
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_BatchResult.css +11 -7
- package/dist/C_BatchResult2.cjs +1 -1
- package/dist/C_BatchResult2.js +1 -1
- package/dist/C_DataPicker.css +29 -21
- package/dist/C_DataPicker.d.cts +2 -2
- package/dist/C_DataPicker.d.ts +2 -2
- package/dist/C_DataPicker2.cjs +1 -1
- package/dist/C_DataPicker2.js +1 -1
- package/dist/C_FormModal.css +49 -49
- package/dist/C_Table.base.css +49 -49
- package/dist/C_Table.css +49 -49
- package/dist/C_Table.d.cts +1 -1
- package/dist/C_Table.d.ts +1 -1
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants2.d.cts +1 -1
- package/dist/constants2.d.ts +1 -1
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +10 -10
- package/dist/constants4.d.ts +10 -10
- package/dist/constants5.d.cts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/data2.d.cts +9 -9
- package/dist/data2.d.ts +9 -9
- package/dist/dateRange.d.cts +7 -2
- package/dist/dateRange.d.ts +7 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.vue.d.cts +4 -4
- package/dist/index.vue.d.ts +4 -4
- package/dist/index10.vue.d.cts +4 -4
- package/dist/index10.vue.d.ts +4 -4
- package/dist/index11.vue.d.cts +4 -4
- package/dist/index11.vue.d.ts +9 -4
- package/dist/index12.vue.d.cts +9 -4
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.cts +3 -3
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index17.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +6 -6
- package/dist/index18.vue.d.cts +6 -6
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.cts +1 -1
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index22.vue.d.ts +2 -2
- package/dist/index23.vue.d.cts +1 -1
- package/dist/index23.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +1 -1
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index26.vue.d.cts +2 -2
- package/dist/index26.vue.d.ts +2 -2
- package/dist/index27.vue.d.cts +1 -1
- package/dist/index27.vue.d.ts +1 -1
- package/dist/index3.vue.d.cts +4 -4
- package/dist/index3.vue.d.ts +4 -4
- package/dist/index30.vue.d.cts +2 -2
- package/dist/index30.vue.d.ts +2 -2
- package/dist/index31.vue.d.cts +2 -2
- package/dist/index31.vue.d.ts +2 -2
- package/dist/index5.vue.d.cts +2 -2
- package/dist/index9.vue.d.ts +4 -4
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/style.css +89 -77
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useCropperCore.d.cts +7 -7
- package/dist/useCropperCore.d.ts +7 -7
- package/dist/useEdgeInteraction.d.cts +3 -3
- package/dist/useEdgeInteraction.d.ts +3 -3
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useInfiniteScroll.d.cts +2 -2
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSignatureHistory.d.cts +5 -5
- package/dist/useSignatureHistory.d.ts +5 -5
- package/dist/useSplitResize.d.cts +7 -7
- package/dist/useSplitResize.d.ts +7 -7
- package/dist/useTableQuery.d.cts +12 -12
- package/dist/useTableQuery.d.ts +12 -12
- package/dist/useWorkflowValidation.d.cts +99 -99
- package/dist/useWorkflowValidation.d.ts +99 -99
- package/dist/verification.d.cts +5 -5
- package/dist/verification.d.ts +5 -5
- package/docs/guides/data-picker.md +8 -8
- package/docs/guides/usage.en.md +16 -15
- package/docs/guides/usage.md +16 -15
- package/package.json +1 -1
|
@@ -261,20 +261,20 @@ declare const __VLS_export: vue.DefineComponent<WorkflowProps, {
|
|
|
261
261
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
262
262
|
"update:modelValue": (value: WorkflowData) => any;
|
|
263
263
|
change: (value: WorkflowData) => any;
|
|
264
|
-
"validate-error": (errors: ValidationError[]) => any;
|
|
265
264
|
save: (data: WorkflowData) => any;
|
|
265
|
+
"validate-error": (errors: ValidationError[]) => any;
|
|
266
266
|
"node-click": (node: WorkflowNode<NodeType>) => any;
|
|
267
267
|
"edge-click": (edge: WorkflowEdge) => any;
|
|
268
268
|
}, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
|
|
269
269
|
"onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
|
|
270
270
|
onChange?: ((value: WorkflowData) => any) | undefined;
|
|
271
|
-
"onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
|
|
272
271
|
onSave?: ((data: WorkflowData) => any) | undefined;
|
|
272
|
+
"onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
|
|
273
273
|
"onNode-click"?: ((node: WorkflowNode<NodeType>) => any) | undefined;
|
|
274
274
|
"onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
|
|
275
275
|
}>, {
|
|
276
|
-
theme: "light" | "dark";
|
|
277
276
|
readonly: boolean;
|
|
277
|
+
theme: "light" | "dark";
|
|
278
278
|
users: User[];
|
|
279
279
|
roles: Role[];
|
|
280
280
|
departments: Department[];
|
|
@@ -304,19 +304,10 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
304
304
|
zIndex?: number | undefined;
|
|
305
305
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
306
306
|
expandParent?: boolean | undefined;
|
|
307
|
-
type: "
|
|
307
|
+
type: "start";
|
|
308
308
|
data: {
|
|
309
|
-
copyUsers?: {
|
|
310
|
-
id: string;
|
|
311
|
-
name: string;
|
|
312
|
-
avatar?: string | undefined;
|
|
313
|
-
department: string;
|
|
314
|
-
role: string;
|
|
315
|
-
email?: string | undefined;
|
|
316
|
-
phone?: string | undefined;
|
|
317
|
-
}[] | undefined;
|
|
318
309
|
title: string;
|
|
319
|
-
status
|
|
310
|
+
status: "active";
|
|
320
311
|
config?: Record<string, unknown> | undefined;
|
|
321
312
|
initiators?: {
|
|
322
313
|
id: string;
|
|
@@ -346,10 +337,20 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
346
337
|
zIndex?: number | undefined;
|
|
347
338
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
348
339
|
expandParent?: boolean | undefined;
|
|
349
|
-
type: "
|
|
340
|
+
type: "approval";
|
|
350
341
|
data: {
|
|
342
|
+
approvers?: {
|
|
343
|
+
id: string;
|
|
344
|
+
name: string;
|
|
345
|
+
avatar?: string | undefined;
|
|
346
|
+
department: string;
|
|
347
|
+
role: string;
|
|
348
|
+
email?: string | undefined;
|
|
349
|
+
phone?: string | undefined;
|
|
350
|
+
}[] | undefined;
|
|
351
|
+
approvalMode?: ApprovalMode | undefined;
|
|
351
352
|
title: string;
|
|
352
|
-
status
|
|
353
|
+
status?: NodeStatus | undefined;
|
|
353
354
|
config?: Record<string, unknown> | undefined;
|
|
354
355
|
initiators?: {
|
|
355
356
|
id: string;
|
|
@@ -379,9 +380,9 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
379
380
|
zIndex?: number | undefined;
|
|
380
381
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
381
382
|
expandParent?: boolean | undefined;
|
|
382
|
-
type: "
|
|
383
|
+
type: "copy";
|
|
383
384
|
data: {
|
|
384
|
-
|
|
385
|
+
copyUsers?: {
|
|
385
386
|
id: string;
|
|
386
387
|
name: string;
|
|
387
388
|
avatar?: string | undefined;
|
|
@@ -390,7 +391,6 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
390
391
|
email?: string | undefined;
|
|
391
392
|
phone?: string | undefined;
|
|
392
393
|
}[] | undefined;
|
|
393
|
-
approvalMode?: ApprovalMode | undefined;
|
|
394
394
|
title: string;
|
|
395
395
|
status?: NodeStatus | undefined;
|
|
396
396
|
config?: Record<string, unknown> | undefined;
|
|
@@ -462,19 +462,10 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
462
462
|
zIndex?: number | undefined;
|
|
463
463
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
464
464
|
expandParent?: boolean | undefined;
|
|
465
|
-
type: "
|
|
465
|
+
type: "start";
|
|
466
466
|
data: {
|
|
467
|
-
copyUsers?: {
|
|
468
|
-
id: string;
|
|
469
|
-
name: string;
|
|
470
|
-
avatar?: string | undefined;
|
|
471
|
-
department: string;
|
|
472
|
-
role: string;
|
|
473
|
-
email?: string | undefined;
|
|
474
|
-
phone?: string | undefined;
|
|
475
|
-
}[] | undefined;
|
|
476
467
|
title: string;
|
|
477
|
-
status
|
|
468
|
+
status: "active";
|
|
478
469
|
config?: Record<string, unknown> | undefined;
|
|
479
470
|
initiators?: {
|
|
480
471
|
id: string;
|
|
@@ -504,10 +495,20 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
504
495
|
zIndex?: number | undefined;
|
|
505
496
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
506
497
|
expandParent?: boolean | undefined;
|
|
507
|
-
type: "
|
|
498
|
+
type: "approval";
|
|
508
499
|
data: {
|
|
500
|
+
approvers?: {
|
|
501
|
+
id: string;
|
|
502
|
+
name: string;
|
|
503
|
+
avatar?: string | undefined;
|
|
504
|
+
department: string;
|
|
505
|
+
role: string;
|
|
506
|
+
email?: string | undefined;
|
|
507
|
+
phone?: string | undefined;
|
|
508
|
+
}[] | undefined;
|
|
509
|
+
approvalMode?: ApprovalMode | undefined;
|
|
509
510
|
title: string;
|
|
510
|
-
status
|
|
511
|
+
status?: NodeStatus | undefined;
|
|
511
512
|
config?: Record<string, unknown> | undefined;
|
|
512
513
|
initiators?: {
|
|
513
514
|
id: string;
|
|
@@ -537,9 +538,9 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
537
538
|
zIndex?: number | undefined;
|
|
538
539
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
539
540
|
expandParent?: boolean | undefined;
|
|
540
|
-
type: "
|
|
541
|
+
type: "copy";
|
|
541
542
|
data: {
|
|
542
|
-
|
|
543
|
+
copyUsers?: {
|
|
543
544
|
id: string;
|
|
544
545
|
name: string;
|
|
545
546
|
avatar?: string | undefined;
|
|
@@ -548,7 +549,6 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
548
549
|
email?: string | undefined;
|
|
549
550
|
phone?: string | undefined;
|
|
550
551
|
}[] | undefined;
|
|
551
|
-
approvalMode?: ApprovalMode | undefined;
|
|
552
552
|
title: string;
|
|
553
553
|
status?: NodeStatus | undefined;
|
|
554
554
|
config?: Record<string, unknown> | undefined;
|
|
@@ -673,19 +673,10 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
673
673
|
zIndex?: number | undefined;
|
|
674
674
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
675
675
|
expandParent?: boolean | undefined;
|
|
676
|
-
type: "
|
|
676
|
+
type: "start";
|
|
677
677
|
data: {
|
|
678
|
-
copyUsers?: {
|
|
679
|
-
id: string;
|
|
680
|
-
name: string;
|
|
681
|
-
avatar?: string | undefined;
|
|
682
|
-
department: string;
|
|
683
|
-
role: string;
|
|
684
|
-
email?: string | undefined;
|
|
685
|
-
phone?: string | undefined;
|
|
686
|
-
}[] | undefined;
|
|
687
678
|
title: string;
|
|
688
|
-
status
|
|
679
|
+
status: "active";
|
|
689
680
|
config?: Record<string, unknown> | undefined;
|
|
690
681
|
initiators?: {
|
|
691
682
|
id: string;
|
|
@@ -715,10 +706,20 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
715
706
|
zIndex?: number | undefined;
|
|
716
707
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
717
708
|
expandParent?: boolean | undefined;
|
|
718
|
-
type: "
|
|
709
|
+
type: "approval";
|
|
719
710
|
data: {
|
|
711
|
+
approvers?: {
|
|
712
|
+
id: string;
|
|
713
|
+
name: string;
|
|
714
|
+
avatar?: string | undefined;
|
|
715
|
+
department: string;
|
|
716
|
+
role: string;
|
|
717
|
+
email?: string | undefined;
|
|
718
|
+
phone?: string | undefined;
|
|
719
|
+
}[] | undefined;
|
|
720
|
+
approvalMode?: ApprovalMode | undefined;
|
|
720
721
|
title: string;
|
|
721
|
-
status
|
|
722
|
+
status?: NodeStatus | undefined;
|
|
722
723
|
config?: Record<string, unknown> | undefined;
|
|
723
724
|
initiators?: {
|
|
724
725
|
id: string;
|
|
@@ -748,9 +749,9 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
748
749
|
zIndex?: number | undefined;
|
|
749
750
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
750
751
|
expandParent?: boolean | undefined;
|
|
751
|
-
type: "
|
|
752
|
+
type: "copy";
|
|
752
753
|
data: {
|
|
753
|
-
|
|
754
|
+
copyUsers?: {
|
|
754
755
|
id: string;
|
|
755
756
|
name: string;
|
|
756
757
|
avatar?: string | undefined;
|
|
@@ -759,7 +760,6 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
759
760
|
email?: string | undefined;
|
|
760
761
|
phone?: string | undefined;
|
|
761
762
|
}[] | undefined;
|
|
762
|
-
approvalMode?: ApprovalMode | undefined;
|
|
763
763
|
title: string;
|
|
764
764
|
status?: NodeStatus | undefined;
|
|
765
765
|
config?: Record<string, unknown> | undefined;
|
|
@@ -831,19 +831,10 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
831
831
|
zIndex?: number | undefined;
|
|
832
832
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
833
833
|
expandParent?: boolean | undefined;
|
|
834
|
-
type: "
|
|
834
|
+
type: "start";
|
|
835
835
|
data: {
|
|
836
|
-
copyUsers?: {
|
|
837
|
-
id: string;
|
|
838
|
-
name: string;
|
|
839
|
-
avatar?: string | undefined;
|
|
840
|
-
department: string;
|
|
841
|
-
role: string;
|
|
842
|
-
email?: string | undefined;
|
|
843
|
-
phone?: string | undefined;
|
|
844
|
-
}[] | undefined;
|
|
845
836
|
title: string;
|
|
846
|
-
status
|
|
837
|
+
status: "active";
|
|
847
838
|
config?: Record<string, unknown> | undefined;
|
|
848
839
|
initiators?: {
|
|
849
840
|
id: string;
|
|
@@ -873,10 +864,20 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
873
864
|
zIndex?: number | undefined;
|
|
874
865
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
875
866
|
expandParent?: boolean | undefined;
|
|
876
|
-
type: "
|
|
867
|
+
type: "approval";
|
|
877
868
|
data: {
|
|
869
|
+
approvers?: {
|
|
870
|
+
id: string;
|
|
871
|
+
name: string;
|
|
872
|
+
avatar?: string | undefined;
|
|
873
|
+
department: string;
|
|
874
|
+
role: string;
|
|
875
|
+
email?: string | undefined;
|
|
876
|
+
phone?: string | undefined;
|
|
877
|
+
}[] | undefined;
|
|
878
|
+
approvalMode?: ApprovalMode | undefined;
|
|
878
879
|
title: string;
|
|
879
|
-
status
|
|
880
|
+
status?: NodeStatus | undefined;
|
|
880
881
|
config?: Record<string, unknown> | undefined;
|
|
881
882
|
initiators?: {
|
|
882
883
|
id: string;
|
|
@@ -906,9 +907,9 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
906
907
|
zIndex?: number | undefined;
|
|
907
908
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
908
909
|
expandParent?: boolean | undefined;
|
|
909
|
-
type: "
|
|
910
|
+
type: "copy";
|
|
910
911
|
data: {
|
|
911
|
-
|
|
912
|
+
copyUsers?: {
|
|
912
913
|
id: string;
|
|
913
914
|
name: string;
|
|
914
915
|
avatar?: string | undefined;
|
|
@@ -917,7 +918,6 @@ declare function useWorkflowNodes(props: WorkflowProps, emit: EmitFn$1, vueFlowR
|
|
|
917
918
|
email?: string | undefined;
|
|
918
919
|
phone?: string | undefined;
|
|
919
920
|
}[] | undefined;
|
|
920
|
-
approvalMode?: ApprovalMode | undefined;
|
|
921
921
|
title: string;
|
|
922
922
|
status?: NodeStatus | undefined;
|
|
923
923
|
config?: Record<string, unknown> | undefined;
|
|
@@ -1055,19 +1055,10 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1055
1055
|
zIndex?: number | undefined;
|
|
1056
1056
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1057
1057
|
expandParent?: boolean | undefined;
|
|
1058
|
-
type: "
|
|
1058
|
+
type: "start";
|
|
1059
1059
|
data: {
|
|
1060
|
-
copyUsers?: {
|
|
1061
|
-
id: string;
|
|
1062
|
-
name: string;
|
|
1063
|
-
avatar?: string | undefined;
|
|
1064
|
-
department: string;
|
|
1065
|
-
role: string;
|
|
1066
|
-
email?: string | undefined;
|
|
1067
|
-
phone?: string | undefined;
|
|
1068
|
-
}[] | undefined;
|
|
1069
1060
|
title: string;
|
|
1070
|
-
status
|
|
1061
|
+
status: "active";
|
|
1071
1062
|
config?: Record<string, unknown> | undefined;
|
|
1072
1063
|
initiators?: {
|
|
1073
1064
|
id: string;
|
|
@@ -1097,10 +1088,20 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1097
1088
|
zIndex?: number | undefined;
|
|
1098
1089
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1099
1090
|
expandParent?: boolean | undefined;
|
|
1100
|
-
type: "
|
|
1091
|
+
type: "approval";
|
|
1101
1092
|
data: {
|
|
1093
|
+
approvers?: {
|
|
1094
|
+
id: string;
|
|
1095
|
+
name: string;
|
|
1096
|
+
avatar?: string | undefined;
|
|
1097
|
+
department: string;
|
|
1098
|
+
role: string;
|
|
1099
|
+
email?: string | undefined;
|
|
1100
|
+
phone?: string | undefined;
|
|
1101
|
+
}[] | undefined;
|
|
1102
|
+
approvalMode?: ApprovalMode | undefined;
|
|
1102
1103
|
title: string;
|
|
1103
|
-
status
|
|
1104
|
+
status?: NodeStatus | undefined;
|
|
1104
1105
|
config?: Record<string, unknown> | undefined;
|
|
1105
1106
|
initiators?: {
|
|
1106
1107
|
id: string;
|
|
@@ -1130,9 +1131,9 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1130
1131
|
zIndex?: number | undefined;
|
|
1131
1132
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1132
1133
|
expandParent?: boolean | undefined;
|
|
1133
|
-
type: "
|
|
1134
|
+
type: "copy";
|
|
1134
1135
|
data: {
|
|
1135
|
-
|
|
1136
|
+
copyUsers?: {
|
|
1136
1137
|
id: string;
|
|
1137
1138
|
name: string;
|
|
1138
1139
|
avatar?: string | undefined;
|
|
@@ -1141,7 +1142,6 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1141
1142
|
email?: string | undefined;
|
|
1142
1143
|
phone?: string | undefined;
|
|
1143
1144
|
}[] | undefined;
|
|
1144
|
-
approvalMode?: ApprovalMode | undefined;
|
|
1145
1145
|
title: string;
|
|
1146
1146
|
status?: NodeStatus | undefined;
|
|
1147
1147
|
config?: Record<string, unknown> | undefined;
|
|
@@ -1230,19 +1230,10 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1230
1230
|
zIndex?: number | undefined;
|
|
1231
1231
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1232
1232
|
expandParent?: boolean | undefined;
|
|
1233
|
-
type: "
|
|
1233
|
+
type: "start";
|
|
1234
1234
|
data: {
|
|
1235
|
-
copyUsers?: {
|
|
1236
|
-
id: string;
|
|
1237
|
-
name: string;
|
|
1238
|
-
avatar?: string | undefined;
|
|
1239
|
-
department: string;
|
|
1240
|
-
role: string;
|
|
1241
|
-
email?: string | undefined;
|
|
1242
|
-
phone?: string | undefined;
|
|
1243
|
-
}[] | undefined;
|
|
1244
1235
|
title: string;
|
|
1245
|
-
status
|
|
1236
|
+
status: "active";
|
|
1246
1237
|
config?: Record<string, unknown> | undefined;
|
|
1247
1238
|
initiators?: {
|
|
1248
1239
|
id: string;
|
|
@@ -1272,10 +1263,20 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1272
1263
|
zIndex?: number | undefined;
|
|
1273
1264
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1274
1265
|
expandParent?: boolean | undefined;
|
|
1275
|
-
type: "
|
|
1266
|
+
type: "approval";
|
|
1276
1267
|
data: {
|
|
1268
|
+
approvers?: {
|
|
1269
|
+
id: string;
|
|
1270
|
+
name: string;
|
|
1271
|
+
avatar?: string | undefined;
|
|
1272
|
+
department: string;
|
|
1273
|
+
role: string;
|
|
1274
|
+
email?: string | undefined;
|
|
1275
|
+
phone?: string | undefined;
|
|
1276
|
+
}[] | undefined;
|
|
1277
|
+
approvalMode?: ApprovalMode | undefined;
|
|
1277
1278
|
title: string;
|
|
1278
|
-
status
|
|
1279
|
+
status?: NodeStatus | undefined;
|
|
1279
1280
|
config?: Record<string, unknown> | undefined;
|
|
1280
1281
|
initiators?: {
|
|
1281
1282
|
id: string;
|
|
@@ -1305,9 +1306,9 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1305
1306
|
zIndex?: number | undefined;
|
|
1306
1307
|
extent?: "parent" | [[number, number], [number, number]] | undefined;
|
|
1307
1308
|
expandParent?: boolean | undefined;
|
|
1308
|
-
type: "
|
|
1309
|
+
type: "copy";
|
|
1309
1310
|
data: {
|
|
1310
|
-
|
|
1311
|
+
copyUsers?: {
|
|
1311
1312
|
id: string;
|
|
1312
1313
|
name: string;
|
|
1313
1314
|
avatar?: string | undefined;
|
|
@@ -1316,7 +1317,6 @@ declare function useWorkflowPreview(nodes: Ref<WorkflowNode[]>, edges: Ref<Workf
|
|
|
1316
1317
|
email?: string | undefined;
|
|
1317
1318
|
phone?: string | undefined;
|
|
1318
1319
|
}[] | undefined;
|
|
1319
|
-
approvalMode?: ApprovalMode | undefined;
|
|
1320
1320
|
title: string;
|
|
1321
1321
|
status?: NodeStatus | undefined;
|
|
1322
1322
|
config?: Record<string, unknown> | undefined;
|
package/dist/verification.d.cts
CHANGED
|
@@ -76,24 +76,24 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
76
76
|
reset: () => void;
|
|
77
77
|
show: () => void;
|
|
78
78
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
79
|
-
change: (valid: boolean) => any;
|
|
80
79
|
reset: () => any;
|
|
80
|
+
change: (valid: boolean) => any;
|
|
81
81
|
success: (data: CaptchaSuccessPayload) => any;
|
|
82
|
-
"load-error": (error: unknown) => any;
|
|
83
82
|
fail: (error: string) => any;
|
|
84
83
|
"verify-error": (error: unknown) => any;
|
|
84
|
+
"load-error": (error: unknown) => any;
|
|
85
85
|
"visible-change": (visible: boolean) => any;
|
|
86
86
|
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
87
|
-
onChange?: ((valid: boolean) => any) | undefined;
|
|
88
87
|
onReset?: (() => any) | undefined;
|
|
88
|
+
onChange?: ((valid: boolean) => any) | undefined;
|
|
89
89
|
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
90
|
-
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
91
90
|
onFail?: ((error: string) => any) | undefined;
|
|
92
91
|
"onVerify-error"?: ((error: unknown) => any) | undefined;
|
|
92
|
+
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
93
93
|
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
|
-
theme: "light" | "dark";
|
|
96
95
|
disabled: boolean;
|
|
96
|
+
theme: "light" | "dark";
|
|
97
97
|
provider: CaptchaProvider;
|
|
98
98
|
images: string[];
|
|
99
99
|
verificationTimeout: number;
|
package/dist/verification.d.ts
CHANGED
|
@@ -76,24 +76,24 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
76
76
|
reset: () => void;
|
|
77
77
|
show: () => void;
|
|
78
78
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
79
|
-
change: (valid: boolean) => any;
|
|
80
79
|
reset: () => any;
|
|
80
|
+
change: (valid: boolean) => any;
|
|
81
81
|
success: (data: CaptchaSuccessPayload) => any;
|
|
82
|
-
"load-error": (error: unknown) => any;
|
|
83
82
|
fail: (error: string) => any;
|
|
84
83
|
"verify-error": (error: unknown) => any;
|
|
84
|
+
"load-error": (error: unknown) => any;
|
|
85
85
|
"visible-change": (visible: boolean) => any;
|
|
86
86
|
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
87
|
-
onChange?: ((valid: boolean) => any) | undefined;
|
|
88
87
|
onReset?: (() => any) | undefined;
|
|
88
|
+
onChange?: ((valid: boolean) => any) | undefined;
|
|
89
89
|
onSuccess?: ((data: CaptchaSuccessPayload) => any) | undefined;
|
|
90
|
-
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
91
90
|
onFail?: ((error: string) => any) | undefined;
|
|
92
91
|
"onVerify-error"?: ((error: unknown) => any) | undefined;
|
|
92
|
+
"onLoad-error"?: ((error: unknown) => any) | undefined;
|
|
93
93
|
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
|
-
theme: "light" | "dark";
|
|
96
95
|
disabled: boolean;
|
|
96
|
+
theme: "light" | "dark";
|
|
97
97
|
provider: CaptchaProvider;
|
|
98
98
|
images: string[];
|
|
99
99
|
verificationTimeout: number;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { ref } from 'vue'
|
|
8
8
|
import {
|
|
9
9
|
C_DataPicker,
|
|
10
|
-
type
|
|
10
|
+
type DataPickerSourceInput,
|
|
11
11
|
} from '@robot-admin/naive-ui-components/C_DataPicker'
|
|
12
12
|
import '@robot-admin/naive-ui-components/C_DataPicker/style.css'
|
|
13
13
|
|
|
@@ -19,12 +19,11 @@
|
|
|
19
19
|
const selected = ref<string[]>([])
|
|
20
20
|
|
|
21
21
|
// customerClient 是应用已有的请求/缓存适配器;signal 透传给真实请求。
|
|
22
|
-
const source:
|
|
22
|
+
const source: DataPickerSourceInput<Customer> = {
|
|
23
23
|
rowKey: 'id',
|
|
24
|
-
value: row => row.code,
|
|
25
24
|
label: row => row.name,
|
|
26
25
|
request: query => customerClient.page(query), // { rows: Customer[], total: number }
|
|
27
|
-
resolve: (
|
|
26
|
+
resolve: (ids, signal) => customerClient.byIds(ids, { signal }),
|
|
28
27
|
}
|
|
29
28
|
const columns = [
|
|
30
29
|
{ key: 'code', title: '客户编码', width: 140 },
|
|
@@ -46,7 +45,8 @@
|
|
|
46
45
|
|
|
47
46
|
## 值与会话
|
|
48
47
|
|
|
49
|
-
- `source.rowKey`
|
|
48
|
+
- `source.rowKey` 是表格行身份。省略 `source.value` 时,选择和回显直接使用行键;数值 `0` 和字符串 `'0'` 保持为两个不同的值。
|
|
49
|
+
- 业务提交值与行键不同时,显式配置 `value: row => row.code`,并让 `resolve` 按业务编码查询。行键和业务值均须稳定且唯一;`DataPickerSource<T>` 保留可直接调用的 `value(row)`,组件传参用 `DataPickerSourceInput<T>` 可省略它。
|
|
50
50
|
- 选择在本地草稿中进行,跨分页保留;只有“确认选择”或显式清空才发出 `update:modelValue`。取消、关闭弹窗、卸载不会提交草稿。
|
|
51
51
|
- 计划定位等操作可加上 `require-selection`,选中候选后才可确认。默认允许提交空选择。
|
|
52
52
|
- `select(rows)` 返回已解析的选中行。提供 `source.resolve(values, signal)` 可一次批量回显全部初值;未提供时,尚未加载的初值显示原编码且保留,不猜测标签,不逐条请求。需要完整 `rows` 事件的场景应提供 `resolve`。
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
```vue
|
|
73
73
|
<C_DataPicker
|
|
74
|
-
:model-value="form.
|
|
74
|
+
:model-value="form.customerId"
|
|
75
75
|
:source="source"
|
|
76
76
|
:columns="columns"
|
|
77
77
|
presentation="inline"
|
|
@@ -79,11 +79,11 @@
|
|
|
79
79
|
/>
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
`applyCustomer(rows)` 可从 `rows[0]`
|
|
82
|
+
`applyCustomer(rows)` 可从 `rows[0]` 取得完整实体。需要回显已有 ID 或业务编码时,继续提供 `resolve`。
|
|
83
83
|
|
|
84
84
|
## 多条件查询与固定上下文
|
|
85
85
|
|
|
86
|
-
声明 `
|
|
86
|
+
声明 `DataPickerSourceInput<Customer, CustomerFilters>`,在 `request` 中用 `filters` 接收业务类型。设置 `initialValues` 后,打开会用它查询第一页。翻页沿用最近提交的筛选条件,外部初值(例如组织)变化会关闭旧会话、取消请求并丢弃未确认选择。
|
|
87
87
|
|
|
88
88
|
`#query` 的 `initialValues`、`submit(filters)` 和 `loading` 可用于接入项目现有的查询控件。独立弹窗内可直接组合 `C_FormSearch`:
|
|
89
89
|
|
package/docs/guides/usage.en.md
CHANGED
|
@@ -173,6 +173,15 @@ Inside `NConfigProvider`, the popover follows its light/dark theme and primary c
|
|
|
173
173
|
|
|
174
174
|
## Recommended C_Form / C_Table setup
|
|
175
175
|
|
|
176
|
+
Start with the smallest setup for common pages:
|
|
177
|
+
|
|
178
|
+
| Use case | Minimal setup |
|
|
179
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
180
|
+
| Basic edit form | `<C_Form v-model="draft" :options="fields" />`; initialize `draft` with all business fields needed at submit time, including those not rendered. Use `useCForm()` if you also need to read, write, or validate outside the template. |
|
|
181
|
+
| Search and remote table | Use `{ onSearch: setQuery }` for the search config and `v-bind="bindings"` for the table, both from one `useTableQuery()` instance. |
|
|
182
|
+
| Local table | `<C_Table :data="rows" :columns="columns" />`; omit `row-key` if each row has a stable `id`. |
|
|
183
|
+
| Common toolbar | `<C_ActionBar :actions="[{ key: 'refresh', onClick: reload }]" />`; compact sizing, the icon, and the label are already provided. |
|
|
184
|
+
|
|
176
185
|
Declare the business model once and keep nested field paths, values, column keys, callbacks, and exposed methods type-safe:
|
|
177
186
|
|
|
178
187
|
```ts
|
|
@@ -472,9 +481,7 @@ Use `C_FormSearch` with `v-model`; legacy `formParams` remains supported. Put re
|
|
|
472
481
|
import { ref } from 'vue'
|
|
473
482
|
import {
|
|
474
483
|
C_FormSearch,
|
|
475
|
-
type SearchConfig,
|
|
476
484
|
type SearchFormItem,
|
|
477
|
-
type SearchFormParams,
|
|
478
485
|
} from '@robot-admin/naive-ui-components/C_FormSearch'
|
|
479
486
|
import {
|
|
480
487
|
C_Table,
|
|
@@ -483,31 +490,25 @@ Use `C_FormSearch` with `v-model`; legacy `formParams` remains supported. Put re
|
|
|
483
490
|
import '@robot-admin/naive-ui-components/C_FormSearch/style.css'
|
|
484
491
|
import '@robot-admin/naive-ui-components/C_Table/base.css'
|
|
485
492
|
|
|
486
|
-
const
|
|
487
|
-
const
|
|
493
|
+
const initialQuery = { keyword: '' }
|
|
494
|
+
const filters = ref({ ...initialQuery })
|
|
495
|
+
const searchFields: SearchFormItem<typeof initialQuery>[] = [
|
|
488
496
|
{ type: 'input', prop: 'keyword', placeholder: 'Keyword' },
|
|
489
497
|
]
|
|
490
498
|
const { bindings, loading, setQuery } = useTableQuery({
|
|
491
|
-
initialQuery
|
|
499
|
+
initialQuery,
|
|
492
500
|
columns,
|
|
493
|
-
rowKey: 'id',
|
|
494
501
|
request: loadUsers,
|
|
495
502
|
})
|
|
496
|
-
const applyQuery = (params: SearchFormParams) =>
|
|
497
|
-
setQuery({ keyword: String(params.keyword ?? '') })
|
|
498
|
-
const searchConfig: SearchConfig = {
|
|
499
|
-
requireValue: false,
|
|
500
|
-
onSearch: applyQuery,
|
|
501
|
-
}
|
|
502
503
|
</script>
|
|
503
504
|
|
|
504
505
|
<template>
|
|
505
506
|
<C_FormSearch
|
|
506
507
|
v-model="filters"
|
|
507
508
|
:form-item-list="searchFields"
|
|
508
|
-
:config="
|
|
509
|
+
:config="{ requireValue: false, onSearch: setQuery }"
|
|
509
510
|
:loading="loading"
|
|
510
|
-
@reset="
|
|
511
|
+
@reset="setQuery"
|
|
511
512
|
/>
|
|
512
513
|
<C_Table v-bind="bindings" />
|
|
513
514
|
</template>
|
|
@@ -515,7 +516,7 @@ Use `C_FormSearch` with `v-model`; legacy `formParams` remains supported. Put re
|
|
|
515
516
|
|
|
516
517
|
The search button, native form submission (including Enter in an input), and exposed `searchFn()` share validation and duplicate prevention. Only currently mounted search controls participate in Naive form validation. Editing conditions, enabling external loading, or unmounting during async validation cancels dispatch; requests receive the successfully validated snapshot. At least one non-pagination value is required by default; set `requireValue: false` to allow an empty query.
|
|
517
518
|
|
|
518
|
-
The `reset(params)` event follows the synchronous v-model update and carries the complete reset snapshot. Existing no-argument handlers remain compatible. Reset restores field defaults while retaining `pageNum/pageSize`; it does not automatically request or debounce. This example
|
|
519
|
+
The `reset(params)` event follows the synchronous v-model update and carries the complete reset snapshot. Existing no-argument handlers remain compatible. Reset restores field defaults while retaining `pageNum/pageSize`; it does not automatically request or debounce. This example uses `@reset="setQuery"` to reload on the first page. For custom fields declared as `SearchFormItem<Query>`, `render` infers `value` and `updateValue` from `prop`; arbitrary named field slots still require narrowing the actual value.
|
|
519
520
|
|
|
520
521
|
### Action configuration and asynchronous work
|
|
521
522
|
|
package/docs/guides/usage.md
CHANGED
|
@@ -194,6 +194,15 @@ Cron 支持秒到星期的六个数字字段、范围、间隔、列表及日/
|
|
|
194
194
|
|
|
195
195
|
## C_Form / C_Table 推荐用法
|
|
196
196
|
|
|
197
|
+
高频页面先从最少配置开始:
|
|
198
|
+
|
|
199
|
+
| 场景 | 最短接入 |
|
|
200
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
201
|
+
| 普通编辑表单 | `<C_Form v-model="draft" :options="fields" />`;提交需要完整业务模型时,用 `draft` 提供包括未渲染字段在内的初值。需要在模板外统一读写或校验时,再用 `useCForm()`。 |
|
|
202
|
+
| 搜索远程表格 | 搜索配置直接用 `{ onSearch: setQuery }`,表格用 `v-bind="bindings"`;`setQuery` 和 `bindings` 来自同一个 `useTableQuery()`。 |
|
|
203
|
+
| 本地表格 | `<C_Table :data="rows" :columns="columns" />`;行键是 `id` 时可省略 `row-key`。 |
|
|
204
|
+
| 常见工具栏 | `<C_ActionBar :actions="[{ key: 'refresh', onClick: reload }]" />`;紧凑尺寸、图标和文字都有默认值,只写有业务含义的覆盖。 |
|
|
205
|
+
|
|
197
206
|
推荐使用类型助手和绑定助手:业务模型只声明一次,字段路径、字段值、列 key、保存回调和实例方法即可保持同一套类型推导。字段支持 `profile.name`、`contacts.0.email` 这类嵌套路径。
|
|
198
207
|
|
|
199
208
|
```vue
|
|
@@ -611,9 +620,7 @@ const filters: SearchFormItem[] = [
|
|
|
611
620
|
import { ref } from 'vue'
|
|
612
621
|
import {
|
|
613
622
|
C_FormSearch,
|
|
614
|
-
type SearchConfig,
|
|
615
623
|
type SearchFormItem,
|
|
616
|
-
type SearchFormParams,
|
|
617
624
|
} from '@robot-admin/naive-ui-components/C_FormSearch'
|
|
618
625
|
import {
|
|
619
626
|
C_Table,
|
|
@@ -622,31 +629,25 @@ const filters: SearchFormItem[] = [
|
|
|
622
629
|
import '@robot-admin/naive-ui-components/C_FormSearch/style.css'
|
|
623
630
|
import '@robot-admin/naive-ui-components/C_Table/base.css'
|
|
624
631
|
|
|
625
|
-
const
|
|
626
|
-
const
|
|
632
|
+
const initialQuery = { keyword: '' }
|
|
633
|
+
const filters = ref({ ...initialQuery })
|
|
634
|
+
const searchFields: SearchFormItem<typeof initialQuery>[] = [
|
|
627
635
|
{ type: 'input', prop: 'keyword', placeholder: '关键词' },
|
|
628
636
|
]
|
|
629
637
|
const { bindings, loading, setQuery } = useTableQuery({
|
|
630
|
-
initialQuery
|
|
638
|
+
initialQuery,
|
|
631
639
|
columns,
|
|
632
|
-
rowKey: 'id',
|
|
633
640
|
request: loadUsers,
|
|
634
641
|
})
|
|
635
|
-
const applyQuery = (params: SearchFormParams) =>
|
|
636
|
-
setQuery({ keyword: String(params.keyword ?? '') })
|
|
637
|
-
const searchConfig: SearchConfig = {
|
|
638
|
-
requireValue: false,
|
|
639
|
-
onSearch: applyQuery,
|
|
640
|
-
}
|
|
641
642
|
</script>
|
|
642
643
|
|
|
643
644
|
<template>
|
|
644
645
|
<C_FormSearch
|
|
645
646
|
v-model="filters"
|
|
646
647
|
:form-item-list="searchFields"
|
|
647
|
-
:config="
|
|
648
|
+
:config="{ requireValue: false, onSearch: setQuery }"
|
|
648
649
|
:loading="loading"
|
|
649
|
-
@reset="
|
|
650
|
+
@reset="setQuery"
|
|
650
651
|
/>
|
|
651
652
|
<C_Table v-bind="bindings" />
|
|
652
653
|
</template>
|
|
@@ -654,7 +655,7 @@ const filters: SearchFormItem[] = [
|
|
|
654
655
|
|
|
655
656
|
搜索按钮、原生表单提交(含输入框 Enter)和实例 `searchFn()` 走同一校验与防重路径;仅当前挂载的搜索控件参与 Naive 表单校验。异步校验期间条件改变、外部 loading 开启或组件卸载,会取消本次派发,成功校验的快照才进入请求。默认要求至少一个非分页条件;需要空条件查询时设置 `requireValue: false`。
|
|
656
657
|
|
|
657
|
-
`reset(params)` 事件先同步更新 v-model,再通知重置后的完整快照;不带参数的旧回调继续可用。默认仅恢复字段默认值并保留 `pageNum/pageSize`,不自动查询、不添加 debounce
|
|
658
|
+
`reset(params)` 事件先同步更新 v-model,再通知重置后的完整快照;不带参数的旧回调继续可用。默认仅恢复字段默认值并保留 `pageNum/pageSize`,不自动查询、不添加 debounce。上例直接用 `@reset="setQuery"` 刷新并回到第一页。自定义字段使用 `SearchFormItem<Query>` 的 `render` 时,`value` 和 `updateValue` 会随 `prop` 推导;任意命名的字段插槽仍需在使用侧按实际值缩窄类型。
|
|
658
659
|
|
|
659
660
|
### 动作配置与异步执行
|
|
660
661
|
|