@tmagic/form 1.2.10 → 1.2.11

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.
@@ -399,7 +399,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
399
399
  onChange: onChangeHandler,
400
400
  onAddDiffCount
401
401
  }, null, 40, ["size", "model", "last-values", "config", "name", "disabled", "prop"])),
402
- unref(extra) ? (openBlock(), createElementBlock("div", {
402
+ unref(extra) && unref(type) !== "table" ? (openBlock(), createElementBlock("div", {
403
403
  key: 2,
404
404
  innerHTML: unref(extra),
405
405
  class: "m-form-tip"
@@ -809,25 +809,17 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
809
809
  return (_ctx, _cache) => {
810
810
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
811
811
  createElementVNode("div", null, [
812
- createVNode(unref(TMagicIcon), {
813
- style: { "margin-right": "7px" },
814
- onClick: expandHandler
815
- }, {
816
- default: withCtx(() => [
817
- expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
818
- ]),
819
- _: 1
820
- }),
821
812
  createVNode(unref(TMagicButton), {
822
813
  text: "",
823
814
  disabled: __props.disabled,
815
+ icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
824
816
  onClick: expandHandler
825
817
  }, {
826
818
  default: withCtx(() => [
827
819
  createTextVNode(toDisplayString(unref(title)), 1)
828
820
  ]),
829
821
  _: 1
830
- }, 8, ["disabled"]),
822
+ }, 8, ["disabled", "icon"]),
831
823
  withDirectives(createVNode(unref(TMagicButton), {
832
824
  style: { "color": "#f56c6c" },
833
825
  text: "",
@@ -1048,7 +1040,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1048
1040
  }
1049
1041
  });
1050
1042
 
1051
- const _hoisted_1$7 = { class: "clearfix" };
1043
+ const _hoisted_1$7 = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
1052
1044
  const _hoisted_2$3 = ["innerHTML"];
1053
1045
  const _hoisted_3$3 = {
1054
1046
  key: 0,
@@ -1089,23 +1081,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1089
1081
  }, {
1090
1082
  header: withCtx(() => [
1091
1083
  createElementVNode("div", _hoisted_1$7, [
1092
- createElementVNode("a", {
1093
- href: "javascript:",
1094
- style: { "width": "100%", "display": "block" },
1084
+ createVNode(unref(TMagicButton), {
1085
+ style: { "padding": "0" },
1086
+ text: "",
1087
+ icon: expand.value ? unref(CaretBottom) : unref(CaretRight),
1095
1088
  onClick: _cache[0] || (_cache[0] = ($event) => expand.value = !expand.value)
1096
- }, [
1097
- createVNode(unref(TMagicIcon), null, {
1098
- default: withCtx(() => [
1099
- expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
1100
- ]),
1101
- _: 1
1102
- }),
1103
- createTextVNode(" " + toDisplayString(filter(__props.config.title)) + " ", 1),
1104
- __props.config && __props.config.extra ? (openBlock(), createElementBlock("span", {
1105
- key: 0,
1106
- innerHTML: __props.config.extra,
1107
- class: "m-form-tip"
1108
- }, null, 8, _hoisted_2$3)) : createCommentVNode("", true)
1089
+ }, null, 8, ["icon"]),
1090
+ __props.config && __props.config.extra ? (openBlock(), createElementBlock("span", {
1091
+ key: 0,
1092
+ innerHTML: __props.config.extra,
1093
+ class: "m-form-tip"
1094
+ }, null, 8, _hoisted_2$3)) : createCommentVNode("", true),
1095
+ renderSlot(_ctx.$slots, "header", {}, () => [
1096
+ createTextVNode(toDisplayString(filter(__props.config.title)), 1)
1109
1097
  ])
1110
1098
  ])
1111
1099
  ]),
@@ -1404,11 +1392,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1404
1392
  setTimeout(() => rowDrop());
1405
1393
  };
1406
1394
  const swapArray = (index1, index2) => {
1407
- [props.model[modelName.value][index1]] = props.model[modelName.value].splice(
1408
- index2,
1409
- 1,
1410
- props.model[modelName.value][index1]
1411
- );
1395
+ props.model[modelName.value].splice(index1, 0, props.model[modelName.value].splice(index2, 1)[0]);
1412
1396
  if (props.sortKey) {
1413
1397
  for (let i = props.model[modelName.value].length - 1, v = 0; i >= 0; i--, v++) {
1414
1398
  props.model[modelName.value][v][props.sortKey] = i;