cnhis-design-vue 3.1.16 → 3.1.17-beta.0
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/es/packages/form-config/index.d.ts +7 -7
- package/es/packages/form-config/src/FormConfig.vue.d.ts +7 -7
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +4 -4
- package/es/packages/form-config/src/constants/index.d.ts +2 -2
- package/es/packages/form-render/index.d.ts +3 -3
- package/es/packages/form-render/src/FormRender.js +1 -1
- package/es/packages/form-render/src/FormRender.vue.d.ts +3 -3
- package/es/packages/form-render/src/components/renderer/formItem.js +1 -2
- package/es/packages/form-render/src/components/renderer/inputGroup.js +1 -1
- package/es/packages/form-render/src/components/renderer/select.js +11 -8
- package/es/packages/form-render/src/constants/index.d.ts +2 -2
- package/es/packages/form-render/src/hooks/useAnchor.d.ts +3 -3
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +2 -2
- package/es/packages/form-render/src/hooks/useFieldVisitor.js +6 -5
- package/es/packages/form-render/src/hooks/useFormRenderLifeCycle.d.ts +4 -4
- package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
- package/es/packages/form-render/src/types/index.d.ts +2 -2
- package/es/packages/form-render/src/utils/dom.d.ts +2 -2
- package/es/packages/form-render/src/utils/schema.d.ts +2 -2
- package/es/packages/shortcut-setter/index.d.ts +3 -3
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
- package/es/src/types/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -142,7 +142,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
142
142
|
FormConfigEdit: import("vue").DefineComponent<{}, {
|
|
143
143
|
key: import("vue").Ref<number>;
|
|
144
144
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
|
145
|
-
currentActiveField: import("vue").Ref<import("../../../es/src/types").
|
|
145
|
+
currentActiveField: import("vue").Ref<import("../../../es/src/types").UndefinedAble<import("./src/types").FormConfigItem>>;
|
|
146
146
|
fieldList: import("vue").Ref<{
|
|
147
147
|
[x: string]: any;
|
|
148
148
|
val_key: string;
|
|
@@ -3865,7 +3865,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3865
3865
|
lifeCycle: {
|
|
3866
3866
|
type: import("vue").PropType<Partial<{
|
|
3867
3867
|
onSetup(): void;
|
|
3868
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
3868
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
3869
3869
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
3870
3870
|
}>>;
|
|
3871
3871
|
};
|
|
@@ -3980,7 +3980,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3980
3980
|
lifeCycle: {
|
|
3981
3981
|
type: import("vue").PropType<Partial<{
|
|
3982
3982
|
onSetup(): void;
|
|
3983
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
3983
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
3984
3984
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
3985
3985
|
}>>;
|
|
3986
3986
|
};
|
|
@@ -5482,7 +5482,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5482
5482
|
lifeCycle: {
|
|
5483
5483
|
type: import("vue").PropType<Partial<{
|
|
5484
5484
|
onSetup(): void;
|
|
5485
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
5485
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
5486
5486
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
5487
5487
|
}>>;
|
|
5488
5488
|
};
|
|
@@ -8953,7 +8953,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8953
8953
|
lifeCycle: {
|
|
8954
8954
|
type: import("vue").PropType<Partial<{
|
|
8955
8955
|
onSetup(): void;
|
|
8956
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
8956
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
8957
8957
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
8958
8958
|
}>>;
|
|
8959
8959
|
};
|
|
@@ -9068,7 +9068,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9068
9068
|
lifeCycle: {
|
|
9069
9069
|
type: import("vue").PropType<Partial<{
|
|
9070
9070
|
onSetup(): void;
|
|
9071
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
9071
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
9072
9072
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
9073
9073
|
}>>;
|
|
9074
9074
|
};
|
|
@@ -10570,7 +10570,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10570
10570
|
lifeCycle: {
|
|
10571
10571
|
type: import("vue").PropType<Partial<{
|
|
10572
10572
|
onSetup(): void;
|
|
10573
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
10573
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
10574
10574
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
10575
10575
|
}>>;
|
|
10576
10576
|
};
|
|
@@ -144,7 +144,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
144
144
|
FormConfigEdit: import("vue").DefineComponent<{}, {
|
|
145
145
|
key: import("vue").Ref<number>;
|
|
146
146
|
formRenderRef: import("vue").Ref<import("../..").FormRenderExpose | undefined>;
|
|
147
|
-
currentActiveField: import("vue").Ref<import("../../../../es/src/types").
|
|
147
|
+
currentActiveField: import("vue").Ref<import("../../../../es/src/types").UndefinedAble<FormConfigItem>>;
|
|
148
148
|
fieldList: import("vue").Ref<{
|
|
149
149
|
[x: string]: any;
|
|
150
150
|
val_key: string;
|
|
@@ -3867,7 +3867,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3867
3867
|
lifeCycle: {
|
|
3868
3868
|
type: PropType<Partial<{
|
|
3869
3869
|
onSetup(): void;
|
|
3870
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
3870
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
3871
3871
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
3872
3872
|
}>>;
|
|
3873
3873
|
};
|
|
@@ -3982,7 +3982,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3982
3982
|
lifeCycle: {
|
|
3983
3983
|
type: PropType<Partial<{
|
|
3984
3984
|
onSetup(): void;
|
|
3985
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
3985
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
3986
3986
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
3987
3987
|
}>>;
|
|
3988
3988
|
};
|
|
@@ -5484,7 +5484,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5484
5484
|
lifeCycle: {
|
|
5485
5485
|
type: PropType<Partial<{
|
|
5486
5486
|
onSetup(): void;
|
|
5487
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
5487
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
5488
5488
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
5489
5489
|
}>>;
|
|
5490
5490
|
};
|
|
@@ -8955,7 +8955,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8955
8955
|
lifeCycle: {
|
|
8956
8956
|
type: PropType<Partial<{
|
|
8957
8957
|
onSetup(): void;
|
|
8958
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
8958
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
8959
8959
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
8960
8960
|
}>>;
|
|
8961
8961
|
};
|
|
@@ -9070,7 +9070,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9070
9070
|
lifeCycle: {
|
|
9071
9071
|
type: PropType<Partial<{
|
|
9072
9072
|
onSetup(): void;
|
|
9073
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
9073
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
9074
9074
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
9075
9075
|
}>>;
|
|
9076
9076
|
};
|
|
@@ -10572,7 +10572,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10572
10572
|
lifeCycle: {
|
|
10573
10573
|
type: PropType<Partial<{
|
|
10574
10574
|
onSetup(): void;
|
|
10575
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
10575
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
10576
10576
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
10577
10577
|
}>>;
|
|
10578
10578
|
};
|
|
@@ -3456,7 +3456,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3456
3456
|
lifeCycle: {
|
|
3457
3457
|
type: import("vue").PropType<Partial<{
|
|
3458
3458
|
onSetup(): void;
|
|
3459
|
-
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").
|
|
3459
|
+
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").UndefinedAble<import("../../../../src/types").AnyObject>;
|
|
3460
3460
|
afterRequest(fieldKey: string, payload?: any): import("../../../../src/types").AnyObject[];
|
|
3461
3461
|
}>>;
|
|
3462
3462
|
};
|
|
@@ -3571,7 +3571,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3571
3571
|
lifeCycle: {
|
|
3572
3572
|
type: import("vue").PropType<Partial<{
|
|
3573
3573
|
onSetup(): void;
|
|
3574
|
-
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").
|
|
3574
|
+
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").UndefinedAble<import("../../../../src/types").AnyObject>;
|
|
3575
3575
|
afterRequest(fieldKey: string, payload?: any): import("../../../../src/types").AnyObject[];
|
|
3576
3576
|
}>>;
|
|
3577
3577
|
};
|
|
@@ -5073,7 +5073,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5073
5073
|
lifeCycle: {
|
|
5074
5074
|
type: import("vue").PropType<Partial<{
|
|
5075
5075
|
onSetup(): void;
|
|
5076
|
-
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").
|
|
5076
|
+
beforeRequest(fieldKey: string, params?: import("../../../../src/types").AnyObject | undefined): void | import("../../../../src/types").UndefinedAble<import("../../../../src/types").AnyObject>;
|
|
5077
5077
|
afterRequest(fieldKey: string, payload?: any): import("../../../../src/types").AnyObject[];
|
|
5078
5078
|
}>>;
|
|
5079
5079
|
};
|
|
@@ -5,7 +5,7 @@ import { FormConfigItem } from '../../../../../es/packages/index';
|
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
6
6
|
key: import("vue").Ref<number>;
|
|
7
7
|
formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
|
|
8
|
-
currentActiveField: import("vue").Ref<import("../../../../../es/src/types").
|
|
8
|
+
currentActiveField: import("vue").Ref<import("../../../../../es/src/types").UndefinedAble<FormConfigItem>>;
|
|
9
9
|
fieldList: import("vue").Ref<{
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
val_key: string;
|
|
@@ -3728,7 +3728,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3728
3728
|
lifeCycle: {
|
|
3729
3729
|
type: import("vue").PropType<Partial<{
|
|
3730
3730
|
onSetup(): void;
|
|
3731
|
-
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").
|
|
3731
|
+
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").UndefinedAble<import("../../../../../es/src/types").AnyObject>;
|
|
3732
3732
|
afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
|
|
3733
3733
|
}>>;
|
|
3734
3734
|
};
|
|
@@ -3843,7 +3843,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3843
3843
|
lifeCycle: {
|
|
3844
3844
|
type: import("vue").PropType<Partial<{
|
|
3845
3845
|
onSetup(): void;
|
|
3846
|
-
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").
|
|
3846
|
+
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").UndefinedAble<import("../../../../../es/src/types").AnyObject>;
|
|
3847
3847
|
afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
|
|
3848
3848
|
}>>;
|
|
3849
3849
|
};
|
|
@@ -5345,7 +5345,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5345
5345
|
lifeCycle: {
|
|
5346
5346
|
type: import("vue").PropType<Partial<{
|
|
5347
5347
|
onSetup(): void;
|
|
5348
|
-
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").
|
|
5348
|
+
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").UndefinedAble<import("../../../../../es/src/types").AnyObject>;
|
|
5349
5349
|
afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
|
|
5350
5350
|
}>>;
|
|
5351
5351
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UndefinedAble } from '../../../../../es/src/types';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
3
|
import { FormConfigItem } from '../../../../../es/packages/form-config';
|
|
4
4
|
export declare const WidgetTextMap: Map<string, string>;
|
|
@@ -59,4 +59,4 @@ export declare function isNullOptionConfig(): {
|
|
|
59
59
|
value: boolean;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
export declare const InjectionActiveFieldItem: InjectionKey<Ref<
|
|
62
|
+
export declare const InjectionActiveFieldItem: InjectionKey<Ref<UndefinedAble<FormConfigItem>>>;
|
|
@@ -112,7 +112,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
112
112
|
lifeCycle: {
|
|
113
113
|
type: import("vue").PropType<Partial<{
|
|
114
114
|
onSetup(): void;
|
|
115
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
115
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
116
116
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
117
117
|
}>>;
|
|
118
118
|
};
|
|
@@ -227,7 +227,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
227
227
|
lifeCycle: {
|
|
228
228
|
type: import("vue").PropType<Partial<{
|
|
229
229
|
onSetup(): void;
|
|
230
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
230
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
231
231
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
232
232
|
}>>;
|
|
233
233
|
};
|
|
@@ -1729,7 +1729,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1729
1729
|
lifeCycle: {
|
|
1730
1730
|
type: import("vue").PropType<Partial<{
|
|
1731
1731
|
onSetup(): void;
|
|
1732
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
1732
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
1733
1733
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
1734
1734
|
}>>;
|
|
1735
1735
|
};
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
fieldList: { type: Array },
|
|
26
26
|
initialData: { type: Object, default: () => ({}) },
|
|
27
27
|
fieldVisitor: { type: Object },
|
|
28
|
-
column: { type: Number, default:
|
|
28
|
+
column: { type: Number, default: 24 },
|
|
29
29
|
maxHeight: { type: [Number, String], default: "" },
|
|
30
30
|
anchor: { type: Boolean, default: false },
|
|
31
31
|
parallelism: { type: Number, default: 3 },
|
|
@@ -112,7 +112,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
112
|
lifeCycle: {
|
|
113
113
|
type: PropType<Partial<{
|
|
114
114
|
onSetup(): void;
|
|
115
|
-
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").
|
|
115
|
+
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<AnyObject>;
|
|
116
116
|
afterRequest(fieldKey: string, payload?: any): AnyObject[];
|
|
117
117
|
}>>;
|
|
118
118
|
};
|
|
@@ -227,7 +227,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
227
|
lifeCycle: {
|
|
228
228
|
type: PropType<Partial<{
|
|
229
229
|
onSetup(): void;
|
|
230
|
-
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").
|
|
230
|
+
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<AnyObject>;
|
|
231
231
|
afterRequest(fieldKey: string, payload?: any): AnyObject[];
|
|
232
232
|
}>>;
|
|
233
233
|
};
|
|
@@ -1729,7 +1729,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1729
1729
|
lifeCycle: {
|
|
1730
1730
|
type: PropType<Partial<{
|
|
1731
1731
|
onSetup(): void;
|
|
1732
|
-
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").
|
|
1732
|
+
beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<AnyObject>;
|
|
1733
1733
|
afterRequest(fieldKey: string, payload?: any): AnyObject[];
|
|
1734
1734
|
}>>;
|
|
1735
1735
|
};
|
|
@@ -64,14 +64,13 @@ const script = defineComponent({
|
|
|
64
64
|
const FORM_ITEM = connect(script, mapProps({
|
|
65
65
|
title: "label"
|
|
66
66
|
}, (props, field) => {
|
|
67
|
-
var _a;
|
|
68
67
|
const feedback = !isVoidField(field) ? field.selfErrors.length ? field.selfErrors.join(",") : void 0 : void 0;
|
|
69
68
|
return {
|
|
70
69
|
...props,
|
|
71
70
|
required: isVoidField(field) ? void 0 : field.required,
|
|
72
71
|
class: "form-render__formItem",
|
|
73
72
|
style: {
|
|
74
|
-
"--form-item-column":
|
|
73
|
+
"--form-item-column": props.span
|
|
75
74
|
},
|
|
76
75
|
feedback,
|
|
77
76
|
"validation-status": feedback ? "error" : void 0
|
|
@@ -2,7 +2,7 @@ import { connect, mapProps } from '@formily/vue';
|
|
|
2
2
|
import { NInputGroup } from 'naive-ui';
|
|
3
3
|
|
|
4
4
|
const INPUT_GROUP = connect(NInputGroup, mapProps((props) => {
|
|
5
|
-
return { style: { "--column": props.span
|
|
5
|
+
return { style: { "--column": props.span }, class: "form-render__inputGroup" };
|
|
6
6
|
}));
|
|
7
7
|
|
|
8
8
|
export { INPUT_GROUP };
|
|
@@ -72,12 +72,12 @@ const script = defineComponent({
|
|
|
72
72
|
try {
|
|
73
73
|
traverseDependKey(config.dependKey, (dependKey, valueKey2, required) => {
|
|
74
74
|
const _field = field2.query(dependKey).take();
|
|
75
|
-
if (isField(_field))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
_params[valueKey2] = _field.value;
|
|
75
|
+
if (!isField(_field))
|
|
76
|
+
return;
|
|
77
|
+
if (required && _field.value == null) {
|
|
78
|
+
throw `\u7F3A\u5C11\u5FC5\u987B\u7684\u53C2\u6570=>${dependKey}`;
|
|
80
79
|
}
|
|
80
|
+
_params[valueKey2] = _field.value;
|
|
81
81
|
});
|
|
82
82
|
} catch (e) {
|
|
83
83
|
return Promise.reject(e);
|
|
@@ -105,11 +105,14 @@ const script = defineComponent({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
108
|
-
changeContextCollector
|
|
108
|
+
changeContextCollector.setContext(fieldKey.value, async () => {
|
|
109
109
|
await nextTick();
|
|
110
110
|
return {
|
|
111
|
-
currentOption: cloneDeep(
|
|
111
|
+
currentOption: cloneDeep(getCurrentOption())
|
|
112
112
|
};
|
|
113
|
+
function getCurrentOption() {
|
|
114
|
+
return parsedOptions.value.find((option) => option[valueKey.value] === valueRef.value);
|
|
115
|
+
}
|
|
113
116
|
});
|
|
114
117
|
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
115
118
|
watch(() => props.urlConfig, (config, oldConfig) => {
|
|
@@ -120,7 +123,7 @@ const script = defineComponent({
|
|
|
120
123
|
return;
|
|
121
124
|
formItemDepsCollector.setDeps(fieldKey.value, config.dependKey || [], async () => {
|
|
122
125
|
remoteOptions.value = null;
|
|
123
|
-
|
|
126
|
+
valueRef.value = null;
|
|
124
127
|
!props.lazyRequest && await fetchData();
|
|
125
128
|
});
|
|
126
129
|
(valueRef.value || !props.lazyRequest) && fetchData();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable } from '../../../../../es/src/types';
|
|
2
2
|
import { ContextCollector } from '../../../../../es/packages/form-render/src/hooks/useChangeContext';
|
|
3
3
|
import { BusinessCollector, FormItemDepsCollector } from '../hooks';
|
|
4
4
|
import { FormAsyncQueue } from '../types';
|
|
@@ -9,7 +9,7 @@ export declare const InjectionBusinessCollector: InjectionKey<BusinessCollector>
|
|
|
9
9
|
export declare const InjectionChangeContextCollector: InjectionKey<ContextCollector>;
|
|
10
10
|
export declare const InjectionFormItemDepsCollector: InjectionKey<FormItemDepsCollector>;
|
|
11
11
|
export declare const InjectionFormUUID: InjectionKey<string>;
|
|
12
|
-
export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<
|
|
12
|
+
export declare const InjectionAnnotation: InjectionKey<WritableComputedRef<Nullable<Record<string, string>>>>;
|
|
13
13
|
export declare const FormItemLineBarDepKeyPrepend = "__dep_LINEBAR_";
|
|
14
14
|
export declare enum FIELD_BUSINESS_TYPE {
|
|
15
15
|
PASSWORD = "password",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UndefinedAble } from '../../../../../es/src/types';
|
|
2
2
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { FormItemDepsCollector, FormRenderProps } from '../../../../../es/packages/form-render';
|
|
5
|
-
export declare function useAnchor(props: Readonly<FormRenderProps>, scrollbarRef: Ref<
|
|
5
|
+
export declare function useAnchor(props: Readonly<FormRenderProps>, scrollbarRef: Ref<UndefinedAble<HTMLElement>>, collector: FormItemDepsCollector): {
|
|
6
6
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
7
7
|
onScroll: () => void;
|
|
8
8
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
@@ -11,6 +11,6 @@ export declare function useAnchor(props: Readonly<FormRenderProps>, scrollbarRef
|
|
|
11
11
|
title: string;
|
|
12
12
|
}[]>;
|
|
13
13
|
generateAnchorList: (schema: ISchema) => void;
|
|
14
|
-
scrollbarRef: Ref<
|
|
14
|
+
scrollbarRef: Ref<UndefinedAble<HTMLElement>>;
|
|
15
15
|
scrollTo: (id: string) => Promise<void>;
|
|
16
16
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, UndefinedAble } from '../../../../../es/src/types';
|
|
2
2
|
import { FormAsyncQueueItem } from '../types';
|
|
3
3
|
declare type ProcessorOption = Partial<{
|
|
4
4
|
afterRequest(key: string, payload?: unknown): AnyObject[];
|
|
5
|
-
beforeRequest(key: string, params?: unknown):
|
|
5
|
+
beforeRequest(key: string, params?: unknown): UndefinedAble<AnyObject> | void;
|
|
6
6
|
}>;
|
|
7
7
|
interface EntryCallback {
|
|
8
8
|
(err?: any, result?: any): void;
|
|
@@ -3,8 +3,6 @@ import { isFunction } from '@vueuse/core';
|
|
|
3
3
|
|
|
4
4
|
function useFieldVisitor() {
|
|
5
5
|
function traverse(fieldList, visitorMap, key = "val_key") {
|
|
6
|
-
if (!visitorMap)
|
|
7
|
-
return fieldList;
|
|
8
6
|
return fieldList.reduce((fin, field) => {
|
|
9
7
|
if (Array.isArray(field.children)) {
|
|
10
8
|
field.children = traverse(field.children, visitorMap, key);
|
|
@@ -15,7 +13,7 @@ function useFieldVisitor() {
|
|
|
15
13
|
if (field.suffixConfig) {
|
|
16
14
|
field.suffixConfig = traverse(arrayed(field.suffixConfig), visitorMap, key);
|
|
17
15
|
}
|
|
18
|
-
const visitor = visitorMap[field[key]];
|
|
16
|
+
const visitor = visitorMap == null ? void 0 : visitorMap[field[key]];
|
|
19
17
|
let current = field;
|
|
20
18
|
const before = [];
|
|
21
19
|
const after = [];
|
|
@@ -31,10 +29,13 @@ function useFieldVisitor() {
|
|
|
31
29
|
after.push(...arrayed(field2));
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
|
-
fin.
|
|
35
|
-
return fin;
|
|
32
|
+
return fin.concat([...before, current, ...after].map(defaultTransfer));
|
|
36
33
|
}, []);
|
|
37
34
|
}
|
|
35
|
+
function defaultTransfer(field) {
|
|
36
|
+
field.elem_width = ~~((field.elem_width || 3) * 2);
|
|
37
|
+
return field;
|
|
38
|
+
}
|
|
38
39
|
return { traverse };
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UndefinedAble } from '../../../../../es/src/types';
|
|
2
2
|
import { FormRenderLifeCycle, FormRenderProps } from '../../../../../es/packages/form-render';
|
|
3
3
|
export declare function useFormRenderLifeCycle(props: FormRenderProps): {
|
|
4
4
|
callLifeCycle: <T extends "onSetup" | "beforeRequest" | "afterRequest">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
|
|
5
5
|
onSetup(): void;
|
|
6
|
-
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void |
|
|
6
|
+
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/src/types").AnyObject>;
|
|
7
7
|
afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
|
|
8
|
-
}>>[T]> | undefined) =>
|
|
8
|
+
}>>[T]> | undefined) => UndefinedAble<ReturnType<Required<Partial<{
|
|
9
9
|
onSetup(): void;
|
|
10
|
-
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void |
|
|
10
|
+
beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | UndefinedAble<import("../../../../../es/src/types").AnyObject>;
|
|
11
11
|
afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
|
|
12
12
|
}>>[T]>>;
|
|
13
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Func,
|
|
1
|
+
import { Func, Nullable } from '../../../../../es/src/types';
|
|
2
2
|
declare type RequestInstance = Record<string, Func>;
|
|
3
3
|
export declare function useFormRequest(): {
|
|
4
|
-
getHttpInstance: () =>
|
|
4
|
+
getHttpInstance: () => Nullable<RequestInstance>;
|
|
5
5
|
registGlobHttpInstance: (instance: RequestInstance) => void;
|
|
6
6
|
};
|
|
7
7
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject,
|
|
1
|
+
import { AnyObject, UndefinedAble } from '../../../../../es/src/types';
|
|
2
2
|
import { DataField, Field } from '@formily/core';
|
|
3
3
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
4
4
|
import { Component, FunctionalComponent } from 'vue';
|
|
@@ -52,7 +52,7 @@ export declare type DependKeyType = string | Record<string, string> | Array<{
|
|
|
52
52
|
} | string>;
|
|
53
53
|
export declare type FormRenderLifeCycle = Partial<{
|
|
54
54
|
onSetup(): void;
|
|
55
|
-
beforeRequest(fieldKey: string, params?: AnyObject):
|
|
55
|
+
beforeRequest(fieldKey: string, params?: AnyObject): UndefinedAble<AnyObject> | void;
|
|
56
56
|
afterRequest(fieldKey: string, payload?: any): AnyObject[];
|
|
57
57
|
}>;
|
|
58
58
|
export declare type FormRenderProps = Partial<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable } from '../../../../../es/src/types';
|
|
2
2
|
export declare function queryDecorator(key: string, wrapperElement: HTMLElement, formUUID: string): HTMLElement | null;
|
|
3
|
-
export declare function queryInput(decoratorElement?:
|
|
3
|
+
export declare function queryInput(decoratorElement?: Nullable<HTMLElement>): {
|
|
4
4
|
widgetElement: HTMLInputElement | null | undefined;
|
|
5
5
|
widgetElementList: HTMLInputElement[];
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject
|
|
1
|
+
import { AnyObject } from '../../../../../es/src/types';
|
|
2
2
|
import { GeneralField } from '@formily/core';
|
|
3
3
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
4
4
|
import { DependKeyType, FieldItem } from '../../../../../es/packages/form-render';
|
|
@@ -9,7 +9,7 @@ export declare function createLinebarId(id: string): string;
|
|
|
9
9
|
export declare function traverseDependKey(dependKeys: DependKeyType, handler: {
|
|
10
10
|
(dependKey: string, valueKey: string, required?: boolean): void;
|
|
11
11
|
}): void;
|
|
12
|
-
export declare function getParentLinebar(key: string, fieldList: FieldItem[]):
|
|
12
|
+
export declare function getParentLinebar(key: string, fieldList: FieldItem[]): string | null;
|
|
13
13
|
export declare function assignUpdateValue(props: AnyObject, field: GeneralField): {
|
|
14
14
|
[x: string]: any;
|
|
15
15
|
};
|
|
@@ -1808,7 +1808,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1808
1808
|
lifeCycle: {
|
|
1809
1809
|
type: import("vue").PropType<Partial<{
|
|
1810
1810
|
onSetup(): void;
|
|
1811
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
1811
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
1812
1812
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
1813
1813
|
}>>;
|
|
1814
1814
|
};
|
|
@@ -1923,7 +1923,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1923
1923
|
lifeCycle: {
|
|
1924
1924
|
type: import("vue").PropType<Partial<{
|
|
1925
1925
|
onSetup(): void;
|
|
1926
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
1926
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
1927
1927
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
1928
1928
|
}>>;
|
|
1929
1929
|
};
|
|
@@ -3425,7 +3425,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3425
3425
|
lifeCycle: {
|
|
3426
3426
|
type: import("vue").PropType<Partial<{
|
|
3427
3427
|
onSetup(): void;
|
|
3428
|
-
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").
|
|
3428
|
+
beforeRequest(fieldKey: string, params?: import("../../../es/src/types").AnyObject | undefined): void | import("../../../es/src/types").UndefinedAble<import("../../../es/src/types").AnyObject>;
|
|
3429
3429
|
afterRequest(fieldKey: string, payload?: any): import("../../../es/src/types").AnyObject[];
|
|
3430
3430
|
}>>;
|
|
3431
3431
|
};
|
|
@@ -1810,7 +1810,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1810
1810
|
lifeCycle: {
|
|
1811
1811
|
type: import("vue").PropType<Partial<{
|
|
1812
1812
|
onSetup(): void;
|
|
1813
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
1813
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
1814
1814
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
1815
1815
|
}>>;
|
|
1816
1816
|
};
|
|
@@ -1925,7 +1925,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1925
1925
|
lifeCycle: {
|
|
1926
1926
|
type: import("vue").PropType<Partial<{
|
|
1927
1927
|
onSetup(): void;
|
|
1928
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
1928
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
1929
1929
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
1930
1930
|
}>>;
|
|
1931
1931
|
};
|
|
@@ -3427,7 +3427,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3427
3427
|
lifeCycle: {
|
|
3428
3428
|
type: import("vue").PropType<Partial<{
|
|
3429
3429
|
onSetup(): void;
|
|
3430
|
-
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").
|
|
3430
|
+
beforeRequest(fieldKey: string, params?: import("../../../../es/src/types").AnyObject | undefined): void | import("../../../../es/src/types").UndefinedAble<import("../../../../es/src/types").AnyObject>;
|
|
3431
3431
|
afterRequest(fieldKey: string, payload?: any): import("../../../../es/src/types").AnyObject[];
|
|
3432
3432
|
}>>;
|
|
3433
3433
|
};
|
package/es/src/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare type SFCWithInstall<T> = T & {
|
|
|
4
4
|
};
|
|
5
5
|
export declare type AnyObject = Record<string, any>;
|
|
6
6
|
export declare type Func<T extends Array<any> = any[], P = any> = (...args: T) => P;
|
|
7
|
-
export declare type
|
|
8
|
-
export declare type
|
|
7
|
+
export declare type Nullable<T> = T | null | undefined;
|
|
8
|
+
export declare type UndefinedAble<T> = T | undefined;
|
|
9
9
|
export declare type ArrayAble<T> = T | T[];
|
|
10
10
|
export declare type MapValue<T> = T extends Map<any, infer P> ? P : any;
|