@tmagic/form 1.2.14 → 1.3.0-alpha.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.
Files changed (50) hide show
  1. package/dist/style.css +3 -0
  2. package/dist/tmagic-form.js +104 -91
  3. package/dist/tmagic-form.js.map +1 -1
  4. package/dist/tmagic-form.umd.cjs +102 -89
  5. package/dist/tmagic-form.umd.cjs.map +1 -1
  6. package/package.json +3 -3
  7. package/src/containers/Container.vue +1 -1
  8. package/src/containers/Fieldset.vue +2 -9
  9. package/src/containers/Table.vue +1 -1
  10. package/src/containers/Tabs.vue +65 -60
  11. package/src/fields/Cascader.vue +2 -1
  12. package/src/fields/Checkbox.vue +1 -0
  13. package/src/fields/CheckboxGroup.vue +1 -0
  14. package/src/fields/ColorPicker.vue +1 -0
  15. package/src/fields/Date.vue +1 -0
  16. package/src/fields/DateTime.vue +1 -0
  17. package/src/fields/Daterange.vue +1 -0
  18. package/src/fields/Display.vue +1 -0
  19. package/src/fields/DynamicField.vue +1 -0
  20. package/src/fields/Hidden.vue +1 -0
  21. package/src/fields/Link.vue +1 -0
  22. package/src/fields/Number.vue +1 -0
  23. package/src/fields/RadioGroup.vue +1 -0
  24. package/src/fields/Select.vue +3 -2
  25. package/src/fields/Switch.vue +1 -0
  26. package/src/fields/Text.vue +4 -3
  27. package/src/fields/Textarea.vue +1 -0
  28. package/src/fields/Time.vue +1 -0
  29. package/src/schema.ts +4 -1
  30. package/src/theme/form.scss +6 -0
  31. package/types/containers/Table.vue.d.ts +2 -2
  32. package/types/fields/Cascader.vue.d.ts +2 -0
  33. package/types/fields/Checkbox.vue.d.ts +2 -0
  34. package/types/fields/CheckboxGroup.vue.d.ts +2 -0
  35. package/types/fields/ColorPicker.vue.d.ts +2 -0
  36. package/types/fields/Date.vue.d.ts +2 -0
  37. package/types/fields/DateTime.vue.d.ts +2 -0
  38. package/types/fields/Daterange.vue.d.ts +2 -0
  39. package/types/fields/Display.vue.d.ts +2 -0
  40. package/types/fields/DynamicField.vue.d.ts +2 -0
  41. package/types/fields/Hidden.vue.d.ts +2 -0
  42. package/types/fields/Link.vue.d.ts +2 -0
  43. package/types/fields/Number.vue.d.ts +2 -0
  44. package/types/fields/RadioGroup.vue.d.ts +2 -0
  45. package/types/fields/Select.vue.d.ts +2 -0
  46. package/types/fields/Switch.vue.d.ts +2 -0
  47. package/types/fields/Text.vue.d.ts +2 -0
  48. package/types/fields/Textarea.vue.d.ts +2 -0
  49. package/types/fields/Time.vue.d.ts +2 -0
  50. package/types/schema.d.ts +3 -3
package/dist/style.css CHANGED
@@ -36,6 +36,9 @@
36
36
  .m-form .el-form-item.hidden > .el-form-item__label {
37
37
  display: none;
38
38
  }
39
+ .m-form .t-form__item.hidden > .t-form__label {
40
+ display: none;
41
+ }
39
42
 
40
43
  .magic-datetime-picker-popper .el-picker-panel__footer button:first-child {
41
44
  display: none;
@@ -1,7 +1,7 @@
1
- import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
1
+ import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, mergeProps, getCurrentInstance, reactive, onBeforeUnmount, vModelText, provide, onBeforeMount, resolveDirective, createSlots, withModifiers } from 'vue';
2
2
  import { WarningFilled, CaretBottom, CaretRight, Delete, CaretTop, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
3
3
  import { cloneDeep, isEqual, isEmpty } from 'lodash-es';
4
- import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getConfig as getConfig$1, TMagicTabs, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicOptionGroup, TMagicOption, TMagicSelect, TMagicSwitch, TMagicTimePicker } from '@tmagic/design';
4
+ import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, TMagicTable, TMagicTableColumn, TMagicUpload, TMagicPagination, tMagicMessage, getConfig as getConfig$1, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, TMagicDialog, TMagicInputNumber, TMagicRadioGroup, TMagicRadio, TMagicOptionGroup, TMagicOption, TMagicSelect, TMagicSwitch, TMagicTimePicker } from '@tmagic/design';
5
5
  import Sortable from 'sortablejs';
6
6
  import { asyncLoadJs, sleep, datetimeFormatter, isNumber } from '@tmagic/utils';
7
7
  import cloneDeep$1 from 'lodash-es/cloneDeep';
@@ -253,7 +253,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
253
253
  }
254
254
  return value;
255
255
  });
256
- const itemLabelWidth = computed(() => props.config.labelWidth || props.labelWidth);
256
+ const itemLabelWidth = computed(() => props.config.labelWidth ?? props.labelWidth);
257
257
  watchEffect(() => {
258
258
  expand.value = props.expandMore;
259
259
  });
@@ -647,14 +647,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
647
647
  emit("change", props.model);
648
648
  };
649
649
  const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
650
- if (props.config.checkbox && name.value) {
651
- watch(
652
- () => props.model[name.value]?.value,
653
- () => {
654
- emit("change", props.model);
655
- }
656
- );
657
- }
658
650
  const onAddDiffCount = () => emit("addDiffCount");
659
651
  return (_ctx, _cache) => {
660
652
  return (unref(name) ? __props.model[unref(name)] : __props.model) ? (openBlock(), createElementBlock("fieldset", {
@@ -666,7 +658,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
666
658
  default: withCtx(() => [
667
659
  createVNode(unref(TMagicCheckbox), {
668
660
  modelValue: __props.model[unref(name)].value,
669
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[unref(name)].value = $event),
661
+ "onUpdate:modelValue": [
662
+ _cache[0] || (_cache[0] = ($event) => __props.model[unref(name)].value = $event),
663
+ change
664
+ ],
670
665
  prop: `${__props.prop}${__props.prop ? "." : ""}${__props.config.name}.value`,
671
666
  "true-label": 1,
672
667
  "false-label": 0
@@ -1614,7 +1609,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1614
1609
  mForm?.$emit("field-change", props.prop, props.model[modelName.value]);
1615
1610
  };
1616
1611
  const excelHandler = (file) => {
1617
- if (!file || !file.raw) {
1612
+ if (!file?.raw) {
1618
1613
  return false;
1619
1614
  }
1620
1615
  const reader = new FileReader();
@@ -1967,7 +1962,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1967
1962
  emits: ["change", "addDiffCount"],
1968
1963
  setup(__props, { emit }) {
1969
1964
  const props = __props;
1970
- const uiComponent = getConfig$1("components").tabPane;
1965
+ const tabPaneComponent = getConfig$1("components").tabPane;
1966
+ const tabsComponent = getConfig$1("components").tabs;
1971
1967
  const getActive = (mForm2, props2, activeTabName2) => {
1972
1968
  const { config, model, prop } = props2;
1973
1969
  const { active } = config;
@@ -1999,7 +1995,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1999
1995
  throw new Error("dynamic tab 必须配置name");
2000
1996
  return props.model[props.config.name] || [];
2001
1997
  }
2002
- return props.config.items;
1998
+ return props.config.items.filter((item) => display(mForm, item.display, props));
2003
1999
  });
2004
2000
  const filter = (config) => filterFunction(mForm, config, props);
2005
2001
  watchEffect(() => {
@@ -2048,7 +2044,6 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2048
2044
  emit("change", props.model);
2049
2045
  mForm?.$emit("field-change", props.prop, props.model[props.config.name]);
2050
2046
  };
2051
- const display$1 = (displayConfig) => display(mForm, displayConfig, props);
2052
2047
  const changeHandler = () => {
2053
2048
  emit("change", props.model);
2054
2049
  if (typeof props.config.onChange === "function") {
@@ -2064,61 +2059,62 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2064
2059
  emit("addDiffCount");
2065
2060
  };
2066
2061
  return (_ctx, _cache) => {
2067
- const _component_el_badge = resolveComponent("el-badge");
2068
- return openBlock(), createBlock(unref(TMagicTabs), {
2069
- modelValue: activeTabName.value,
2070
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event),
2071
- class: normalizeClass(__props.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"),
2072
- type: __props.config.tabType,
2073
- editable: __props.config.editable || false,
2074
- "tab-position": __props.config.tabPosition || "top",
2075
- onTabClick: tabClickHandler,
2076
- onTabAdd,
2077
- onTabRemove
2078
- }, {
2062
+ return openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent).component), mergeProps(
2063
+ {
2064
+ modelValue: activeTabName.value,
2065
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event)
2066
+ },
2067
+ unref(tabsComponent).props({
2068
+ type: __props.config.tabType,
2069
+ editable: __props.config.editable || false,
2070
+ tabPosition: __props.config.tabPosition || "top"
2071
+ }),
2072
+ {
2073
+ class: `tmagic-design-tabs ${__props.config.dynamic ? "magic-form-dynamic-tab" : "magic-form-tab"}`,
2074
+ onTabClick: tabClickHandler,
2075
+ onTabAdd,
2076
+ onTabRemove
2077
+ }
2078
+ ), {
2079
2079
  default: withCtx(() => [
2080
2080
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabs), (tab, tabIndex) => {
2081
- return openBlock(), createElementBlock(Fragment, null, [
2082
- display$1(tab.display) && tabItems(tab).length ? (openBlock(), createBlock(resolveDynamicComponent(unref(uiComponent).component), {
2083
- key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex,
2084
- name: filter(tab.status) || tabIndex.toString(),
2085
- lazy: tab.lazy || false
2086
- }, {
2087
- label: withCtx(() => [
2088
- createElementVNode("span", null, [
2089
- createTextVNode(toDisplayString(filter(tab.title)), 1),
2090
- createVNode(_component_el_badge, {
2091
- hidden: !diffCount.value[tabIndex],
2092
- value: diffCount.value[tabIndex],
2093
- class: "diff-count-badge"
2094
- }, null, 8, ["hidden", "value"])
2095
- ])
2096
- ]),
2097
- default: withCtx(() => [
2098
- (openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
2099
- return openBlock(), createBlock(_sfc_main$v, {
2100
- key: item[unref(mForm)?.keyProp || "__key"],
2101
- config: item,
2102
- disabled: __props.disabled,
2103
- model: __props.config.dynamic ? (__props.name ? __props.model[__props.name] : __props.model)[tabIndex] : tab.name ? (__props.name ? __props.model[__props.name] : __props.model)[tab.name] : __props.name ? __props.model[__props.name] : __props.model,
2104
- "last-values": unref(isEmpty)(__props.lastValues) ? {} : __props.config.dynamic ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tabIndex] : tab.name ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tab.name] : __props.name ? __props.lastValues[__props.name] : __props.lastValues,
2105
- "is-compare": __props.isCompare,
2106
- prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
2107
- size: __props.size,
2108
- "label-width": tab.labelWidth || __props.labelWidth,
2109
- "expand-more": __props.expandMore,
2110
- onChange: changeHandler,
2111
- onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
2112
- }, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
2113
- }), 128))
2114
- ]),
2115
- _: 2
2116
- }, 1032, ["name", "lazy"])) : createCommentVNode("", true)
2117
- ], 64);
2118
- }), 256))
2081
+ return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent).component), mergeProps({
2082
+ key: tab[unref(mForm)?.keyProp || "__key"] ?? tabIndex
2083
+ }, unref(tabPaneComponent).props({ name: filter(tab.status) || tabIndex.toString(), lazy: tab.lazy || false })), {
2084
+ label: withCtx(() => [
2085
+ createElementVNode("span", null, [
2086
+ createTextVNode(toDisplayString(filter(tab.title)), 1),
2087
+ createVNode(unref(TMagicBadge), {
2088
+ hidden: !diffCount.value[tabIndex],
2089
+ value: diffCount.value[tabIndex],
2090
+ class: "diff-count-badge"
2091
+ }, null, 8, ["hidden", "value"])
2092
+ ])
2093
+ ]),
2094
+ default: withCtx(() => [
2095
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabItems(tab), (item) => {
2096
+ return openBlock(), createBlock(_sfc_main$v, {
2097
+ key: item[unref(mForm)?.keyProp || "__key"],
2098
+ config: item,
2099
+ disabled: __props.disabled,
2100
+ model: __props.config.dynamic ? (__props.name ? __props.model[__props.name] : __props.model)[tabIndex] : tab.name ? (__props.name ? __props.model[__props.name] : __props.model)[tab.name] : __props.name ? __props.model[__props.name] : __props.model,
2101
+ "last-values": unref(isEmpty)(__props.lastValues) ? {} : __props.config.dynamic ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tabIndex] : tab.name ? (__props.name ? __props.lastValues[__props.name] : __props.lastValues)[tab.name] : __props.name ? __props.lastValues[__props.name] : __props.lastValues,
2102
+ "is-compare": __props.isCompare,
2103
+ prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
2104
+ size: __props.size,
2105
+ "label-width": tab.labelWidth || __props.labelWidth,
2106
+ "expand-more": __props.expandMore,
2107
+ onChange: changeHandler,
2108
+ onAddDiffCount: ($event) => onAddDiffCount(tabIndex)
2109
+ }, null, 8, ["config", "disabled", "model", "last-values", "is-compare", "prop", "size", "label-width", "expand-more", "onAddDiffCount"]);
2110
+ }), 128))
2111
+ ]),
2112
+ _: 2
2113
+ }, 1040);
2114
+ }), 128))
2119
2115
  ]),
2120
2116
  _: 1
2121
- }, 8, ["modelValue", "class", "type", "editable", "tab-position"]);
2117
+ }, 16, ["modelValue", "class"]);
2122
2118
  };
2123
2119
  }
2124
2120
  });
@@ -2162,7 +2158,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2162
2158
  name: null,
2163
2159
  prop: null,
2164
2160
  disabled: { type: Boolean },
2165
- size: null
2161
+ size: null,
2162
+ lastValues: null
2166
2163
  },
2167
2164
  emits: ["change"],
2168
2165
  setup(__props, { emit }) {
@@ -2206,7 +2203,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2206
2203
  watchEffect(
2207
2204
  () => options.value = props.config.options(mForm, { model: props.model, formValues: mForm.values })
2208
2205
  );
2209
- } else if (!props.config.options || !props.config.options.length || props.config.remote) {
2206
+ } else if (!props.config.options?.length || props.config.remote) {
2210
2207
  Promise.resolve(setRemoteOptions());
2211
2208
  }
2212
2209
  const changeHandler = (value) => {
@@ -2249,7 +2246,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2249
2246
  name: null,
2250
2247
  prop: null,
2251
2248
  disabled: { type: Boolean },
2252
- size: null
2249
+ size: null,
2250
+ lastValues: null
2253
2251
  },
2254
2252
  emits: ["change"],
2255
2253
  setup(__props, { emit }) {
@@ -2310,7 +2308,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2310
2308
  name: null,
2311
2309
  prop: null,
2312
2310
  disabled: { type: Boolean },
2313
- size: null
2311
+ size: null,
2312
+ lastValues: null
2314
2313
  },
2315
2314
  emits: ["change"],
2316
2315
  setup(__props, { emit }) {
@@ -2372,7 +2371,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2372
2371
  name: null,
2373
2372
  prop: null,
2374
2373
  disabled: { type: Boolean },
2375
- size: null
2374
+ size: null,
2375
+ lastValues: null
2376
2376
  },
2377
2377
  emits: ["change"],
2378
2378
  setup(__props, { emit }) {
@@ -2405,7 +2405,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2405
2405
  name: null,
2406
2406
  prop: null,
2407
2407
  disabled: { type: Boolean },
2408
- size: null
2408
+ size: null,
2409
+ lastValues: null
2409
2410
  },
2410
2411
  emits: ["change"],
2411
2412
  setup(__props, { emit }) {
@@ -2444,7 +2445,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2444
2445
  name: null,
2445
2446
  prop: null,
2446
2447
  disabled: { type: Boolean },
2447
- size: null
2448
+ size: null,
2449
+ lastValues: null
2448
2450
  },
2449
2451
  emits: ["change"],
2450
2452
  setup(__props, { emit }) {
@@ -2545,7 +2547,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2545
2547
  name: null,
2546
2548
  prop: null,
2547
2549
  disabled: { type: Boolean },
2548
- size: null
2550
+ size: null,
2551
+ lastValues: null
2549
2552
  },
2550
2553
  emits: ["change"],
2551
2554
  setup(__props, { emit }) {
@@ -2592,7 +2595,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2592
2595
  initValues: null,
2593
2596
  values: null,
2594
2597
  name: null,
2595
- prop: null
2598
+ prop: null,
2599
+ lastValues: null
2596
2600
  },
2597
2601
  setup(__props) {
2598
2602
  const props = __props;
@@ -2620,7 +2624,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2620
2624
  name: null,
2621
2625
  prop: null,
2622
2626
  disabled: { type: Boolean },
2623
- size: null
2627
+ size: null,
2628
+ lastValues: null
2624
2629
  },
2625
2630
  emits: ["change"],
2626
2631
  setup(__props, { emit }) {
@@ -2709,7 +2714,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2709
2714
  initValues: null,
2710
2715
  values: null,
2711
2716
  name: null,
2712
- prop: null
2717
+ prop: null,
2718
+ lastValues: null
2713
2719
  },
2714
2720
  setup(__props) {
2715
2721
  const props = __props;
@@ -3085,7 +3091,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3085
3091
  name: null,
3086
3092
  prop: null,
3087
3093
  disabled: { type: Boolean },
3088
- size: null
3094
+ size: null,
3095
+ lastValues: null
3089
3096
  },
3090
3097
  emits: ["change"],
3091
3098
  setup(__props, { emit }) {
@@ -3182,7 +3189,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3182
3189
  name: null,
3183
3190
  prop: null,
3184
3191
  disabled: { type: Boolean },
3185
- size: null
3192
+ size: null,
3193
+ lastValues: null
3186
3194
  },
3187
3195
  emits: ["change", "input"],
3188
3196
  setup(__props, { emit }) {
@@ -3229,7 +3237,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3229
3237
  name: null,
3230
3238
  prop: null,
3231
3239
  disabled: { type: Boolean },
3232
- size: null
3240
+ size: null,
3241
+ lastValues: null
3233
3242
  },
3234
3243
  emits: ["change"],
3235
3244
  setup(__props, { emit }) {
@@ -3338,7 +3347,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3338
3347
  name: null,
3339
3348
  prop: null,
3340
3349
  disabled: { type: Boolean },
3341
- size: null
3350
+ size: null,
3351
+ lastValues: null
3342
3352
  },
3343
3353
  emits: ["change"],
3344
3354
  setup(__props, { emit }) {
@@ -3646,8 +3656,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3646
3656
  class: "m-select",
3647
3657
  ref_key: "tMagicSelect",
3648
3658
  ref: tMagicSelect,
3649
- clearable: "",
3650
- filterable: "",
3659
+ clearable: typeof __props.config.clearable !== "undefined" ? __props.config.clearable : true,
3660
+ filterable: typeof __props.config.filterable !== "undefined" ? __props.config.filterable : true,
3651
3661
  "popper-class": `m-select-popper ${unref(popperClass)}`,
3652
3662
  size: __props.size,
3653
3663
  remote: remote.value,
@@ -3673,7 +3683,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3673
3683
  ]) : createCommentVNode("", true)
3674
3684
  ]),
3675
3685
  _: 1
3676
- }, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
3686
+ }, 8, ["modelValue", "clearable", "filterable", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
3677
3687
  [_directive_loading, loading.value]
3678
3688
  ]) : createCommentVNode("", true);
3679
3689
  };
@@ -3693,7 +3703,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3693
3703
  name: null,
3694
3704
  prop: null,
3695
3705
  disabled: { type: Boolean },
3696
- size: null
3706
+ size: null,
3707
+ lastValues: null
3697
3708
  },
3698
3709
  emits: ["change"],
3699
3710
  setup(__props, { emit }) {
@@ -3750,7 +3761,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3750
3761
  name: null,
3751
3762
  prop: null,
3752
3763
  disabled: { type: Boolean },
3753
- size: null
3764
+ size: null,
3765
+ lastValues: null
3754
3766
  },
3755
3767
  emits: ["change", "input"],
3756
3768
  setup(__props, { emit }) {
@@ -3826,7 +3838,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3826
3838
  emit("change", props.model[props.name]);
3827
3839
  };
3828
3840
  return (_ctx, _cache) => {
3829
- const _component_el_button = resolveComponent("el-button");
3830
3841
  return openBlock(), createBlock(unref(TMagicInput), {
3831
3842
  modelValue: __props.model[__props.name],
3832
3843
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
@@ -3842,7 +3853,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3842
3853
  name: "append",
3843
3854
  fn: withCtx(() => [
3844
3855
  typeof __props.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(__props.config.append), 1)) : createCommentVNode("", true),
3845
- typeof __props.config.append === "object" && __props.config.append.type === "button" ? (openBlock(), createBlock(_component_el_button, {
3856
+ typeof __props.config.append === "object" && __props.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
3846
3857
  key: 1,
3847
3858
  style: { "color": "#409eff" },
3848
3859
  size: __props.size,
@@ -3873,7 +3884,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3873
3884
  name: null,
3874
3885
  prop: null,
3875
3886
  disabled: { type: Boolean },
3876
- size: null
3887
+ size: null,
3888
+ lastValues: null
3877
3889
  },
3878
3890
  emits: ["change", "input"],
3879
3891
  setup(__props, { emit }) {
@@ -3916,7 +3928,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3916
3928
  name: null,
3917
3929
  prop: null,
3918
3930
  disabled: { type: Boolean },
3919
- size: null
3931
+ size: null,
3932
+ lastValues: null
3920
3933
  },
3921
3934
  emits: ["change"],
3922
3935
  setup(__props, { emit }) {