@tmagic/form 1.2.13 → 1.2.15

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 (45) hide show
  1. package/dist/style.css +2 -2
  2. package/dist/tmagic-form.js +103 -108
  3. package/dist/tmagic-form.js.map +1 -1
  4. package/dist/tmagic-form.umd.cjs +103 -113
  5. package/dist/tmagic-form.umd.cjs.map +1 -1
  6. package/package.json +7 -7
  7. package/src/containers/Fieldset.vue +2 -9
  8. package/src/containers/Table.vue +1 -1
  9. package/src/containers/Tabs.vue +65 -60
  10. package/src/fields/Select.vue +2 -2
  11. package/src/fields/Text.vue +3 -3
  12. package/src/schema.ts +1 -0
  13. package/types/Form.vue.d.ts +5 -5
  14. package/types/FormDialog.vue.d.ts +41 -743
  15. package/types/containers/Col.vue.d.ts +2 -2
  16. package/types/containers/Container.vue.d.ts +3 -3
  17. package/types/containers/Fieldset.vue.d.ts +3 -3
  18. package/types/containers/GroupList.vue.d.ts +2 -2
  19. package/types/containers/GroupListItem.vue.d.ts +2 -2
  20. package/types/containers/Panel.vue.d.ts +22 -90
  21. package/types/containers/Row.vue.d.ts +2 -2
  22. package/types/containers/Step.vue.d.ts +3 -3
  23. package/types/containers/Table.vue.d.ts +42 -155
  24. package/types/containers/Tabs.vue.d.ts +3 -3
  25. package/types/fields/Cascader.vue.d.ts +4 -4
  26. package/types/fields/Checkbox.vue.d.ts +4 -4
  27. package/types/fields/CheckboxGroup.vue.d.ts +4 -4
  28. package/types/fields/ColorPicker.vue.d.ts +4 -4
  29. package/types/fields/Date.vue.d.ts +4 -4
  30. package/types/fields/DateTime.vue.d.ts +4 -4
  31. package/types/fields/Daterange.vue.d.ts +4 -4
  32. package/types/fields/Display.vue.d.ts +2 -2
  33. package/types/fields/DynamicField.vue.d.ts +4 -4
  34. package/types/fields/Hidden.vue.d.ts +2 -2
  35. package/types/fields/Link.vue.d.ts +4 -4
  36. package/types/fields/Number.vue.d.ts +4 -4
  37. package/types/fields/RadioGroup.vue.d.ts +4 -4
  38. package/types/fields/Select.vue.d.ts +4 -4
  39. package/types/fields/SelectOptionGroups.vue.d.ts +2 -2
  40. package/types/fields/SelectOptions.vue.d.ts +2 -2
  41. package/types/fields/Switch.vue.d.ts +4 -4
  42. package/types/fields/Text.vue.d.ts +4 -4
  43. package/types/fields/Textarea.vue.d.ts +4 -4
  44. package/types/fields/Time.vue.d.ts +4 -4
  45. package/types/schema.d.ts +15 -14
package/dist/style.css CHANGED
@@ -47,7 +47,7 @@ div.m-fields-link {
47
47
 
48
48
  fieldset.m-fieldset {
49
49
  position: relative;
50
- border: 1px solid rgb(229, 229, 229);
50
+ border: 1px solid #e5e5e5;
51
51
  margin-top: 10px;
52
52
  margin-bottom: 10px;
53
53
  min-inline-size: auto;
@@ -61,7 +61,7 @@ fieldset.m-fieldset legend {
61
61
  border: 0;
62
62
  top: -10px;
63
63
  left: 20px;
64
- background: rgb(255, 255, 255);
64
+ background: white;
65
65
  width: auto;
66
66
  padding: 0px 3px;
67
67
  font-weight: bold;
@@ -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';
@@ -154,7 +154,7 @@ const getRules = function(mForm, rules = [], props) {
154
154
  };
155
155
  const initValue = async (mForm, { initValues, config }) => {
156
156
  if (!Array.isArray(config))
157
- throw new Error("config\u5E94\u8BE5\u4E3A\u6570\u7EC4");
157
+ throw new Error("config应该为数组");
158
158
  let valuesTmp = createValues(mForm, config, toRaw(initValues), {});
159
159
  const [firstForm] = config;
160
160
  if (firstForm && typeof firstForm.onInitValue === "function") {
@@ -589,7 +589,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
589
589
  onClick: expandHandler
590
590
  }, {
591
591
  default: withCtx(() => [
592
- createTextVNode(toDisplayString(expand.value ? "\u6536\u8D77\u914D\u7F6E" : "\u5C55\u5F00\u66F4\u591A\u914D\u7F6E"), 1)
592
+ createTextVNode(toDisplayString(expand.value ? "收起配置" : "展开更多配置"), 1)
593
593
  ]),
594
594
  _: 1
595
595
  })
@@ -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
@@ -740,8 +735,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
740
735
  });
741
736
 
742
737
  const _hoisted_1$9 = { class: "m-fields-group-list-item" };
743
- const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("\u4E0A\u79FB");
744
- const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("\u4E0B\u79FB");
738
+ const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("上移");
739
+ const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("下移");
745
740
  const _hoisted_4$4 = ["innerHTML"];
746
741
  const __default__$t = defineComponent({
747
742
  name: "MFormGroupListItem"
@@ -779,7 +774,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
779
774
  if (props.config.titleKey && props.model[props.config.titleKey]) {
780
775
  return props.model[props.config.titleKey];
781
776
  }
782
- return `\u7EC4 ${String(props.index)}`;
777
+ return `组 ${String(props.index)}`;
783
778
  });
784
779
  const length = computed(() => props.groupModel?.length || 0);
785
780
  const itemExtra = computed(() => filterFunction(mForm, props.config.itemExtra, props));
@@ -899,12 +894,12 @@ const _hoisted_3$4 = {
899
894
  key: 1,
900
895
  class: "el-table__empty-block"
901
896
  };
902
- const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "\u6682\u65E0\u6570\u636E", -1);
897
+ const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "el-table__empty-text" }, "暂无数据", -1);
903
898
  const _hoisted_5$2 = [
904
899
  _hoisted_4$3
905
900
  ];
906
- const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0\u7EC4");
907
- const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
901
+ const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("添加组");
902
+ const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("切换为表格");
908
903
  const __default__$s = defineComponent({
909
904
  name: "MFormGroupList"
910
905
  });
@@ -1325,12 +1320,12 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1325
1320
  const _hoisted_1$6 = ["innerHTML"];
1326
1321
  const _hoisted_2$2 = { class: "el-form-item__content" };
1327
1322
  const _hoisted_3$2 = ["innerHTML"];
1328
- const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0");
1329
- const _hoisted_5 = /* @__PURE__ */ createTextVNode(" \xA0 ");
1330
- const _hoisted_6 = /* @__PURE__ */ createTextVNode("\u5C55\u5F00\u914D\u7F6E");
1331
- const _hoisted_7 = /* @__PURE__ */ createTextVNode("\u5BFC\u5165EXCEL");
1332
- const _hoisted_8 = /* @__PURE__ */ createTextVNode("\xA0 ");
1333
- const _hoisted_9 = /* @__PURE__ */ createTextVNode("\u6E05\u7A7A");
1323
+ const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("添加");
1324
+ const _hoisted_5 = /* @__PURE__ */ createTextVNode("   ");
1325
+ const _hoisted_6 = /* @__PURE__ */ createTextVNode("展开配置");
1326
+ const _hoisted_7 = /* @__PURE__ */ createTextVNode("导入EXCEL");
1327
+ const _hoisted_8 = /* @__PURE__ */ createTextVNode("  ");
1328
+ const _hoisted_9 = /* @__PURE__ */ createTextVNode("清空");
1334
1329
  const _hoisted_10 = {
1335
1330
  key: 1,
1336
1331
  class: "bottom",
@@ -1430,7 +1425,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1430
1425
  };
1431
1426
  const newHandler = async (row) => {
1432
1427
  if (props.config.max && props.model[modelName.value].length >= props.config.max) {
1433
- tMagicMessage.error(`\u6700\u591A\u65B0\u589E\u914D\u7F6E\u4E0D\u80FD\u8D85\u8FC7${props.config.max}\u6761`);
1428
+ tMagicMessage.error(`最多新增配置不能超过${props.config.max}条`);
1434
1429
  return;
1435
1430
  }
1436
1431
  const columns = props.config.items;
@@ -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();
@@ -1694,7 +1689,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1694
1689
  }, null, 8, _hoisted_1$6)) : createCommentVNode("", true),
1695
1690
  createElementVNode("div", _hoisted_2$2, [
1696
1691
  createVNode(unref(TMagicTooltip), {
1697
- content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
1692
+ content: "拖拽可排序",
1698
1693
  placement: "left-start",
1699
1694
  disabled: __props.config.dropSort !== true
1700
1695
  }, {
@@ -1729,7 +1724,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1729
1724
  _: 1
1730
1725
  })) : createCommentVNode("", true),
1731
1726
  createVNode(unref(TMagicTableColumn), {
1732
- label: "\u64CD\u4F5C",
1727
+ label: "操作",
1733
1728
  width: __props.config.operateColWidth || 55,
1734
1729
  align: "center",
1735
1730
  fixed: __props.config.fixed === false ? void 0 : "left"
@@ -1752,13 +1747,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1752
1747
  }, 8, ["width", "fixed"]),
1753
1748
  __props.sort && __props.model[unref(modelName)] && __props.model[unref(modelName)].length > 1 ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1754
1749
  key: 1,
1755
- label: "\u6392\u5E8F",
1750
+ label: "排序",
1756
1751
  width: "60"
1757
1752
  }, {
1758
1753
  default: withCtx((scope) => [
1759
1754
  scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== 0 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1760
1755
  key: 0,
1761
- content: "\u70B9\u51FB\u4E0A\u79FB\uFF0C\u53CC\u51FB\u7F6E\u9876",
1756
+ content: "点击上移,双击置顶",
1762
1757
  placement: "top"
1763
1758
  }, {
1764
1759
  default: withCtx(() => [
@@ -1777,7 +1772,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1777
1772
  }, 1024)) : createCommentVNode("", true),
1778
1773
  scope.$index + 1 + pagecontext.value * pagesize.value - 1 !== __props.model[unref(modelName)].length - 1 ? (openBlock(), createBlock(unref(TMagicTooltip), {
1779
1774
  key: 1,
1780
- content: "\u70B9\u51FB\u4E0B\u79FB\uFF0C\u53CC\u51FB\u7F6E\u5E95",
1775
+ content: "点击下移,双击置底",
1781
1776
  placement: "top"
1782
1777
  }, {
1783
1778
  default: withCtx(() => [
@@ -1807,7 +1802,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1807
1802
  __props.showIndex && __props.config.showIndex ? (openBlock(), createBlock(unref(TMagicTableColumn), {
1808
1803
  key: 3,
1809
1804
  width: "60",
1810
- label: "\u5E8F\u53F7"
1805
+ label: "序号"
1811
1806
  }, {
1812
1807
  default: withCtx((scope) => [
1813
1808
  createTextVNode(toDisplayString(scope.$index + 1 + pagecontext.value * pagesize.value), 1)
@@ -1886,7 +1881,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1886
1881
  onClick: toggleFullscreen
1887
1882
  }, {
1888
1883
  default: withCtx(() => [
1889
- createTextVNode(toDisplayString(isFullscreen.value ? "\u9000\u51FA\u5168\u5C4F" : "\u5168\u5C4F\u7F16\u8F91"), 1)
1884
+ createTextVNode(toDisplayString(isFullscreen.value ? "退出全屏" : "全屏编辑"), 1)
1890
1885
  ]),
1891
1886
  _: 1
1892
1887
  }, 8, ["icon"])) : createCommentVNode("", true),
@@ -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;
@@ -1996,10 +1992,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1996
1992
  const tabs = computed(() => {
1997
1993
  if (props.config.dynamic) {
1998
1994
  if (!props.config.name)
1999
- throw new Error("dynamic tab \u5FC5\u987B\u914D\u7F6Ename");
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(() => {
@@ -2014,7 +2010,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2014
2010
  const tabClickHandler = (tab) => tabClick(mForm, tab, props);
2015
2011
  const onTabAdd = () => {
2016
2012
  if (!props.config.name)
2017
- throw new Error("dynamic tab \u5FC5\u987B\u914D\u7F6Ename");
2013
+ throw new Error("dynamic tab 必须配置name");
2018
2014
  if (typeof props.config.onTabAdd === "function") {
2019
2015
  props.config.onTabAdd(mForm, {
2020
2016
  model: props.model,
@@ -2023,7 +2019,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2023
2019
  });
2024
2020
  } else if (tabs.value.length > 0) {
2025
2021
  const newObj = cloneDeep(tabs.value[0]);
2026
- newObj.title = `\u6807\u7B7E${tabs.value.length + 1}`;
2022
+ newObj.title = `标签${tabs.value.length + 1}`;
2027
2023
  props.model[props.config.name].push(newObj);
2028
2024
  }
2029
2025
  emit("change", props.model);
@@ -2031,7 +2027,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2031
2027
  };
2032
2028
  const onTabRemove = (tabName) => {
2033
2029
  if (!props.config.name)
2034
- throw new Error("dynamic tab \u5FC5\u987B\u914D\u7F6Ename");
2030
+ throw new Error("dynamic tab 必须配置name");
2035
2031
  if (typeof props.config.onTabRemove === "function") {
2036
2032
  props.config.onTabRemove(mForm, tabName, {
2037
2033
  model: props.model,
@@ -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
  });
@@ -2520,8 +2516,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2520
2516
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
2521
2517
  type: "datetimerange",
2522
2518
  "range-separator": "-",
2523
- "start-placeholder": "\u5F00\u59CB\u65E5\u671F",
2524
- "end-placeholder": "\u7ED3\u675F\u65E5\u671F",
2519
+ "start-placeholder": "开始日期",
2520
+ "end-placeholder": "结束日期",
2525
2521
  size: __props.size,
2526
2522
  "unlink-panels": true,
2527
2523
  disabled: __props.disabled,
@@ -2836,7 +2832,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2836
2832
  if (field && message)
2837
2833
  error.push(`${field} -> ${message}`);
2838
2834
  if (field && !message)
2839
- error.push(`${field} -> \u51FA\u73B0\u9519\u8BEF`);
2835
+ error.push(`${field} -> 出现错误`);
2840
2836
  if (!field && message)
2841
2837
  error.push(`${message}`);
2842
2838
  });
@@ -2879,9 +2875,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2879
2875
  });
2880
2876
 
2881
2877
  const _hoisted_1$3 = { style: { "min-height": "1px" } };
2882
- const _hoisted_2$1 = /* @__PURE__ */ createTextVNode("\u53D6 \u6D88");
2883
- const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("\u4E0A\u4E00\u6B65");
2884
- const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u4E0B\u4E00\u6B65");
2878
+ const _hoisted_2$1 = /* @__PURE__ */ createTextVNode(" ");
2879
+ const _hoisted_3$1 = /* @__PURE__ */ createTextVNode("上一步");
2880
+ const _hoisted_4 = /* @__PURE__ */ createTextVNode("下一步");
2885
2881
  const __default__$a = defineComponent({
2886
2882
  name: "MFormDialog"
2887
2883
  });
@@ -2898,7 +2894,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2898
2894
  title: null,
2899
2895
  zIndex: null,
2900
2896
  size: null,
2901
- confirmText: { default: "\u786E\u5B9A" }
2897
+ confirmText: { default: "确定" }
2902
2898
  },
2903
2899
  emits: ["close", "submit", "error", "change"],
2904
2900
  setup(__props, { expose, emit }) {
@@ -3071,7 +3067,7 @@ const _hoisted_2 = {
3071
3067
  key: 2,
3072
3068
  class: "m-fields-link"
3073
3069
  };
3074
- const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u70B9\u51FB\u7F16\u8F91");
3070
+ const _hoisted_3 = /* @__PURE__ */ createTextVNode("点击编辑");
3075
3071
  const __default__$9 = defineComponent({
3076
3072
  name: "MFormLink"
3077
3073
  });
@@ -3119,7 +3115,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3119
3115
  if (props.config.displayText) {
3120
3116
  return props.config.displayText;
3121
3117
  }
3122
- return "\u8DF3\u8F6C";
3118
+ return "跳转";
3123
3119
  });
3124
3120
  const editHandler = () => {
3125
3121
  init();
@@ -3156,7 +3152,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3156
3152
  createVNode(_sfc_main$a, {
3157
3153
  ref_key: "editor",
3158
3154
  ref: editor,
3159
- title: __props.config.formTitle || "\u7F16\u8F91\u6269\u5C55\u914D\u7F6E",
3155
+ title: __props.config.formTitle || "编辑扩展配置",
3160
3156
  width: __props.config.formWidth,
3161
3157
  values: formValue.value,
3162
3158
  config: unref(formConfig),
@@ -3344,7 +3340,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3344
3340
  setup(__props, { emit }) {
3345
3341
  const props = __props;
3346
3342
  if (!props.model)
3347
- throw new Error("\u4E0D\u80FD\u6CA1\u6709model");
3343
+ throw new Error("不能没有model");
3348
3344
  useAddField(props.prop);
3349
3345
  const tMagicSelect = ref();
3350
3346
  const mForm = inject("mForm");
@@ -3646,8 +3642,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3646
3642
  class: "m-select",
3647
3643
  ref_key: "tMagicSelect",
3648
3644
  ref: tMagicSelect,
3649
- clearable: "",
3650
- filterable: "",
3645
+ clearable: typeof __props.config.clearable !== "undefined" ? __props.config.clearable : true,
3646
+ filterable: typeof __props.config.filterable !== "undefined" ? __props.config.filterable : true,
3651
3647
  "popper-class": `m-select-popper ${unref(popperClass)}`,
3652
3648
  size: __props.size,
3653
3649
  remote: remote.value,
@@ -3673,7 +3669,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3673
3669
  ]) : createCommentVNode("", true)
3674
3670
  ]),
3675
3671
  _: 1
3676
- }, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
3672
+ }, 8, ["modelValue", "clearable", "filterable", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method"])), [
3677
3673
  [_directive_loading, loading.value]
3678
3674
  ]) : createCommentVNode("", true);
3679
3675
  };
@@ -3826,7 +3822,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3826
3822
  emit("change", props.model[props.name]);
3827
3823
  };
3828
3824
  return (_ctx, _cache) => {
3829
- const _component_el_button = resolveComponent("el-button");
3830
3825
  return openBlock(), createBlock(unref(TMagicInput), {
3831
3826
  modelValue: __props.model[__props.name],
3832
3827
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
@@ -3842,7 +3837,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3842
3837
  name: "append",
3843
3838
  fn: withCtx(() => [
3844
3839
  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, {
3840
+ typeof __props.config.append === "object" && __props.config.append.type === "button" ? (openBlock(), createBlock(unref(TMagicButton), {
3846
3841
  key: 1,
3847
3842
  style: { "color": "#409eff" },
3848
3843
  size: __props.size,