@vunk/form 1.1.20 → 1.1.21

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.
@@ -36,7 +36,8 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
36
36
  optionsUrl: {
37
37
  type: String,
38
38
  default: ""
39
- }
39
+ },
40
+ defaultModelValue: null
40
41
  });
41
42
  const emits = __spreadValues({}, selectEmits);
42
43
 
@@ -59,7 +60,7 @@ const _sfc_main = defineComponent({
59
60
  props,
60
61
  setup(props2, { emit }) {
61
62
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
62
- const selectBindProps = createSelectBindProps(props2, ["disabled"]);
63
+ const selectBindProps = createSelectBindProps(props2, ["disabled", "modelValue"]);
63
64
  const selectOnEmits = createSelectOnEmits(emit);
64
65
  const readonly = useComputedReadonly(props2);
65
66
  const optionsFromUrl = ref([]);
@@ -118,6 +119,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
118
119
  return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
119
120
  default: withCtx(() => [
120
121
  _ctx.reshow ? (openBlock(), createBlock(_component_ElSelect, mergeProps({ key: 0 }, _ctx.selectBindProps, toHandlers(_ctx.selectOnEmits), {
122
+ modelValue: _ctx.defaultModelValue ?? _ctx.modelValue,
121
123
  disabled: _ctx.readonly || _ctx.disabled,
122
124
  class: {
123
125
  "is-readonly": _ctx.readonly
@@ -140,7 +142,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
140
142
  ])
141
143
  };
142
144
  })
143
- ]), 1040, ["disabled", "class"])) : createCommentVNode("v-if", true),
145
+ ]), 1040, ["modelValue", "disabled", "class"])) : createCommentVNode("v-if", true),
144
146
  renderSlot(_ctx.$slots, "default")
145
147
  ]),
146
148
  _: 3
@@ -73,6 +73,7 @@ export declare const props: {
73
73
  type: StringConstructor;
74
74
  default: string;
75
75
  };
76
+ defaultModelValue: null;
76
77
  name: StringConstructor;
77
78
  id: StringConstructor;
78
79
  modelValue: {
@@ -32,7 +32,8 @@ const props = __spreadProps(__spreadValues(__spreadValues({}, _VkfFormItemCtx.pr
32
32
  optionsUrl: {
33
33
  type: String,
34
34
  default: ""
35
- }
35
+ },
36
+ defaultModelValue: null
36
37
  });
37
38
  const emits = __spreadValues({}, selectEmits);
38
39
 
@@ -70,6 +70,7 @@ declare const _default: import("vue").DefineComponent<{
70
70
  type: StringConstructor;
71
71
  default: string;
72
72
  };
73
+ defaultModelValue: null;
73
74
  name: StringConstructor;
74
75
  id: StringConstructor;
75
76
  modelValue: {
@@ -222,7 +223,6 @@ declare const _default: import("vue").DefineComponent<{
222
223
  name: string | undefined;
223
224
  loading: boolean;
224
225
  id: string | undefined;
225
- modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
226
226
  autocomplete: string;
227
227
  placeholder: string | undefined;
228
228
  clearable: boolean;
@@ -404,6 +404,7 @@ declare const _default: import("vue").DefineComponent<{
404
404
  type: StringConstructor;
405
405
  default: string;
406
406
  };
407
+ defaultModelValue: null;
407
408
  name: StringConstructor;
408
409
  id: StringConstructor;
409
410
  modelValue: {
@@ -272,6 +272,7 @@ declare const _default: import("vue").DefineComponent<{
272
272
  loading: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
273
273
  modelValue: any;
274
274
  validateEvent: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
275
+ defaultModelValue: boolean;
275
276
  width: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
276
277
  inlinePrompt: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
277
278
  activeText: string;
@@ -281,6 +282,5 @@ declare const _default: import("vue").DefineComponent<{
281
282
  activeColor: string;
282
283
  inactiveColor: string;
283
284
  borderColor: string;
284
- defaultModelValue: boolean;
285
285
  }>;
286
286
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {