cnhis-design-vue 3.1.16-beta.5 → 3.1.16-beta.8
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/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/packages/fabric-chart/src/hooks/constant.js +4 -4
- package/es/packages/fabric-chart/src/hooks/useCenter.js +20 -23
- package/es/packages/fabric-chart/src/hooks/useDraw.js +11 -4
- package/es/packages/fabric-chart/src/hooks/useEvent.js +11 -3
- package/es/packages/fabric-chart/src/hooks/useLeft.js +8 -4
- package/es/packages/fabric-chart/src/hooks/useTop.js +5 -8
- package/es/packages/form-config/index.d.ts +38 -24
- package/es/packages/form-config/src/FormConfig.vue.d.ts +38 -24
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +10 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +15 -8
- package/es/packages/form-config/src/hooks/useSortable.d.ts +1 -0
- package/es/packages/form-render/index.d.ts +10 -3
- package/es/packages/form-render/src/FormRender.js +1 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +11 -4
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +2 -14
- package/es/packages/form-render/src/components/renderer/cascader.js +2 -2
- package/es/packages/form-render/src/components/renderer/date.d.ts +20 -4
- package/es/packages/form-render/src/components/renderer/date.js +36 -20
- package/es/packages/form-render/src/components/renderer/select.d.ts +1 -10
- package/es/packages/form-render/src/components/renderer/select.js +11 -8
- package/es/packages/form-render/src/components/renderer/slider.d.ts +8 -344
- package/es/packages/form-render/src/components/renderer/slider.js +23 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +7 -4
- package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +5 -2
- package/es/packages/form-render/src/hooks/useBusinessBinding.js +9 -5
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +3 -3
- package/es/packages/form-render/src/hooks/useFormContext.js +1 -1
- package/es/packages/form-render/src/hooks/useFormValidator.js +13 -3
- package/es/packages/form-render/src/hooks/useInitialData.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useInitialData.js +9 -4
- package/es/packages/form-render/src/types/fieldItem.d.ts +11 -12
- package/es/packages/form-render/src/types/index.d.ts +7 -0
- package/es/packages/form-render/src/utils/business.js +15 -2
- package/es/packages/form-render/src/utils/index.d.ts +1 -1
- package/es/packages/form-render/src/utils/index.js +5 -2
- package/es/packages/form-render/src/utils/schema.d.ts +1 -0
- package/es/packages/form-render/src/utils/schema.js +12 -1
- package/es/packages/shortcut-setter/index.d.ts +15 -8
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -8
- package/package.json +1 -1
|
@@ -76,16 +76,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
76
76
|
date_format?: string | undefined;
|
|
77
77
|
step_length?: string | number | undefined;
|
|
78
78
|
urlConfig?: {
|
|
79
|
-
url
|
|
80
|
-
method?: "
|
|
79
|
+
url: string;
|
|
80
|
+
method?: import("../../../../../es/packages/form-render").FormRequestType | undefined;
|
|
81
|
+
nameKey?: string | undefined;
|
|
82
|
+
valueKey?: string | undefined;
|
|
83
|
+
params?: AnyObject | undefined;
|
|
81
84
|
dependKey?: string | Record<string, string> | (string | {
|
|
82
85
|
paramName: string;
|
|
83
86
|
paramValue?: string | undefined;
|
|
84
87
|
required?: boolean | undefined;
|
|
85
88
|
})[] | undefined;
|
|
86
|
-
params?: AnyObject | undefined;
|
|
87
|
-
nameKey?: string | undefined;
|
|
88
|
-
valueKey?: string | undefined;
|
|
89
89
|
} | undefined;
|
|
90
90
|
suffixConfig?: any | any[] | undefined;
|
|
91
91
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -3616,6 +3616,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3616
3616
|
type: NumberConstructor;
|
|
3617
3617
|
default: number;
|
|
3618
3618
|
};
|
|
3619
|
+
businessFormatter: {
|
|
3620
|
+
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFormatter>;
|
|
3621
|
+
};
|
|
3619
3622
|
schema: {
|
|
3620
3623
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
3621
3624
|
[key: symbol]: any;
|
|
@@ -3728,6 +3731,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3728
3731
|
type: NumberConstructor;
|
|
3729
3732
|
default: number;
|
|
3730
3733
|
};
|
|
3734
|
+
businessFormatter: {
|
|
3735
|
+
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFormatter>;
|
|
3736
|
+
};
|
|
3731
3737
|
schema: {
|
|
3732
3738
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
3733
3739
|
[key: symbol]: any;
|
|
@@ -3817,9 +3823,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3817
3823
|
}>>;
|
|
3818
3824
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
3819
3825
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
3820
|
-
formModel: import("@formily/core").Form<
|
|
3821
|
-
[x: string]: any;
|
|
3822
|
-
}>;
|
|
3826
|
+
formModel: import("@formily/core").Form<any>;
|
|
3823
3827
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
3824
3828
|
businessCollector: import("../../../../../es/packages/form-render").BusinessCollector;
|
|
3825
3829
|
formItemDepsCollector: import("../../../../../es/packages/form-render").FormItemDepsCollector;
|
|
@@ -5227,6 +5231,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5227
5231
|
type: NumberConstructor;
|
|
5228
5232
|
default: number;
|
|
5229
5233
|
};
|
|
5234
|
+
businessFormatter: {
|
|
5235
|
+
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFormatter>;
|
|
5236
|
+
};
|
|
5230
5237
|
schema: {
|
|
5231
5238
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
5232
5239
|
[key: symbol]: any;
|
|
@@ -29,6 +29,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
29
29
|
type: NumberConstructor;
|
|
30
30
|
default: number;
|
|
31
31
|
};
|
|
32
|
+
businessFormatter: {
|
|
33
|
+
type: import("vue").PropType<import("./src/types").FormBusinessFormatter>;
|
|
34
|
+
};
|
|
32
35
|
schema: {
|
|
33
36
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
34
37
|
[key: symbol]: any;
|
|
@@ -141,6 +144,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
141
144
|
type: NumberConstructor;
|
|
142
145
|
default: number;
|
|
143
146
|
};
|
|
147
|
+
businessFormatter: {
|
|
148
|
+
type: import("vue").PropType<import("./src/types").FormBusinessFormatter>;
|
|
149
|
+
};
|
|
144
150
|
schema: {
|
|
145
151
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
146
152
|
[key: symbol]: any;
|
|
@@ -230,9 +236,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
230
236
|
}>>;
|
|
231
237
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
232
238
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
233
|
-
formModel: import("@formily/core").Form<
|
|
234
|
-
[x: string]: any;
|
|
235
|
-
}>;
|
|
239
|
+
formModel: import("@formily/core").Form<any>;
|
|
236
240
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
237
241
|
businessCollector: import("./src/hooks").BusinessCollector;
|
|
238
242
|
formItemDepsCollector: import("./src/hooks").FormItemDepsCollector;
|
|
@@ -1640,6 +1644,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1640
1644
|
type: NumberConstructor;
|
|
1641
1645
|
default: number;
|
|
1642
1646
|
};
|
|
1647
|
+
businessFormatter: {
|
|
1648
|
+
type: import("vue").PropType<import("./src/types").FormBusinessFormatter>;
|
|
1649
|
+
};
|
|
1643
1650
|
schema: {
|
|
1644
1651
|
type: import("vue").PropType<import("@formily/json-schema").Stringify<{
|
|
1645
1652
|
[key: symbol]: any;
|
|
@@ -30,6 +30,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
30
|
maxHeight: { type: [Number, String], default: "" },
|
|
31
31
|
anchor: { type: Boolean, default: false },
|
|
32
32
|
parallelism: { type: Number, default: 3 },
|
|
33
|
+
businessFormatter: { type: Function },
|
|
33
34
|
schema: { type: Object },
|
|
34
35
|
components: {
|
|
35
36
|
type: Object,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import { AnyObject } from '../../../../es/src/types';
|
|
3
3
|
import { Component, FunctionalComponent, nextTick, PropType } from 'vue';
|
|
4
|
-
import { FieldItem, FieldVisitor } from './types';
|
|
4
|
+
import { FieldItem, FieldVisitor, FormBusinessFormatter } from './types';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
6
6
|
fieldList: {
|
|
7
7
|
type: PropType<FieldItem[]>;
|
|
@@ -29,6 +29,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
type: NumberConstructor;
|
|
30
30
|
default: number;
|
|
31
31
|
};
|
|
32
|
+
businessFormatter: {
|
|
33
|
+
type: PropType<FormBusinessFormatter>;
|
|
34
|
+
};
|
|
32
35
|
schema: {
|
|
33
36
|
type: PropType<import("@formily/vue").Stringify<{
|
|
34
37
|
[key: symbol]: any;
|
|
@@ -141,6 +144,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
144
|
type: NumberConstructor;
|
|
142
145
|
default: number;
|
|
143
146
|
};
|
|
147
|
+
businessFormatter: {
|
|
148
|
+
type: PropType<FormBusinessFormatter>;
|
|
149
|
+
};
|
|
144
150
|
schema: {
|
|
145
151
|
type: PropType<import("@formily/vue").Stringify<{
|
|
146
152
|
[key: symbol]: any;
|
|
@@ -230,9 +236,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
230
236
|
}>>;
|
|
231
237
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
232
238
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
233
|
-
formModel: import("@formily/core").Form<
|
|
234
|
-
[x: string]: any;
|
|
235
|
-
}>;
|
|
239
|
+
formModel: import("@formily/core").Form<any>;
|
|
236
240
|
SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
237
241
|
businessCollector: import("./hooks").BusinessCollector;
|
|
238
242
|
formItemDepsCollector: import("./hooks").FormItemDepsCollector;
|
|
@@ -1640,6 +1644,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1640
1644
|
type: NumberConstructor;
|
|
1641
1645
|
default: number;
|
|
1642
1646
|
};
|
|
1647
|
+
businessFormatter: {
|
|
1648
|
+
type: PropType<FormBusinessFormatter>;
|
|
1649
|
+
};
|
|
1643
1650
|
schema: {
|
|
1644
1651
|
type: PropType<import("@formily/vue").Stringify<{
|
|
1645
1652
|
[key: symbol]: any;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import { AnyObject,
|
|
2
|
-
import {
|
|
1
|
+
import { AnyObject, Func } from '../../../../../../es/src/types';
|
|
2
|
+
import { UrlConfig } from '../../../../../../es/packages/form-render';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
|
-
declare type DependKeyObj = {
|
|
5
|
-
paramName: string;
|
|
6
|
-
paramValue: string;
|
|
7
|
-
};
|
|
8
|
-
declare type UrlConfig = {
|
|
9
|
-
method?: FormRequestType;
|
|
10
|
-
nameKey?: string;
|
|
11
|
-
valueKey?: string;
|
|
12
|
-
dependKey?: ArrayAble<string> | Record<string, string> | ArrayAble<DependKeyObj>;
|
|
13
|
-
url: string;
|
|
14
|
-
};
|
|
15
4
|
export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
16
5
|
options: {
|
|
17
6
|
type: PropType<AnyObject[]>;
|
|
@@ -51,4 +40,3 @@ export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
|
51
40
|
}, {
|
|
52
41
|
options: AnyObject[];
|
|
53
42
|
}>;
|
|
54
|
-
export {};
|
|
@@ -46,7 +46,7 @@ const script = defineComponent({
|
|
|
46
46
|
var _a, _b;
|
|
47
47
|
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
48
48
|
});
|
|
49
|
-
const
|
|
49
|
+
const valueRef = computed(() => {
|
|
50
50
|
try {
|
|
51
51
|
const parsed = Array.isArray(props.value) ? props.value : JSON.parse(props.value || "");
|
|
52
52
|
if (!Array.isArray(parsed) || !parsed.length)
|
|
@@ -158,7 +158,7 @@ const script = defineComponent({
|
|
|
158
158
|
"checkStrategy": "child",
|
|
159
159
|
"show": !!show.value,
|
|
160
160
|
"onUpdate:show": updateShow,
|
|
161
|
-
"value":
|
|
161
|
+
"value": valueRef.value,
|
|
162
162
|
"onUpdate:value": updateValue,
|
|
163
163
|
"labelField": labelKey.value,
|
|
164
164
|
"valueField": valueKey.value,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
export declare const DATE: import("vue").DefineComponent<{
|
|
3
3
|
onChange: {};
|
|
4
|
-
value: {
|
|
4
|
+
value: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
5
7
|
validate: {
|
|
6
8
|
type: PropType<Partial<{
|
|
7
9
|
[key: string]: any;
|
|
@@ -16,9 +18,15 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
|
16
18
|
regular_error_tip: string;
|
|
17
19
|
}>>;
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
valueFormat: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
26
|
onChange: {};
|
|
21
|
-
value: {
|
|
27
|
+
value: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
22
30
|
validate: {
|
|
23
31
|
type: PropType<Partial<{
|
|
24
32
|
[key: string]: any;
|
|
@@ -33,4 +41,12 @@ export declare const DATE: import("vue").DefineComponent<{
|
|
|
33
41
|
regular_error_tip: string;
|
|
34
42
|
}>>;
|
|
35
43
|
};
|
|
36
|
-
|
|
44
|
+
valueFormat: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
}>> & {
|
|
49
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
valueFormat: string;
|
|
52
|
+
}>;
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
|
-
import { isField } from '@formily/core';
|
|
1
|
+
import { defineComponent, computed, watch, createVNode, mergeProps } from 'vue';
|
|
3
2
|
import { connect, mapProps } from '@formily/vue';
|
|
4
3
|
import { isObject } from '@vueuse/core';
|
|
4
|
+
import { format } from 'date-fns';
|
|
5
5
|
import { NDatePicker } from 'naive-ui';
|
|
6
6
|
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
7
|
+
import { assignUpdateValue } from '../../../../../packages/form-render/src/utils';
|
|
7
8
|
|
|
8
9
|
const script = defineComponent({
|
|
9
10
|
props: {
|
|
10
11
|
onChange: {},
|
|
11
|
-
value: {
|
|
12
|
+
value: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
12
15
|
validate: {
|
|
13
16
|
type: Object
|
|
17
|
+
},
|
|
18
|
+
valueFormat: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "yyyy-MM-dd"
|
|
14
21
|
}
|
|
15
22
|
},
|
|
16
|
-
|
|
23
|
+
emits: ["update:value"],
|
|
24
|
+
setup(props, {
|
|
25
|
+
emit
|
|
26
|
+
}) {
|
|
17
27
|
useCommonInjection().injectValueValidate(() => props.value);
|
|
18
28
|
function minCurrentDate() {
|
|
19
29
|
var _a;
|
|
@@ -56,7 +66,9 @@ const script = defineComponent({
|
|
|
56
66
|
}
|
|
57
67
|
}
|
|
58
68
|
const validateConfig = computed(() => {
|
|
59
|
-
const result = {
|
|
69
|
+
const result = {
|
|
70
|
+
valueFormat: props.valueFormat
|
|
71
|
+
};
|
|
60
72
|
if (isObject(props.validate)) {
|
|
61
73
|
const {
|
|
62
74
|
min_date,
|
|
@@ -69,22 +81,26 @@ const script = defineComponent({
|
|
|
69
81
|
}
|
|
70
82
|
return result;
|
|
71
83
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
function formatDate(value) {
|
|
85
|
+
if (!value)
|
|
86
|
+
return value;
|
|
87
|
+
return format(new Date(value), props.valueFormat);
|
|
88
|
+
}
|
|
89
|
+
watch(() => props.value, (value) => {
|
|
90
|
+
if (!value || formatDate(value) === value)
|
|
91
|
+
return;
|
|
92
|
+
emit("update:value", formatDate(value));
|
|
93
|
+
});
|
|
94
|
+
const valueRef = computed({
|
|
95
|
+
get: () => formatDate(props.value),
|
|
96
|
+
set: (value) => emit("update:value", value)
|
|
85
97
|
});
|
|
98
|
+
return () => createVNode(NDatePicker, mergeProps(validateConfig.value, {
|
|
99
|
+
"formatted-value": valueRef.value,
|
|
100
|
+
"onUpdate:formatted-value": ($event) => valueRef.value = $event
|
|
101
|
+
}), null);
|
|
86
102
|
}
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
});
|
|
104
|
+
const DATE = connect(script, mapProps(assignUpdateValue));
|
|
89
105
|
|
|
90
106
|
export { DATE };
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { AnyObject, Func } from '../../../../../../es/src/types';
|
|
2
|
-
import {
|
|
2
|
+
import { UrlConfig } from '../../types';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
|
-
declare type UrlConfig = {
|
|
5
|
-
method: FormRequestType;
|
|
6
|
-
dependKey?: string | string[];
|
|
7
|
-
nameKey: string;
|
|
8
|
-
url: string;
|
|
9
|
-
params?: AnyObject;
|
|
10
|
-
valueKey: string;
|
|
11
|
-
};
|
|
12
4
|
export declare const SELECT: import("vue").DefineComponent<{
|
|
13
5
|
value: {
|
|
14
6
|
type: StringConstructor;
|
|
@@ -53,4 +45,3 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
53
45
|
options: AnyObject[];
|
|
54
46
|
lazyRequest: boolean;
|
|
55
47
|
}>;
|
|
56
|
-
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, inject, nextTick, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
|
-
import { isEqual } from 'lodash-es';
|
|
3
|
+
import { cloneDeep, isEqual, isString } from 'lodash-es';
|
|
4
4
|
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
5
5
|
import { InjectAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
6
|
+
import { formRenderLog } from '../../utils/index.js';
|
|
6
7
|
import { connect, mapProps } from '@formily/vue';
|
|
7
8
|
import { NSelect } from 'naive-ui';
|
|
8
9
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
@@ -61,9 +62,11 @@ const script = defineComponent({
|
|
|
61
62
|
}
|
|
62
63
|
if (remoteOptions.value)
|
|
63
64
|
return;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
})
|
|
65
|
+
try {
|
|
66
|
+
remoteOptions.value = await asyncQueue.addAsync(await createParams(configFor(props), field.value, fieldKey.value));
|
|
67
|
+
} catch (e) {
|
|
68
|
+
isString(e) && formRenderLog(e, "warn");
|
|
69
|
+
}
|
|
67
70
|
async function createParams(config, field2, key) {
|
|
68
71
|
const _params = {};
|
|
69
72
|
try {
|
|
@@ -105,7 +108,7 @@ const script = defineComponent({
|
|
|
105
108
|
changeContextCollector == null ? void 0 : changeContextCollector.setContext(fieldKey.value, async () => {
|
|
106
109
|
await nextTick();
|
|
107
110
|
return {
|
|
108
|
-
currentOption: parsedOptions.value.find((option) => option[valueKey.value] ===
|
|
111
|
+
currentOption: cloneDeep(parsedOptions.value.find((option) => option[valueKey.value] === valueRef.value))
|
|
109
112
|
};
|
|
110
113
|
});
|
|
111
114
|
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
@@ -120,7 +123,7 @@ const script = defineComponent({
|
|
|
120
123
|
emit("update:value", null);
|
|
121
124
|
!props.lazyRequest && await fetchData();
|
|
122
125
|
});
|
|
123
|
-
(
|
|
126
|
+
(valueRef.value || !props.lazyRequest) && fetchData();
|
|
124
127
|
}, {
|
|
125
128
|
immediate: true
|
|
126
129
|
});
|
|
@@ -128,8 +131,8 @@ const script = defineComponent({
|
|
|
128
131
|
injectValueValidate,
|
|
129
132
|
injectValueWatchFromEmpty
|
|
130
133
|
} = useCommonInjection();
|
|
131
|
-
injectValueWatchFromEmpty(
|
|
132
|
-
injectValueValidate(
|
|
134
|
+
injectValueWatchFromEmpty(valueRef, fetchData);
|
|
135
|
+
injectValueValidate(valueRef);
|
|
133
136
|
function focusDecorator(onFocus) {
|
|
134
137
|
return (...args) => {
|
|
135
138
|
if (isField(field.value)) {
|