cnhis-design-vue 3.1.18-beta.4 → 3.1.18-beta.5

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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, isRef, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, nextTick } from 'vue';
2
- import { createForm, onFieldValueChange, isField } from '@formily/core';
2
+ import { createForm, onFieldValueChange } from '@formily/core';
3
3
  import { FormProvider, FormConsumer } from '@formily/vue';
4
4
  import { isObject } from '@vue/shared';
5
5
  import { cloneDeep, isArray } from 'lodash-es';
@@ -146,17 +146,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
146
146
  formModel.setFieldState(path, handler);
147
147
  },
148
148
  resetFields(path = "*") {
149
- formModel.setFieldState(path, (field) => {
150
- var _a;
151
- if (isField(field)) {
152
- field.modified = false;
153
- field.visited = false;
154
- field.feedbacks = [];
155
- field.selfModified = false;
156
- field.caches = {};
157
- field.value = (_a = field.initialValue) != null ? _a : null;
158
- }
159
- });
149
+ formModel.reset(path);
160
150
  },
161
151
  async queryWidget(key) {
162
152
  return scrollbarRef.value ? await queryWidget(key, scrollbarRef.value, props.fieldList || []) : null;
@@ -8,7 +8,7 @@ import '../../../index.js';
8
8
  import '@formily/path';
9
9
  import '@vue/shared';
10
10
  import 'date-fns';
11
- import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
11
+ import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema.js';
12
12
  import { useFormField } from '../../hooks/useFormField.js';
13
13
  import '../../../../../shared/utils/tapable/SyncHook.js';
14
14
  import '../../../../../shared/utils/tapable/SyncBailHook.js';
@@ -203,6 +203,6 @@ const script = defineComponent({
203
203
  });
204
204
  const SEARCH_CASCADE = connect(script, mapProps({
205
205
  dataSource: "options"
206
- }, assignUpdateValue));
206
+ }, assignUpdateValue, assignValueBindKey));
207
207
 
208
208
  export { SEARCH_CASCADE };
@@ -3,7 +3,7 @@ import '@formily/path';
3
3
  import '@vue/shared';
4
4
  import 'lodash-es';
5
5
  import 'date-fns';
6
- import { assignUpdateValue } from '../../utils/schema.js';
6
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
7
7
  import { connect, mapProps } from '@formily/vue';
8
8
  import { NCheckboxGroup, NSpace, NCheckbox } from 'naive-ui';
9
9
 
@@ -40,6 +40,6 @@ const script = defineComponent({
40
40
  });
41
41
  const CHECKBOX = connect(script, mapProps({
42
42
  dataSource: "options"
43
- }, assignUpdateValue));
43
+ }, assignUpdateValue, assignValueBindKey));
44
44
 
45
45
  export { CHECKBOX };
@@ -8,7 +8,7 @@ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
8
8
  import '@formily/path';
9
9
  import '@vue/shared';
10
10
  import 'lodash-es';
11
- import { assignUpdateValue } from '../../utils/schema.js';
11
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
12
12
 
13
13
  const script = defineComponent({
14
14
  props: {
@@ -112,6 +112,6 @@ const script = defineComponent({
112
112
  }), null);
113
113
  }
114
114
  });
115
- const DATE = connect(script, mapProps(assignUpdateValue));
115
+ const DATE = connect(script, mapProps(assignUpdateValue, assignValueBindKey));
116
116
 
117
117
  export { DATE };
@@ -1,15 +1,23 @@
1
1
  export declare const INPUT: import("vue").DefineComponent<{
2
+ value: {
3
+ type: StringConstructor;
4
+ };
2
5
  prefix: {
3
6
  type: StringConstructor;
4
7
  };
5
8
  suffix: {
6
9
  type: StringConstructor;
7
10
  };
8
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, () => 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<{
12
+ value: {
13
+ type: StringConstructor;
14
+ };
9
15
  prefix: {
10
16
  type: StringConstructor;
11
17
  };
12
18
  suffix: {
13
19
  type: StringConstructor;
14
20
  };
15
- }>>, {}>;
21
+ }>> & {
22
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
23
+ }, {}>;
@@ -1,4 +1,5 @@
1
- import { defineComponent, createVNode } from 'vue';
1
+ import { defineComponent, computed, createVNode } from 'vue';
2
+ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
2
3
  import { createInputSlot } from '../../utils/index.js';
3
4
  import { connect, mapProps } from '@formily/vue';
4
5
  import { NInput } from 'naive-ui';
@@ -7,6 +8,9 @@ import { assignUpdateValue } from '../../utils/schema.js';
7
8
  const script = defineComponent({
8
9
  name: "FormInput",
9
10
  props: {
11
+ value: {
12
+ type: String
13
+ },
10
14
  prefix: {
11
15
  type: String
12
16
  },
@@ -14,10 +18,22 @@ const script = defineComponent({
14
18
  type: String
15
19
  }
16
20
  },
17
- setup(props) {
21
+ emits: ["update:value"],
22
+ setup(props, {
23
+ emit
24
+ }) {
25
+ const valueRef = computed({
26
+ get: () => props.value,
27
+ set: (v) => emit("update:value", v)
28
+ });
29
+ const key = useCommonInjection().injectValueBindKey(valueRef);
18
30
  const _slots = createInputSlot(props);
19
31
  return () => {
20
- return createVNode(NInput, null, _slots.value);
32
+ return createVNode(NInput, {
33
+ "key": key.value,
34
+ "value": valueRef.value,
35
+ "onUpdate:value": ($event) => valueRef.value = $event
36
+ }, _slots.value);
21
37
  };
22
38
  }
23
39
  });
@@ -39,8 +39,10 @@ const script = defineComponent({
39
39
  return (_a = props.onChange) == null ? void 0 : _a.call(props, v);
40
40
  }
41
41
  });
42
+ const key = useCommonInjection().injectValueBindKey(valueRef);
42
43
  return () => {
43
44
  return createVNode(NInputNumber, {
45
+ "key": key.value,
44
46
  "value": valueRef.value,
45
47
  "onUpdate:value": ($event) => valueRef.value = $event,
46
48
  "show-button": false
@@ -5,7 +5,7 @@ import { NRadioGroup, NSpace, NRadio } from 'naive-ui';
5
5
  import '@formily/path';
6
6
  import '@vue/shared';
7
7
  import 'date-fns';
8
- import { assignUpdateValue } from '../../utils/schema.js';
8
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
9
9
 
10
10
  const script = defineComponent({
11
11
  props: {
@@ -64,6 +64,6 @@ const script = defineComponent({
64
64
  });
65
65
  const RADIO = connect(script, mapProps({
66
66
  dataSource: "options"
67
- }, assignUpdateValue));
67
+ }, assignUpdateValue, assignValueBindKey));
68
68
 
69
69
  export { RADIO };
@@ -37,7 +37,7 @@ import './slider.js';
37
37
  import './complex.js';
38
38
  import './simpleComponent.js';
39
39
  import { NSelect } from 'naive-ui';
40
- import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
40
+ import { assignUpdateValue, assignValueBindKey, traverseDependKey } from '../../utils/schema.js';
41
41
 
42
42
  const script = defineComponent({
43
43
  name: "FormSelect",
@@ -190,6 +190,6 @@ const script = defineComponent({
190
190
  });
191
191
  const SELECT = connect(script, mapProps({
192
192
  dataSource: "options"
193
- }, assignUpdateValue));
193
+ }, assignUpdateValue, assignValueBindKey));
194
194
 
195
195
  export { SELECT };
@@ -2,7 +2,7 @@ import { defineComponent, computed, createVNode } from 'vue';
2
2
  import { connect, mapProps } from '@formily/vue';
3
3
  import { NSlider } from 'naive-ui';
4
4
  import { parseNumberFromMaybeString } from '../../utils/index.js';
5
- import { assignUpdateValue } from '../../utils/schema.js';
5
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
6
6
 
7
7
  const script = defineComponent({
8
8
  props: {
@@ -24,7 +24,7 @@ const script = defineComponent({
24
24
  }, null);
25
25
  }
26
26
  });
27
- const SLIDER = connect(script, mapProps((props, field) => {
27
+ const SLIDER = connect(script, mapProps(assignUpdateValue, (props, field) => {
28
28
  const _props = assignUpdateValue(props, field);
29
29
  if (Array.isArray(_props.option)) {
30
30
  _props.marks = _props.option.reduce((fin, option) => {
@@ -33,6 +33,6 @@ const SLIDER = connect(script, mapProps((props, field) => {
33
33
  }, {});
34
34
  }
35
35
  return _props;
36
- }));
36
+ }, assignValueBindKey));
37
37
 
38
38
  export { SLIDER };
@@ -4,7 +4,7 @@ import '@formily/path';
4
4
  import '@vue/shared';
5
5
  import 'lodash-es';
6
6
  import 'date-fns';
7
- import { assignUpdateValue } from '../../utils/schema.js';
7
+ import { assignUpdateValue, assignValueBindKey } from '../../utils/schema.js';
8
8
  import { connect, mapProps } from '@formily/vue';
9
9
 
10
10
  const script = defineComponent({
@@ -46,6 +46,6 @@ const script = defineComponent({
46
46
  };
47
47
  }
48
48
  });
49
- const SWITCH = connect(script, mapProps(assignUpdateValue));
49
+ const SWITCH = connect(script, mapProps(assignUpdateValue, assignValueBindKey));
50
50
 
51
51
  export { SWITCH };
@@ -1,848 +1,11 @@
1
1
  export declare const TEXTAREA: import("vue").DefineComponent<{
2
- bordered: {
3
- type: import("vue").PropType<boolean | undefined>;
4
- default: undefined;
2
+ value: {
3
+ type: StringConstructor;
5
4
  };
6
- type: {
7
- type: import("vue").PropType<"text" | "textarea" | "password">;
8
- default: string;
5
+ }, () => 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<{
6
+ value: {
7
+ type: StringConstructor;
9
8
  };
10
- placeholder: import("vue").PropType<string | [string, string]>;
11
- defaultValue: {
12
- type: import("vue").PropType<string | [string, string] | null>;
13
- default: null;
14
- };
15
- value: import("vue").PropType<string | [string, string] | null>;
16
- disabled: {
17
- type: import("vue").PropType<boolean | undefined>;
18
- default: undefined;
19
- };
20
- size: import("vue").PropType<import("naive-ui/es/input/src/interface").Size>;
21
- rows: {
22
- type: import("vue").PropType<string | number>;
23
- default: number;
24
- };
25
- round: BooleanConstructor;
26
- minlength: import("vue").PropType<string | number>;
27
- maxlength: import("vue").PropType<string | number>;
28
- clearable: BooleanConstructor;
29
- autosize: {
30
- type: import("vue").PropType<boolean | {
31
- minRows?: number | undefined;
32
- maxRows?: number | undefined;
33
- }>;
34
- default: boolean;
35
- };
36
- pair: BooleanConstructor;
37
- separator: StringConstructor;
38
- readonly: {
39
- type: (BooleanConstructor | StringConstructor)[];
40
- default: boolean;
41
- };
42
- passivelyActivated: BooleanConstructor;
43
- showPasswordOn: import("vue").PropType<"click" | "mousedown">;
44
- stateful: {
45
- type: BooleanConstructor;
46
- default: boolean;
47
- };
48
- autofocus: BooleanConstructor;
49
- inputProps: import("vue").PropType<import("vue").InputHTMLAttributes | import("vue").TextareaHTMLAttributes>;
50
- resizable: {
51
- type: BooleanConstructor;
52
- default: boolean;
53
- };
54
- showCount: BooleanConstructor;
55
- loading: {
56
- type: BooleanConstructor;
57
- default: undefined;
58
- };
59
- allowInput: import("vue").PropType<(value: string) => boolean>;
60
- onMousedown: import("vue").PropType<(e: MouseEvent) => void>;
61
- onKeydown: import("vue").PropType<(e: KeyboardEvent) => void>;
62
- onKeyup: import("vue").PropType<(e: KeyboardEvent) => void>;
63
- onInput: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
64
- onFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
65
- onBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
66
- onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
67
- onChange: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
68
- onClear: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
69
- status: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
70
- 'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
71
- onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
72
- textDecoration: import("vue").PropType<string | [string, string]>;
73
- attrSize: {
74
- type: NumberConstructor;
75
- default: number;
76
- };
77
- onInputBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
78
- onInputFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
79
- onDeactivate: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<() => void>>;
80
- onActivate: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<() => void>>;
81
- onWrapperFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
82
- onWrapperBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
83
- internalDeactivateOnEnter: BooleanConstructor;
84
- internalForceFocus: BooleanConstructor;
85
- internalLoadingBeforeSuffix: BooleanConstructor;
86
- showPasswordToggle: BooleanConstructor;
87
- theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Input", {
88
- countTextColor: string;
89
- heightTiny: string;
90
- heightSmall: string;
91
- heightMedium: string;
92
- heightLarge: string;
93
- fontSizeTiny: string;
94
- fontSizeSmall: string;
95
- fontSizeMedium: string;
96
- fontSizeLarge: string;
97
- lineHeight: string;
98
- lineHeightTextarea: string;
99
- borderRadius: string;
100
- iconSize: string;
101
- groupLabelColor: string;
102
- groupLabelTextColor: string;
103
- textColor: string;
104
- textColorDisabled: string;
105
- textDecorationColor: string;
106
- caretColor: string;
107
- placeholderColor: string;
108
- placeholderColorDisabled: string;
109
- color: string;
110
- colorDisabled: string;
111
- colorFocus: string;
112
- groupLabelBorder: string;
113
- border: string;
114
- borderHover: string;
115
- borderDisabled: string;
116
- borderFocus: string;
117
- boxShadowFocus: string;
118
- loadingColor: string;
119
- loadingColorWarning: string;
120
- borderWarning: string;
121
- borderHoverWarning: string;
122
- colorFocusWarning: string;
123
- borderFocusWarning: string;
124
- boxShadowFocusWarning: string;
125
- caretColorWarning: string;
126
- loadingColorError: string;
127
- borderError: string;
128
- borderHoverError: string;
129
- colorFocusError: string;
130
- borderFocusError: string;
131
- boxShadowFocusError: string;
132
- caretColorError: string;
133
- clearColor: string;
134
- clearColorHover: string;
135
- clearColorPressed: string;
136
- iconColor: string;
137
- iconColorDisabled: string;
138
- iconColorHover: string;
139
- iconColorPressed: string;
140
- suffixTextColor: string;
141
- paddingTiny: string;
142
- paddingSmall: string;
143
- paddingMedium: string;
144
- paddingLarge: string;
145
- clearSize: string;
146
- }, any>>;
147
- themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Input", {
148
- countTextColor: string;
149
- heightTiny: string;
150
- heightSmall: string;
151
- heightMedium: string;
152
- heightLarge: string;
153
- fontSizeTiny: string;
154
- fontSizeSmall: string;
155
- fontSizeMedium: string;
156
- fontSizeLarge: string;
157
- lineHeight: string;
158
- lineHeightTextarea: string;
159
- borderRadius: string;
160
- iconSize: string;
161
- groupLabelColor: string;
162
- groupLabelTextColor: string;
163
- textColor: string;
164
- textColorDisabled: string;
165
- textDecorationColor: string;
166
- caretColor: string;
167
- placeholderColor: string;
168
- placeholderColorDisabled: string;
169
- color: string;
170
- colorDisabled: string;
171
- colorFocus: string;
172
- groupLabelBorder: string;
173
- border: string;
174
- borderHover: string;
175
- borderDisabled: string;
176
- borderFocus: string;
177
- boxShadowFocus: string;
178
- loadingColor: string;
179
- loadingColorWarning: string;
180
- borderWarning: string;
181
- borderHoverWarning: string;
182
- colorFocusWarning: string;
183
- borderFocusWarning: string;
184
- boxShadowFocusWarning: string;
185
- caretColorWarning: string;
186
- loadingColorError: string;
187
- borderError: string;
188
- borderHoverError: string;
189
- colorFocusError: string;
190
- borderFocusError: string;
191
- boxShadowFocusError: string;
192
- caretColorError: string;
193
- clearColor: string;
194
- clearColorHover: string;
195
- clearColorPressed: string;
196
- iconColor: string;
197
- iconColorDisabled: string;
198
- iconColorHover: string;
199
- iconColorPressed: string;
200
- suffixTextColor: string;
201
- paddingTiny: string;
202
- paddingSmall: string;
203
- paddingMedium: string;
204
- paddingLarge: string;
205
- clearSize: string;
206
- }, any>>>;
207
- builtinThemeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Input", {
208
- countTextColor: string;
209
- heightTiny: string;
210
- heightSmall: string;
211
- heightMedium: string;
212
- heightLarge: string;
213
- fontSizeTiny: string;
214
- fontSizeSmall: string;
215
- fontSizeMedium: string;
216
- fontSizeLarge: string;
217
- lineHeight: string;
218
- lineHeightTextarea: string;
219
- borderRadius: string;
220
- iconSize: string;
221
- groupLabelColor: string;
222
- groupLabelTextColor: string;
223
- textColor: string;
224
- textColorDisabled: string;
225
- textDecorationColor: string;
226
- caretColor: string;
227
- placeholderColor: string;
228
- placeholderColorDisabled: string;
229
- color: string;
230
- colorDisabled: string;
231
- colorFocus: string;
232
- groupLabelBorder: string;
233
- border: string;
234
- borderHover: string;
235
- borderDisabled: string;
236
- borderFocus: string;
237
- boxShadowFocus: string;
238
- loadingColor: string;
239
- loadingColorWarning: string;
240
- borderWarning: string;
241
- borderHoverWarning: string;
242
- colorFocusWarning: string;
243
- borderFocusWarning: string;
244
- boxShadowFocusWarning: string;
245
- caretColorWarning: string;
246
- loadingColorError: string;
247
- borderError: string;
248
- borderHoverError: string;
249
- colorFocusError: string;
250
- borderFocusError: string;
251
- boxShadowFocusError: string;
252
- caretColorError: string;
253
- clearColor: string;
254
- clearColorHover: string;
255
- clearColorPressed: string;
256
- iconColor: string;
257
- iconColorDisabled: string;
258
- iconColorHover: string;
259
- iconColorPressed: string;
260
- suffixTextColor: string;
261
- paddingTiny: string;
262
- paddingSmall: string;
263
- paddingMedium: string;
264
- paddingLarge: string;
265
- clearSize: string;
266
- }, any>>>;
267
- }, {
268
- wrapperElRef: import("vue").Ref<HTMLElement | null>;
269
- inputElRef: import("vue").Ref<HTMLInputElement | null>;
270
- inputMirrorElRef: import("vue").Ref<HTMLElement | null>;
271
- inputEl2Ref: import("vue").Ref<HTMLInputElement | null>;
272
- textareaElRef: import("vue").Ref<HTMLTextAreaElement | null>;
273
- textareaMirrorElRef: import("vue").Ref<HTMLElement | null>;
274
- textareaScrollbarInstRef: import("vue").Ref<{
275
- $el: HTMLElement;
276
- containerRef: HTMLElement | null;
277
- contentRef: HTMLElement | null;
278
- containerScrollTop: number;
279
- syncUnifiedContainer: () => void;
280
- scrollTo: import("naive-ui/es/_internal/scrollbar/src/Scrollbar").ScrollTo;
281
- scrollBy: import("naive-ui/es/_internal/scrollbar/src/Scrollbar").ScrollBy;
282
- sync: () => void;
283
- handleMouseEnterWrapper: () => void;
284
- handleMouseLeaveWrapper: () => void;
285
- } | null>;
286
- rtlEnabled: import("vue").Ref<import("naive-ui/es/config-provider/src/internal-interface").RtlItem | undefined> | undefined;
287
- uncontrolledValue: import("vue").Ref<string | [string, string] | null>;
288
- mergedValue: import("vue").ComputedRef<string | [string, string] | null>;
289
- passwordVisible: import("vue").Ref<boolean>;
290
- mergedPlaceholder: import("vue").ComputedRef<[string, string] | [string]>;
291
- showPlaceholder1: import("vue").ComputedRef<string | false>;
292
- showPlaceholder2: import("vue").ComputedRef<boolean | "" | undefined>;
293
- mergedFocus: import("vue").ComputedRef<boolean>;
294
- isComposing: import("vue").Ref<boolean>;
295
- activated: import("vue").Ref<boolean>;
296
- showClearButton: import("vue").ComputedRef<boolean>;
297
- mergedSize: import("vue").ComputedRef<"small" | "medium" | "tiny" | "large">;
298
- mergedDisabled: import("vue").ComputedRef<boolean>;
299
- textDecorationStyle: import("vue").ComputedRef<string[] | {
300
- textDecoration: string;
301
- }[]>;
302
- mergedClsPrefix: import("vue").ComputedRef<string>;
303
- mergedBordered: import("vue").ComputedRef<boolean>;
304
- mergedShowPasswordOn: import("vue").ComputedRef<"click" | "mousedown" | undefined>;
305
- placeholderStyle: import("vue").Ref<{
306
- top: string;
307
- }>;
308
- mergedStatus: import("vue").ComputedRef<import("naive-ui/es/form/src/interface").FormValidationStatus | undefined>;
309
- textAreaScrollContainerWidth: import("vue").Ref<number | undefined>;
310
- handleTextAreaScroll: (e: Event) => void;
311
- handleCompositionStart: () => void;
312
- handleCompositionEnd: (e: CompositionEvent) => void;
313
- handleInput: (e: Event | CompositionEvent | InputEvent, index?: 0 | 1 | undefined, event?: string | undefined) => void;
314
- handleInputBlur: (e: FocusEvent) => void;
315
- handleInputFocus: (e: FocusEvent, index: number) => void;
316
- handleWrapperBlur: (e: FocusEvent) => void;
317
- handleWrapperFocus: (e: FocusEvent) => void;
318
- handleMouseEnter: () => void;
319
- handleMouseLeave: () => void;
320
- handleMouseDown: (e: MouseEvent) => void;
321
- handleChange: (e: Event, index?: 0 | 1 | undefined) => void;
322
- handleClick: (e: MouseEvent) => void;
323
- handleClear: (e: MouseEvent) => void;
324
- handlePasswordToggleClick: () => void;
325
- handlePasswordToggleMousedown: (e: MouseEvent) => void;
326
- handleWrapperKeydown: (e: KeyboardEvent) => void;
327
- handleTextAreaMirrorResize: () => void;
328
- getTextareaScrollContainer: () => HTMLTextAreaElement | null;
329
- mergedTheme: import("vue").ComputedRef<{
330
- common: {
331
- baseColor: string;
332
- primaryColor: string;
333
- primaryColorHover: string;
334
- primaryColorPressed: string;
335
- primaryColorSuppl: string;
336
- infoColor: string;
337
- infoColorHover: string;
338
- infoColorPressed: string;
339
- infoColorSuppl: string;
340
- successColor: string;
341
- successColorHover: string;
342
- successColorPressed: string;
343
- successColorSuppl: string;
344
- warningColor: string;
345
- warningColorHover: string;
346
- warningColorPressed: string;
347
- warningColorSuppl: string;
348
- errorColor: string;
349
- errorColorHover: string;
350
- errorColorPressed: string;
351
- errorColorSuppl: string;
352
- textColorBase: string;
353
- textColor1: string;
354
- textColor2: string;
355
- textColor3: string;
356
- textColorDisabled: string;
357
- placeholderColor: string;
358
- placeholderColorDisabled: string;
359
- iconColor: string;
360
- iconColorHover: string;
361
- iconColorPressed: string;
362
- iconColorDisabled: string;
363
- opacity1: string;
364
- opacity2: string;
365
- opacity3: string;
366
- opacity4: string;
367
- opacity5: string;
368
- dividerColor: string;
369
- borderColor: string;
370
- closeIconColor: string;
371
- closeIconColorHover: string;
372
- closeIconColorPressed: string;
373
- closeColorHover: string;
374
- closeColorPressed: string;
375
- clearColor: string;
376
- clearColorHover: string;
377
- clearColorPressed: string;
378
- scrollbarColor: string;
379
- scrollbarColorHover: string;
380
- scrollbarWidth: string;
381
- scrollbarHeight: string;
382
- scrollbarBorderRadius: string;
383
- progressRailColor: string;
384
- railColor: string;
385
- popoverColor: string;
386
- tableColor: string;
387
- cardColor: string;
388
- modalColor: string;
389
- bodyColor: string;
390
- tagColor: string;
391
- avatarColor: string;
392
- invertedColor: string;
393
- inputColor: string;
394
- codeColor: string;
395
- tabColor: string;
396
- actionColor: string;
397
- tableHeaderColor: string;
398
- hoverColor: string;
399
- tableColorHover: string;
400
- tableColorStriped: string;
401
- pressedColor: string;
402
- opacityDisabled: string;
403
- inputColorDisabled: string;
404
- buttonColor2: string;
405
- buttonColor2Hover: string;
406
- buttonColor2Pressed: string;
407
- boxShadow1: string;
408
- boxShadow2: string;
409
- boxShadow3: string;
410
- fontFamily: string;
411
- fontFamilyMono: string;
412
- fontWeight: string;
413
- fontWeightStrong: string;
414
- cubicBezierEaseInOut: string;
415
- cubicBezierEaseOut: string;
416
- cubicBezierEaseIn: string;
417
- borderRadius: string;
418
- borderRadiusSmall: string;
419
- fontSize: string;
420
- fontSizeMini: string;
421
- fontSizeTiny: string;
422
- fontSizeSmall: string;
423
- fontSizeMedium: string;
424
- fontSizeLarge: string;
425
- fontSizeHuge: string;
426
- lineHeight: string;
427
- heightMini: string;
428
- heightTiny: string;
429
- heightSmall: string;
430
- heightMedium: string;
431
- heightLarge: string;
432
- heightHuge: string;
433
- name: "common";
434
- };
435
- self: {
436
- countTextColor: string;
437
- heightTiny: string;
438
- heightSmall: string;
439
- heightMedium: string;
440
- heightLarge: string;
441
- fontSizeTiny: string;
442
- fontSizeSmall: string;
443
- fontSizeMedium: string;
444
- fontSizeLarge: string;
445
- lineHeight: string;
446
- lineHeightTextarea: string;
447
- borderRadius: string;
448
- iconSize: string;
449
- groupLabelColor: string;
450
- groupLabelTextColor: string;
451
- textColor: string;
452
- textColorDisabled: string;
453
- textDecorationColor: string;
454
- caretColor: string;
455
- placeholderColor: string;
456
- placeholderColorDisabled: string;
457
- color: string;
458
- colorDisabled: string;
459
- colorFocus: string;
460
- groupLabelBorder: string;
461
- border: string;
462
- borderHover: string;
463
- borderDisabled: string;
464
- borderFocus: string;
465
- boxShadowFocus: string;
466
- loadingColor: string;
467
- loadingColorWarning: string;
468
- borderWarning: string;
469
- borderHoverWarning: string;
470
- colorFocusWarning: string;
471
- borderFocusWarning: string;
472
- boxShadowFocusWarning: string;
473
- caretColorWarning: string;
474
- loadingColorError: string;
475
- borderError: string;
476
- borderHoverError: string;
477
- colorFocusError: string;
478
- borderFocusError: string;
479
- boxShadowFocusError: string;
480
- caretColorError: string;
481
- clearColor: string;
482
- clearColorHover: string;
483
- clearColorPressed: string;
484
- iconColor: string;
485
- iconColorDisabled: string;
486
- iconColorHover: string;
487
- iconColorPressed: string;
488
- suffixTextColor: string;
489
- paddingTiny: string;
490
- paddingSmall: string;
491
- paddingMedium: string;
492
- paddingLarge: string;
493
- clearSize: string;
494
- };
495
- peers: any;
496
- peerOverrides: {
497
- [x: string]: any;
498
- };
499
- }>;
500
- cssVars: import("vue").ComputedRef<{
501
- '--n-bezier': string;
502
- '--n-count-text-color': string;
503
- '--n-color': string;
504
- '--n-font-size': string;
505
- '--n-border-radius': string;
506
- '--n-height': string;
507
- '--n-padding-left': string;
508
- '--n-padding-right': string;
509
- '--n-text-color': string;
510
- '--n-caret-color': string;
511
- '--n-text-decoration-color': string;
512
- '--n-border': string;
513
- '--n-border-disabled': string;
514
- '--n-border-hover': string;
515
- '--n-border-focus': string;
516
- '--n-placeholder-color': string;
517
- '--n-placeholder-color-disabled': string;
518
- '--n-icon-size': string;
519
- '--n-line-height-textarea': string;
520
- '--n-color-disabled': string;
521
- '--n-color-focus': string;
522
- '--n-text-color-disabled': string;
523
- '--n-box-shadow-focus': string;
524
- '--n-loading-color': string;
525
- '--n-caret-color-warning': string;
526
- '--n-color-focus-warning': string;
527
- '--n-box-shadow-focus-warning': string;
528
- '--n-border-warning': string;
529
- '--n-border-focus-warning': string;
530
- '--n-border-hover-warning': string;
531
- '--n-loading-color-warning': string;
532
- '--n-caret-color-error': string;
533
- '--n-color-focus-error': string;
534
- '--n-box-shadow-focus-error': string;
535
- '--n-border-error': string;
536
- '--n-border-focus-error': string;
537
- '--n-border-hover-error': string;
538
- '--n-loading-color-error': string;
539
- '--n-clear-color': string;
540
- '--n-clear-size': string;
541
- '--n-clear-color-hover': string;
542
- '--n-clear-color-pressed': string;
543
- '--n-icon-color': string;
544
- '--n-icon-color-hover': string;
545
- '--n-icon-color-pressed': string;
546
- '--n-icon-color-disabled': string;
547
- '--n-suffix-text-color': string;
548
- }> | undefined;
549
- themeClass: import("vue").Ref<string> | undefined;
550
- onRender: (() => void) | undefined;
551
- isCompositing: import("vue").Ref<boolean>;
552
- blur: () => void;
553
- focus: () => void;
554
- select: () => void;
555
- activate: () => void;
556
- deactivate: () => void;
557
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
558
- bordered: {
559
- type: import("vue").PropType<boolean | undefined>;
560
- default: undefined;
561
- };
562
- type: {
563
- type: import("vue").PropType<"text" | "textarea" | "password">;
564
- default: string;
565
- };
566
- placeholder: import("vue").PropType<string | [string, string]>;
567
- defaultValue: {
568
- type: import("vue").PropType<string | [string, string] | null>;
569
- default: null;
570
- };
571
- value: import("vue").PropType<string | [string, string] | null>;
572
- disabled: {
573
- type: import("vue").PropType<boolean | undefined>;
574
- default: undefined;
575
- };
576
- size: import("vue").PropType<import("naive-ui/es/input/src/interface").Size>;
577
- rows: {
578
- type: import("vue").PropType<string | number>;
579
- default: number;
580
- };
581
- round: BooleanConstructor;
582
- minlength: import("vue").PropType<string | number>;
583
- maxlength: import("vue").PropType<string | number>;
584
- clearable: BooleanConstructor;
585
- autosize: {
586
- type: import("vue").PropType<boolean | {
587
- minRows?: number | undefined;
588
- maxRows?: number | undefined;
589
- }>;
590
- default: boolean;
591
- };
592
- pair: BooleanConstructor;
593
- separator: StringConstructor;
594
- readonly: {
595
- type: (BooleanConstructor | StringConstructor)[];
596
- default: boolean;
597
- };
598
- passivelyActivated: BooleanConstructor;
599
- showPasswordOn: import("vue").PropType<"click" | "mousedown">;
600
- stateful: {
601
- type: BooleanConstructor;
602
- default: boolean;
603
- };
604
- autofocus: BooleanConstructor;
605
- inputProps: import("vue").PropType<import("vue").InputHTMLAttributes | import("vue").TextareaHTMLAttributes>;
606
- resizable: {
607
- type: BooleanConstructor;
608
- default: boolean;
609
- };
610
- showCount: BooleanConstructor;
611
- loading: {
612
- type: BooleanConstructor;
613
- default: undefined;
614
- };
615
- allowInput: import("vue").PropType<(value: string) => boolean>;
616
- onMousedown: import("vue").PropType<(e: MouseEvent) => void>;
617
- onKeydown: import("vue").PropType<(e: KeyboardEvent) => void>;
618
- onKeyup: import("vue").PropType<(e: KeyboardEvent) => void>;
619
- onInput: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
620
- onFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
621
- onBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
622
- onClick: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
623
- onChange: import("vue").PropType<import("naive-ui/es/input/src/interface").OnUpdateValue>;
624
- onClear: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: MouseEvent) => void>>;
625
- status: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
626
- 'onUpdate:value': import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
627
- onUpdateValue: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<import("naive-ui/es/input/src/interface").OnUpdateValue>>;
628
- textDecoration: import("vue").PropType<string | [string, string]>;
629
- attrSize: {
630
- type: NumberConstructor;
631
- default: number;
632
- };
633
- onInputBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
634
- onInputFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
635
- onDeactivate: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<() => void>>;
636
- onActivate: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<() => void>>;
637
- onWrapperFocus: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
638
- onWrapperBlur: import("vue").PropType<import("naive-ui/es/_utils").MaybeArray<(e: FocusEvent) => void>>;
639
- internalDeactivateOnEnter: BooleanConstructor;
640
- internalForceFocus: BooleanConstructor;
641
- internalLoadingBeforeSuffix: BooleanConstructor;
642
- showPasswordToggle: BooleanConstructor;
643
- theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Input", {
644
- countTextColor: string;
645
- heightTiny: string;
646
- heightSmall: string;
647
- heightMedium: string;
648
- heightLarge: string;
649
- fontSizeTiny: string;
650
- fontSizeSmall: string;
651
- fontSizeMedium: string;
652
- fontSizeLarge: string;
653
- lineHeight: string;
654
- lineHeightTextarea: string;
655
- borderRadius: string;
656
- iconSize: string;
657
- groupLabelColor: string;
658
- groupLabelTextColor: string;
659
- textColor: string;
660
- textColorDisabled: string;
661
- textDecorationColor: string;
662
- caretColor: string;
663
- placeholderColor: string;
664
- placeholderColorDisabled: string;
665
- color: string;
666
- colorDisabled: string;
667
- colorFocus: string;
668
- groupLabelBorder: string;
669
- border: string;
670
- borderHover: string;
671
- borderDisabled: string;
672
- borderFocus: string;
673
- boxShadowFocus: string;
674
- loadingColor: string;
675
- loadingColorWarning: string;
676
- borderWarning: string;
677
- borderHoverWarning: string;
678
- colorFocusWarning: string;
679
- borderFocusWarning: string;
680
- boxShadowFocusWarning: string;
681
- caretColorWarning: string;
682
- loadingColorError: string;
683
- borderError: string;
684
- borderHoverError: string;
685
- colorFocusError: string;
686
- borderFocusError: string;
687
- boxShadowFocusError: string;
688
- caretColorError: string;
689
- clearColor: string;
690
- clearColorHover: string;
691
- clearColorPressed: string;
692
- iconColor: string;
693
- iconColorDisabled: string;
694
- iconColorHover: string;
695
- iconColorPressed: string;
696
- suffixTextColor: string;
697
- paddingTiny: string;
698
- paddingSmall: string;
699
- paddingMedium: string;
700
- paddingLarge: string;
701
- clearSize: string;
702
- }, any>>;
703
- themeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Input", {
704
- countTextColor: string;
705
- heightTiny: string;
706
- heightSmall: string;
707
- heightMedium: string;
708
- heightLarge: string;
709
- fontSizeTiny: string;
710
- fontSizeSmall: string;
711
- fontSizeMedium: string;
712
- fontSizeLarge: string;
713
- lineHeight: string;
714
- lineHeightTextarea: string;
715
- borderRadius: string;
716
- iconSize: string;
717
- groupLabelColor: string;
718
- groupLabelTextColor: string;
719
- textColor: string;
720
- textColorDisabled: string;
721
- textDecorationColor: string;
722
- caretColor: string;
723
- placeholderColor: string;
724
- placeholderColorDisabled: string;
725
- color: string;
726
- colorDisabled: string;
727
- colorFocus: string;
728
- groupLabelBorder: string;
729
- border: string;
730
- borderHover: string;
731
- borderDisabled: string;
732
- borderFocus: string;
733
- boxShadowFocus: string;
734
- loadingColor: string;
735
- loadingColorWarning: string;
736
- borderWarning: string;
737
- borderHoverWarning: string;
738
- colorFocusWarning: string;
739
- borderFocusWarning: string;
740
- boxShadowFocusWarning: string;
741
- caretColorWarning: string;
742
- loadingColorError: string;
743
- borderError: string;
744
- borderHoverError: string;
745
- colorFocusError: string;
746
- borderFocusError: string;
747
- boxShadowFocusError: string;
748
- caretColorError: string;
749
- clearColor: string;
750
- clearColorHover: string;
751
- clearColorPressed: string;
752
- iconColor: string;
753
- iconColorDisabled: string;
754
- iconColorHover: string;
755
- iconColorPressed: string;
756
- suffixTextColor: string;
757
- paddingTiny: string;
758
- paddingSmall: string;
759
- paddingMedium: string;
760
- paddingLarge: string;
761
- clearSize: string;
762
- }, any>>>;
763
- builtinThemeOverrides: import("vue").PropType<import("naive-ui/es/_mixins/use-theme").ExtractThemeOverrides<import("naive-ui/es/_mixins").Theme<"Input", {
764
- countTextColor: string;
765
- heightTiny: string;
766
- heightSmall: string;
767
- heightMedium: string;
768
- heightLarge: string;
769
- fontSizeTiny: string;
770
- fontSizeSmall: string;
771
- fontSizeMedium: string;
772
- fontSizeLarge: string;
773
- lineHeight: string;
774
- lineHeightTextarea: string;
775
- borderRadius: string;
776
- iconSize: string;
777
- groupLabelColor: string;
778
- groupLabelTextColor: string;
779
- textColor: string;
780
- textColorDisabled: string;
781
- textDecorationColor: string;
782
- caretColor: string;
783
- placeholderColor: string;
784
- placeholderColorDisabled: string;
785
- color: string;
786
- colorDisabled: string;
787
- colorFocus: string;
788
- groupLabelBorder: string;
789
- border: string;
790
- borderHover: string;
791
- borderDisabled: string;
792
- borderFocus: string;
793
- boxShadowFocus: string;
794
- loadingColor: string;
795
- loadingColorWarning: string;
796
- borderWarning: string;
797
- borderHoverWarning: string;
798
- colorFocusWarning: string;
799
- borderFocusWarning: string;
800
- boxShadowFocusWarning: string;
801
- caretColorWarning: string;
802
- loadingColorError: string;
803
- borderError: string;
804
- borderHoverError: string;
805
- colorFocusError: string;
806
- borderFocusError: string;
807
- boxShadowFocusError: string;
808
- caretColorError: string;
809
- clearColor: string;
810
- clearColorHover: string;
811
- clearColorPressed: string;
812
- iconColor: string;
813
- iconColorDisabled: string;
814
- iconColorHover: string;
815
- iconColorPressed: string;
816
- suffixTextColor: string;
817
- paddingTiny: string;
818
- paddingSmall: string;
819
- paddingMedium: string;
820
- paddingLarge: string;
821
- clearSize: string;
822
- }, any>>>;
823
- }>>, {
824
- type: "text" | "textarea" | "password";
825
- readonly: string | boolean;
826
- round: boolean;
827
- disabled: boolean | undefined;
828
- autofocus: boolean;
829
- autosize: boolean | {
830
- minRows?: number | undefined;
831
- maxRows?: number | undefined;
832
- };
833
- loading: boolean;
834
- bordered: boolean | undefined;
835
- clearable: boolean;
836
- defaultValue: string | [string, string] | null;
837
- resizable: boolean;
838
- pair: boolean;
839
- rows: string | number;
840
- passivelyActivated: boolean;
841
- stateful: boolean;
842
- showCount: boolean;
843
- attrSize: number;
844
- internalDeactivateOnEnter: boolean;
845
- internalForceFocus: boolean;
846
- internalLoadingBeforeSuffix: boolean;
847
- showPasswordToggle: boolean;
848
- }>;
9
+ }>> & {
10
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
11
+ }, {}>;
@@ -1,4 +1,5 @@
1
- import 'vue';
1
+ import { defineComponent, computed, createVNode } from 'vue';
2
+ import { useCommonInjection } from '../../hooks/useCommonInjection.js';
2
3
  import '@formily/path';
3
4
  import '@vue/shared';
4
5
  import 'lodash-es';
@@ -7,10 +8,32 @@ import { assignUpdateValue } from '../../utils/schema.js';
7
8
  import { connect, mapProps } from '@formily/vue';
8
9
  import { NInput } from 'naive-ui';
9
10
 
10
- const TEXTAREA = connect(NInput, mapProps((props, field) => {
11
- const _props = assignUpdateValue(props, field);
12
- _props.type = "textarea";
13
- return _props;
14
- }));
11
+ const script = defineComponent({
12
+ name: "FormTextarea",
13
+ props: {
14
+ value: {
15
+ type: String
16
+ }
17
+ },
18
+ emits: ["update:value"],
19
+ setup(props, {
20
+ emit
21
+ }) {
22
+ const valueRef = computed({
23
+ get: () => props.value,
24
+ set: (v) => emit("update:value", v)
25
+ });
26
+ const key = useCommonInjection().injectValueBindKey(valueRef);
27
+ return () => {
28
+ return createVNode(NInput, {
29
+ "type": "textarea",
30
+ "key": key.value,
31
+ "value": valueRef.value,
32
+ "onUpdate:value": ($event) => valueRef.value = $event
33
+ }, null);
34
+ };
35
+ }
36
+ });
37
+ const TEXTAREA = connect(script, mapProps(assignUpdateValue));
15
38
 
16
39
  export { TEXTAREA };
@@ -3,4 +3,5 @@ import { WatchSource } from '@vue/runtime-core';
3
3
  export declare function useCommonInjection(): {
4
4
  injectValueValidate: (traverser: WatchSource) => void;
5
5
  injectValueWatchFromEmpty: (traverser: WatchSource, trigger: Func) => void;
6
+ injectValueBindKey: (traverser: WatchSource) => import("vue").Ref<number>;
6
7
  };
@@ -1,5 +1,5 @@
1
1
  import { isField } from '@formily/core';
2
- import { watch } from 'vue';
2
+ import { watch, ref } from 'vue';
3
3
  import '../../index.js';
4
4
  import { useFormField } from './useFormField.js';
5
5
 
@@ -17,7 +17,16 @@ function useCommonInjection() {
17
17
  function injectValueWatchFromEmpty(traverser, trigger) {
18
18
  watch(traverser, (n, o) => n != null && o == null && trigger(), { immediate: true });
19
19
  }
20
- return { injectValueValidate, injectValueWatchFromEmpty };
20
+ function injectValueBindKey(traverser) {
21
+ const key = ref(1);
22
+ watch(traverser, (n, o) => {
23
+ if (n === void 0 && o !== void 0) {
24
+ key.value++;
25
+ }
26
+ });
27
+ return key;
28
+ }
29
+ return { injectValueValidate, injectValueWatchFromEmpty, injectValueBindKey };
21
30
  }
22
31
 
23
32
  export { useCommonInjection };
@@ -4,7 +4,7 @@ import { isObject } from '@vue/shared';
4
4
  import { isString, isFunction } from 'lodash-es';
5
5
  export { isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './business.js';
6
6
  export { queryDecorator, queryInput } from './dom.js';
7
- export { assignUpdateValue, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './schema.js';
7
+ export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './schema.js';
8
8
 
9
9
  function formRenderLog(message, type = "log") {
10
10
  console[type](`[FormRender]: ${message}`);
@@ -13,6 +13,9 @@ export declare function getParentLinebar(key: string, fieldList: FieldItem[]): s
13
13
  export declare function assignUpdateValue(props: AnyObject, field: GeneralField): {
14
14
  [x: string]: any;
15
15
  };
16
+ export declare function assignValueBindKey(props: AnyObject, field: GeneralField): {
17
+ [x: string]: any;
18
+ };
16
19
  export declare function createObjSchema(properties: Record<string, ISchema>): {
17
20
  type: string;
18
21
  properties: Record<string, import("@formily/json-schema/esm/types").Stringify<{
@@ -79,8 +79,15 @@ function assignUpdateValue(props, field) {
79
79
  }
80
80
  return _props;
81
81
  }
82
+ function assignValueBindKey(props, field) {
83
+ const _props = { ...props };
84
+ if (isField(field)) {
85
+ _props.key = _props.value === void 0 ? 0 : 1;
86
+ }
87
+ return _props;
88
+ }
82
89
  function createObjSchema(properties) {
83
90
  return { type: "object", properties };
84
91
  }
85
92
 
86
- export { assignUpdateValue, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema };
93
+ export { assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.18-beta.4",
3
+ "version": "3.1.18-beta.5",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -65,5 +65,5 @@
65
65
  "iOS 7",
66
66
  "last 3 iOS versions"
67
67
  ],
68
- "gitHead": "74f97589ab3118a2398496092cc07d6a47e2aa6e"
68
+ "gitHead": "c8b9bdb41b7894057f6f772db6c18f2f267cb61a"
69
69
  }