@vunk/form 0.0.1-alpha.12 → 0.0.1-alpha.13

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,6 +1,6 @@
1
1
  import { _VkfFormItemCtx, VkfFormItem } from '@vunk/form/components/form-item';
2
2
  import { selectProps, selectEmits, createSelectBindProps, createSelectOnEmits } from '@vunk/form/shared/element-plus';
3
- import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, toHandlers, createSlots, createElementBlock, Fragment, renderList, renderSlot, resolveDynamicComponent } from 'vue';
3
+ import { defineComponent, computed, ref, watch, nextTick, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, mergeProps, toHandlers, createSlots, createElementBlock, Fragment, renderList, renderSlot, resolveDynamicComponent, createCommentVNode } from 'vue';
4
4
  import { ElSelect, ElOption } from 'element-plus';
5
5
  import { isPlainObject } from '@vunk/core/shared/utils-object';
6
6
 
@@ -79,11 +79,20 @@ var script = defineComponent({
79
79
  return a;
80
80
  }, []);
81
81
  });
82
+ const reshow = ref(true);
83
+ watch(() => selectBindProps.value.multiple, () => {
84
+ emit("update:modelValue", void 0);
85
+ reshow.value = false;
86
+ nextTick(() => {
87
+ reshow.value = true;
88
+ });
89
+ });
82
90
  return {
83
91
  formItemBindProps,
84
92
  selectBindProps,
85
93
  selectOnEmits,
86
- selectOptions
94
+ selectOptions,
95
+ reshow
87
96
  };
88
97
  }
89
98
  });
@@ -94,7 +103,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
94
103
  const _component_VkfFormItem = resolveComponent("VkfFormItem");
95
104
  return openBlock(), createBlock(_component_VkfFormItem, normalizeProps(guardReactiveProps(_ctx.formItemBindProps)), {
96
105
  default: withCtx(() => [
97
- createVNode(_component_ElSelect, mergeProps(_ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), createSlots({
106
+ _ctx.reshow ? (openBlock(), createBlock(_component_ElSelect, mergeProps({ key: 0 }, _ctx.selectBindProps, toHandlers(_ctx.selectOnEmits)), createSlots({
98
107
  default: withCtx(() => [
99
108
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selectOptions, (item) => {
100
109
  return openBlock(), createBlock(_component_ElOption, mergeProps(item, {
@@ -113,7 +122,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
113
122
  ])
114
123
  };
115
124
  })
116
- ]), 1040)
125
+ ]), 1040)) : createCommentVNode("v-if", true)
117
126
  ]),
118
127
  _: 3
119
128
  }, 16);
@@ -304,6 +304,7 @@ declare const _default: import("vue").DefineComponent<{
304
304
  }>>> & {
305
305
  key: any;
306
306
  })[]>;
307
+ reshow: import("vue").Ref<boolean>;
307
308
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
308
309
  'update:modelValue': null;
309
310
  change: null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/form",
3
- "version": "0.0.1-alpha.12",
3
+ "version": "0.0.1-alpha.13",
4
4
  "description": "",
5
5
  "main": "index.esm.js",
6
6
  "scripts": {