@tmagic/form 1.7.0-beta.1 → 1.7.0-beta.3

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.
@@ -3157,8 +3157,8 @@
3157
3157
 
3158
3158
  const _hoisted_1$d = ["data-tmagic-id", "data-tmagic-form-item-prop"];
3159
3159
  const _hoisted_2$7 = ["innerHTML", "title"];
3160
- const _hoisted_3$6 = ["innerHTML"];
3161
- const _hoisted_4$3 = ["innerHTML"];
3160
+ const _hoisted_3$5 = ["innerHTML"];
3161
+ const _hoisted_4$4 = ["innerHTML"];
3162
3162
  const _hoisted_5$3 = ["innerHTML", "title"];
3163
3163
  const _hoisted_6$1 = ["innerHTML"];
3164
3164
  const _hoisted_7$1 = ["innerHTML"];
@@ -3202,10 +3202,7 @@
3202
3202
  const items = vue.computed(() => props.config.items);
3203
3203
  const itemProp = vue.computed(() => {
3204
3204
  let n = "";
3205
- const { names } = props.config;
3206
- if (names?.[0]) {
3207
- [n] = names;
3208
- } else if (name.value) {
3205
+ if (name.value) {
3209
3206
  n = name.value;
3210
3207
  } else {
3211
3208
  return props.prop;
@@ -3428,7 +3425,7 @@
3428
3425
  content: vue.withCtx(() => [
3429
3426
  vue.createElementVNode("div", {
3430
3427
  innerHTML: tooltip.value.text
3431
- }, null, 8, _hoisted_3$6)
3428
+ }, null, 8, _hoisted_3$5)
3432
3429
  ]),
3433
3430
  default: vue.withCtx(() => [
3434
3431
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagName.value), vue.mergeProps(fieldsProps.value, {
@@ -3457,7 +3454,7 @@
3457
3454
  content: vue.withCtx(() => [
3458
3455
  vue.createElementVNode("div", {
3459
3456
  innerHTML: __props.config.tip
3460
- }, null, 8, _hoisted_4$3)
3457
+ }, null, 8, _hoisted_4$4)
3461
3458
  ]),
3462
3459
  default: vue.withCtx(() => [
3463
3460
  vue.createVNode(vue.unref(design.TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
@@ -3654,8 +3651,8 @@
3654
3651
 
3655
3652
  const _hoisted_1$c = ["innerHTML"];
3656
3653
  const _hoisted_2$6 = ["innerHTML"];
3657
- const _hoisted_3$5 = { key: 1 };
3658
- const _hoisted_4$2 = ["innerHTML"];
3654
+ const _hoisted_3$4 = { key: 1 };
3655
+ const _hoisted_4$3 = ["innerHTML"];
3659
3656
  const _hoisted_5$2 = ["innerHTML"];
3660
3657
  const _hoisted_6 = {
3661
3658
  key: 2,
@@ -3755,10 +3752,10 @@
3755
3752
  ]),
3756
3753
  _: 1
3757
3754
  /* STABLE */
3758
- })) : (vue.openBlock(), vue.createElementBlock("legend", _hoisted_3$5, [
3755
+ })) : (vue.openBlock(), vue.createElementBlock("legend", _hoisted_3$4, [
3759
3756
  vue.createElementVNode("span", {
3760
3757
  innerHTML: __props.config.legend
3761
- }, null, 8, _hoisted_4$2),
3758
+ }, null, 8, _hoisted_4$3),
3762
3759
  __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
3763
3760
  key: 0,
3764
3761
  innerHTML: __props.config.extra,
@@ -3887,9 +3884,8 @@
3887
3884
  }
3888
3885
  });
3889
3886
 
3890
- const _hoisted_1$b = { class: "m-fields-group-list-item" };
3891
- const _hoisted_2$5 = { style: { "text-align": "right", "margin-top": "20px" } };
3892
- const _hoisted_3$4 = ["innerHTML"];
3887
+ const _hoisted_1$b = { style: { "text-align": "right", "margin-top": "20px" } };
3888
+ const _hoisted_2$5 = ["innerHTML"];
3893
3889
  const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
3894
3890
  ...{
3895
3891
  name: "MFormGroupListItem"
@@ -3968,211 +3964,220 @@
3968
3964
  emit("swap-item", props.index, moveSpecifyLocationIndex.value - 1);
3969
3965
  };
3970
3966
  return (_ctx, _cache) => {
3971
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
3972
- vue.createElementVNode("div", null, [
3973
- vue.createVNode(vue.unref(design.TMagicButton), {
3974
- link: "",
3975
- disabled: __props.disabled,
3976
- onClick: expandHandler
3977
- }, {
3978
- default: vue.withCtx(() => [
3979
- vue.createVNode(vue.unref(design.TMagicIcon), null, {
3980
- default: vue.withCtx(() => [
3981
- expand.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretBottom), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretRight), { key: 1 }))
3982
- ]),
3983
- _: 1
3984
- /* STABLE */
3985
- }),
3986
- vue.createTextVNode(
3987
- vue.toDisplayString(title.value),
3988
- 1
3989
- /* TEXT */
3990
- )
3991
- ]),
3992
- _: 1
3993
- /* STABLE */
3994
- }, 8, ["disabled"]),
3995
- vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
3996
- type: "danger",
3997
- size: "small",
3998
- link: "",
3999
- icon: vue.unref(iconsVue.Delete),
4000
- disabled: __props.disabled,
4001
- onClick: removeHandler
4002
- }, null, 8, ["icon", "disabled"]), [
4003
- [vue.vShow, showDelete.value]
4004
- ]),
4005
- copyable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4006
- key: 0,
4007
- link: "",
4008
- size: "small",
4009
- type: "primary",
4010
- icon: vue.unref(iconsVue.DocumentCopy),
4011
- disabled: __props.disabled,
4012
- onClick: copyHandler
4013
- }, {
4014
- default: vue.withCtx(() => [..._cache[6] || (_cache[6] = [
4015
- vue.createTextVNode(
4016
- "复制",
4017
- -1
4018
- /* CACHED */
4019
- )
4020
- ])]),
4021
- _: 1
4022
- /* STABLE */
4023
- }, 8, ["icon", "disabled"])) : vue.createCommentVNode("v-if", true),
4024
- movable.value ? (vue.openBlock(), vue.createElementBlock(
4025
- vue.Fragment,
4026
- { key: 1 },
4027
- [
4028
- vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
4029
- link: "",
4030
- size: "small",
4031
- disabled: __props.disabled,
4032
- icon: vue.unref(iconsVue.CaretTop),
4033
- onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
4034
- }, {
4035
- default: vue.withCtx(() => [..._cache[7] || (_cache[7] = [
4036
- vue.createTextVNode(
4037
- "上移",
4038
- -1
4039
- /* CACHED */
4040
- )
4041
- ])]),
4042
- _: 1
4043
- /* STABLE */
4044
- }, 8, ["disabled", "icon"]), [
4045
- [vue.vShow, __props.index !== 0]
3967
+ return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCard), {
3968
+ class: "m-fields-group-list-item",
3969
+ "body-style": { display: expand.value ? "block" : "none" }
3970
+ }, {
3971
+ header: vue.withCtx(() => [
3972
+ vue.createElementVNode("div", null, [
3973
+ vue.createVNode(vue.unref(design.TMagicButton), {
3974
+ link: "",
3975
+ disabled: __props.disabled,
3976
+ onClick: expandHandler
3977
+ }, {
3978
+ default: vue.withCtx(() => [
3979
+ vue.createVNode(vue.unref(design.TMagicIcon), null, {
3980
+ default: vue.withCtx(() => [
3981
+ expand.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretBottom), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.CaretRight), { key: 1 }))
3982
+ ]),
3983
+ _: 1
3984
+ /* STABLE */
3985
+ }),
3986
+ vue.createTextVNode(
3987
+ vue.toDisplayString(title.value),
3988
+ 1
3989
+ /* TEXT */
3990
+ )
4046
3991
  ]),
4047
- vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
4048
- link: "",
4049
- size: "small",
4050
- disabled: __props.disabled,
4051
- icon: vue.unref(iconsVue.CaretBottom),
4052
- onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
4053
- }, {
4054
- default: vue.withCtx(() => [..._cache[8] || (_cache[8] = [
4055
- vue.createTextVNode(
4056
- "下移",
4057
- -1
4058
- /* CACHED */
4059
- )
4060
- ])]),
4061
- _: 1
4062
- /* STABLE */
4063
- }, 8, ["disabled", "icon"]), [
4064
- [vue.vShow, __props.index !== length.value - 1]
4065
- ])
4066
- ],
4067
- 64
4068
- /* STABLE_FRAGMENT */
4069
- )) : vue.createCommentVNode("v-if", true),
4070
- __props.config.moveSpecifyLocation ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
4071
- key: 2,
4072
- trigger: "click",
4073
- placement: "top",
4074
- width: "200",
4075
- visible: moveSpecifyLocationVisible.value
4076
- }, {
4077
- reference: vue.withCtx(() => [
4078
- vue.createVNode(vue.unref(design.TMagicButton), {
4079
- link: "",
4080
- size: "small",
4081
- type: "primary",
4082
- icon: vue.unref(iconsVue.Position),
4083
- disabled: __props.disabled,
4084
- onClick: _cache[2] || (_cache[2] = ($event) => moveSpecifyLocationVisible.value = true)
4085
- }, {
4086
- default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
4087
- vue.createTextVNode(
4088
- "移动至",
4089
- -1
4090
- /* CACHED */
4091
- )
4092
- ])]),
4093
- _: 1
4094
- /* STABLE */
4095
- }, 8, ["icon", "disabled"])
3992
+ _: 1
3993
+ /* STABLE */
3994
+ }, 8, ["disabled"]),
3995
+ vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
3996
+ type: "danger",
3997
+ size: "small",
3998
+ link: "",
3999
+ icon: vue.unref(iconsVue.Delete),
4000
+ disabled: __props.disabled,
4001
+ onClick: removeHandler
4002
+ }, null, 8, ["icon", "disabled"]), [
4003
+ [vue.vShow, showDelete.value]
4096
4004
  ]),
4097
- default: vue.withCtx(() => [
4098
- vue.createElementVNode("div", null, [
4099
- vue.createElementVNode("div", null, [
4100
- _cache[10] || (_cache[10] = vue.createTextVNode(
4101
- " ",
4102
- -1
4103
- /* CACHED */
4104
- )),
4105
- vue.createVNode(vue.unref(design.TMagicInputNumber), {
4106
- style: { "margin": "0 5px" },
4107
- modelValue: moveSpecifyLocationIndex.value,
4108
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => moveSpecifyLocationIndex.value = $event),
4109
- size: "small",
4110
- min: 1,
4111
- disabled: __props.disabled
4112
- }, null, 8, ["modelValue", "disabled"]),
4113
- _cache[11] || (_cache[11] = vue.createTextVNode(
4114
- "行 ",
4115
- -1
4116
- /* CACHED */
4117
- ))
4005
+ copyable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4006
+ key: 0,
4007
+ link: "",
4008
+ size: "small",
4009
+ type: "primary",
4010
+ icon: vue.unref(iconsVue.DocumentCopy),
4011
+ disabled: __props.disabled,
4012
+ onClick: copyHandler
4013
+ }, {
4014
+ default: vue.withCtx(() => [..._cache[6] || (_cache[6] = [
4015
+ vue.createTextVNode(
4016
+ "复制",
4017
+ -1
4018
+ /* CACHED */
4019
+ )
4020
+ ])]),
4021
+ _: 1
4022
+ /* STABLE */
4023
+ }, 8, ["icon", "disabled"])) : vue.createCommentVNode("v-if", true),
4024
+ movable.value ? (vue.openBlock(), vue.createElementBlock(
4025
+ vue.Fragment,
4026
+ { key: 1 },
4027
+ [
4028
+ vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
4029
+ link: "",
4030
+ size: "small",
4031
+ disabled: __props.disabled,
4032
+ icon: vue.unref(iconsVue.CaretTop),
4033
+ onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
4034
+ }, {
4035
+ default: vue.withCtx(() => [..._cache[7] || (_cache[7] = [
4036
+ vue.createTextVNode(
4037
+ "上移",
4038
+ -1
4039
+ /* CACHED */
4040
+ )
4041
+ ])]),
4042
+ _: 1
4043
+ /* STABLE */
4044
+ }, 8, ["disabled", "icon"]), [
4045
+ [vue.vShow, __props.index !== 0]
4118
4046
  ]),
4119
- vue.createElementVNode("div", _hoisted_2$5, [
4120
- vue.createVNode(vue.unref(design.TMagicButton), {
4121
- size: "small",
4122
- text: "",
4123
- onClick: _cache[4] || (_cache[4] = ($event) => moveSpecifyLocationVisible.value = false)
4124
- }, {
4125
- default: vue.withCtx(() => [..._cache[12] || (_cache[12] = [
4126
- vue.createTextVNode(
4127
- "取消",
4128
- -1
4129
- /* CACHED */
4130
- )
4131
- ])]),
4132
- _: 1
4133
- /* STABLE */
4134
- }),
4135
- vue.createVNode(vue.unref(design.TMagicButton), {
4136
- size: "small",
4137
- type: "primary",
4138
- onClick: moveSpecifyLocationHandler
4139
- }, {
4140
- default: vue.withCtx(() => [..._cache[13] || (_cache[13] = [
4141
- vue.createTextVNode(
4142
- "确认",
4143
- -1
4144
- /* CACHED */
4145
- )
4146
- ])]),
4147
- _: 1
4148
- /* STABLE */
4149
- })
4047
+ vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
4048
+ link: "",
4049
+ size: "small",
4050
+ disabled: __props.disabled,
4051
+ icon: vue.unref(iconsVue.CaretBottom),
4052
+ onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
4053
+ }, {
4054
+ default: vue.withCtx(() => [..._cache[8] || (_cache[8] = [
4055
+ vue.createTextVNode(
4056
+ "下移",
4057
+ -1
4058
+ /* CACHED */
4059
+ )
4060
+ ])]),
4061
+ _: 1
4062
+ /* STABLE */
4063
+ }, 8, ["disabled", "icon"]), [
4064
+ [vue.vShow, __props.index !== length.value - 1]
4150
4065
  ])
4151
- ])
4152
- ]),
4153
- _: 1
4154
- /* STABLE */
4155
- }, 8, ["visible"])) : vue.createCommentVNode("v-if", true),
4156
- itemExtra.value ? (vue.openBlock(), vue.createElementBlock("span", {
4157
- key: 3,
4158
- innerHTML: itemExtra.value,
4159
- class: "m-form-tip"
4160
- }, null, 8, _hoisted_3$4)) : vue.createCommentVNode("v-if", true)
4066
+ ],
4067
+ 64
4068
+ /* STABLE_FRAGMENT */
4069
+ )) : vue.createCommentVNode("v-if", true),
4070
+ __props.config.moveSpecifyLocation ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
4071
+ key: 2,
4072
+ trigger: "click",
4073
+ placement: "top",
4074
+ width: "200",
4075
+ visible: moveSpecifyLocationVisible.value
4076
+ }, {
4077
+ reference: vue.withCtx(() => [
4078
+ vue.createVNode(vue.unref(design.TMagicButton), {
4079
+ link: "",
4080
+ size: "small",
4081
+ type: "primary",
4082
+ icon: vue.unref(iconsVue.Position),
4083
+ disabled: __props.disabled,
4084
+ onClick: _cache[2] || (_cache[2] = ($event) => moveSpecifyLocationVisible.value = true)
4085
+ }, {
4086
+ default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
4087
+ vue.createTextVNode(
4088
+ "移动至",
4089
+ -1
4090
+ /* CACHED */
4091
+ )
4092
+ ])]),
4093
+ _: 1
4094
+ /* STABLE */
4095
+ }, 8, ["icon", "disabled"])
4096
+ ]),
4097
+ default: vue.withCtx(() => [
4098
+ vue.createElementVNode("div", null, [
4099
+ vue.createElementVNode("div", null, [
4100
+ _cache[10] || (_cache[10] = vue.createTextVNode(
4101
+ " 第",
4102
+ -1
4103
+ /* CACHED */
4104
+ )),
4105
+ vue.createVNode(vue.unref(design.TMagicInputNumber), {
4106
+ style: { "margin": "0 5px" },
4107
+ modelValue: moveSpecifyLocationIndex.value,
4108
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => moveSpecifyLocationIndex.value = $event),
4109
+ size: "small",
4110
+ min: 1,
4111
+ disabled: __props.disabled
4112
+ }, null, 8, ["modelValue", "disabled"]),
4113
+ _cache[11] || (_cache[11] = vue.createTextVNode(
4114
+ "行 ",
4115
+ -1
4116
+ /* CACHED */
4117
+ ))
4118
+ ]),
4119
+ vue.createElementVNode("div", _hoisted_1$b, [
4120
+ vue.createVNode(vue.unref(design.TMagicButton), {
4121
+ size: "small",
4122
+ text: "",
4123
+ onClick: _cache[4] || (_cache[4] = ($event) => moveSpecifyLocationVisible.value = false)
4124
+ }, {
4125
+ default: vue.withCtx(() => [..._cache[12] || (_cache[12] = [
4126
+ vue.createTextVNode(
4127
+ "取消",
4128
+ -1
4129
+ /* CACHED */
4130
+ )
4131
+ ])]),
4132
+ _: 1
4133
+ /* STABLE */
4134
+ }),
4135
+ vue.createVNode(vue.unref(design.TMagicButton), {
4136
+ size: "small",
4137
+ type: "primary",
4138
+ onClick: moveSpecifyLocationHandler
4139
+ }, {
4140
+ default: vue.withCtx(() => [..._cache[13] || (_cache[13] = [
4141
+ vue.createTextVNode(
4142
+ "确认",
4143
+ -1
4144
+ /* CACHED */
4145
+ )
4146
+ ])]),
4147
+ _: 1
4148
+ /* STABLE */
4149
+ })
4150
+ ])
4151
+ ])
4152
+ ]),
4153
+ _: 1
4154
+ /* STABLE */
4155
+ }, 8, ["visible"])) : vue.createCommentVNode("v-if", true),
4156
+ itemExtra.value ? (vue.openBlock(), vue.createElementBlock("span", {
4157
+ key: 3,
4158
+ innerHTML: itemExtra.value,
4159
+ class: "m-form-tip"
4160
+ }, null, 8, _hoisted_2$5)) : vue.createCommentVNode("v-if", true)
4161
+ ])
4161
4162
  ]),
4162
- expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4163
- key: 0,
4164
- config: rowConfig.value,
4165
- model: __props.model,
4166
- lastValues: __props.lastValues,
4167
- "is-compare": __props.isCompare,
4168
- labelWidth: __props.labelWidth,
4169
- prop: `${__props.prop}${__props.prop ? "." : ""}${String(__props.index)}`,
4170
- size: __props.size,
4171
- disabled: __props.disabled,
4172
- onChange: changeHandler,
4173
- onAddDiffCount: _cache[5] || (_cache[5] = ($event) => onAddDiffCount())
4174
- }, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : vue.createCommentVNode("v-if", true)
4175
- ]);
4163
+ default: vue.withCtx(() => [
4164
+ expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4165
+ key: 0,
4166
+ config: rowConfig.value,
4167
+ model: __props.model,
4168
+ lastValues: __props.lastValues,
4169
+ "is-compare": __props.isCompare,
4170
+ labelWidth: __props.labelWidth,
4171
+ prop: `${__props.prop}${__props.prop ? "." : ""}${String(__props.index)}`,
4172
+ size: __props.size,
4173
+ disabled: __props.disabled,
4174
+ onChange: changeHandler,
4175
+ onAddDiffCount: _cache[5] || (_cache[5] = ($event) => onAddDiffCount())
4176
+ }, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : vue.createCommentVNode("v-if", true)
4177
+ ]),
4178
+ _: 1
4179
+ /* STABLE */
4180
+ }, 8, ["body-style"]);
4176
4181
  };
4177
4182
  }
4178
4183
  });
@@ -4183,6 +4188,8 @@
4183
4188
  key: 1,
4184
4189
  class: "el-table__empty-block"
4185
4190
  };
4191
+ const _hoisted_4$2 = { class: "m-fields-group-list-footer" };
4192
+ const _hoisted_5$1 = { style: { "display": "flex", "justify-content": "flex-end", "flex": "1" } };
4186
4193
  const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
4187
4194
  ...{
4188
4195
  name: "MFormGroupList"
@@ -4282,7 +4289,7 @@
4282
4289
  !__props.model[__props.name] || !__props.model[__props.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [..._cache[1] || (_cache[1] = [
4283
4290
  vue.createElementVNode(
4284
4291
  "span",
4285
- { class: "el-table__empty-text" },
4292
+ { class: "el-table__empty-text t-table__empty" },
4286
4293
  "暂无数据",
4287
4294
  -1
4288
4295
  /* CACHED */
@@ -4313,39 +4320,43 @@
4313
4320
  128
4314
4321
  /* KEYED_FRAGMENT */
4315
4322
  )),
4316
- addable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4317
- key: 3,
4318
- type: "primary",
4319
- size: __props.config.enableToggleMode ? "small" : "default",
4320
- disabled: __props.disabled,
4321
- onClick: addHandler
4322
- }, {
4323
- default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
4324
- vue.createTextVNode(
4325
- "新增",
4326
- -1
4327
- /* CACHED */
4328
- )
4329
- ])]),
4330
- _: 1
4331
- /* STABLE */
4332
- }, 8, ["size", "disabled"])) : vue.createCommentVNode("v-if", true),
4333
- __props.config.enableToggleMode ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4334
- key: 4,
4335
- icon: vue.unref(iconsVue.Grid),
4336
- size: "small",
4337
- onClick: toggleMode
4338
- }, {
4339
- default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
4340
- vue.createTextVNode(
4341
- "切换为表格",
4342
- -1
4343
- /* CACHED */
4344
- )
4345
- ])]),
4346
- _: 1
4347
- /* STABLE */
4348
- }, 8, ["icon"])) : vue.createCommentVNode("v-if", true)
4323
+ vue.createElementVNode("div", _hoisted_4$2, [
4324
+ __props.config.enableToggleMode ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4325
+ key: 0,
4326
+ icon: vue.unref(iconsVue.Grid),
4327
+ size: "small",
4328
+ onClick: toggleMode
4329
+ }, {
4330
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
4331
+ vue.createTextVNode(
4332
+ "切换为表格",
4333
+ -1
4334
+ /* CACHED */
4335
+ )
4336
+ ])]),
4337
+ _: 1
4338
+ /* STABLE */
4339
+ }, 8, ["icon"])) : vue.createCommentVNode("v-if", true),
4340
+ vue.createElementVNode("div", _hoisted_5$1, [
4341
+ addable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4342
+ key: 0,
4343
+ type: "primary",
4344
+ size: __props.config.enableToggleMode ? "small" : "default",
4345
+ disabled: __props.disabled,
4346
+ onClick: addHandler
4347
+ }, {
4348
+ default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
4349
+ vue.createTextVNode(
4350
+ "新增",
4351
+ -1
4352
+ /* CACHED */
4353
+ )
4354
+ ])]),
4355
+ _: 1
4356
+ /* STABLE */
4357
+ }, 8, ["size", "disabled"])) : vue.createCommentVNode("v-if", true)
4358
+ ])
4359
+ ])
4349
4360
  ]);
4350
4361
  };
4351
4362
  }
@@ -4358,7 +4369,7 @@
4358
4369
  style: { "display": "flex" }
4359
4370
  };
4360
4371
  const _hoisted_4$1 = { style: { "flex": "1" } };
4361
- const _hoisted_5$1 = ["src"];
4372
+ const _hoisted_5 = ["src"];
4362
4373
  const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
4363
4374
  ...{
4364
4375
  name: "MFormPanel"
@@ -4445,7 +4456,7 @@
4445
4456
  vue.createElementVNode("img", {
4446
4457
  class: "m-form-schematic",
4447
4458
  src: __props.config.schematic
4448
- }, null, 8, _hoisted_5$1)
4459
+ }, null, 8, _hoisted_5)
4449
4460
  ])) : (vue.openBlock(true), vue.createElementBlock(
4450
4461
  vue.Fragment,
4451
4462
  { key: 1 },
@@ -5312,7 +5323,7 @@
5312
5323
  const value = vue.ref([]);
5313
5324
  if (props.model !== void 0) {
5314
5325
  if (names?.length) {
5315
- vue.watch(
5326
+ const unWatch = vue.watch(
5316
5327
  [() => props.model[names[0]], () => props.model[names[1]]],
5317
5328
  ([start, end], [preStart, preEnd]) => {
5318
5329
  if (!value.value) {
@@ -5327,8 +5338,11 @@
5327
5338
  immediate: true
5328
5339
  }
5329
5340
  );
5341
+ vue.onUnmounted(() => {
5342
+ unWatch();
5343
+ });
5330
5344
  } else if (props.name && props.model[props.name]) {
5331
- vue.watch(
5345
+ const unWatch = vue.watch(
5332
5346
  () => props.model[props.name],
5333
5347
  (start, preStart) => {
5334
5348
  const format = `${props.config.dateFormat || "YYYY/MM/DD"} ${props.config.timeFormat || "HH:mm:ss"}`;
@@ -5341,29 +5355,38 @@
5341
5355
  immediate: true
5342
5356
  }
5343
5357
  );
5358
+ vue.onUnmounted(() => {
5359
+ unWatch();
5360
+ });
5344
5361
  }
5345
5362
  }
5346
- const setValue = (v) => {
5347
- names?.forEach((item, index) => {
5348
- if (!props.model) {
5349
- return;
5350
- }
5351
- if (Array.isArray(v)) {
5352
- props.model[item] = v[index];
5353
- } else {
5354
- props.model[item] = void 0;
5355
- }
5356
- });
5357
- };
5358
5363
  const changeHandler = (v) => {
5359
5364
  const value2 = v || [];
5360
5365
  if (props.name) {
5361
5366
  emit("change", value2);
5362
5367
  } else {
5363
- if (names?.length) {
5364
- setValue(value2);
5368
+ if (props.config.names?.length) {
5369
+ const newChangeRecords = [];
5370
+ props.config.names.forEach((item, index) => {
5371
+ if (!props.model) {
5372
+ return;
5373
+ }
5374
+ if (Array.isArray(v)) {
5375
+ newChangeRecords.push({
5376
+ propPath: props.prop ? `${props.prop}.${item}` : item,
5377
+ value: v[index]
5378
+ });
5379
+ } else {
5380
+ newChangeRecords.push({
5381
+ propPath: props.prop ? `${props.prop}.${item}` : item,
5382
+ value: void 0
5383
+ });
5384
+ }
5385
+ });
5386
+ emit("change", props.model, {
5387
+ changeRecords: newChangeRecords
5388
+ });
5365
5389
  }
5366
- emit("change", props.model);
5367
5390
  }
5368
5391
  };
5369
5392
  return (_ctx, _cache) => {
@@ -5377,11 +5400,12 @@
5377
5400
  "unlink-panels": true,
5378
5401
  disabled: __props.disabled,
5379
5402
  "default-time": __props.config.defaultTime,
5403
+ format: `${__props.config.dateFormat || "YYYY/MM/DD"} ${__props.config.timeFormat || "HH:mm:ss"}`,
5380
5404
  "value-format": __props.config.valueFormat || "YYYY/MM/DD HH:mm:ss",
5381
5405
  "date-format": __props.config.dateFormat || "YYYY/MM/DD",
5382
5406
  "time-format": __props.config.timeFormat || "HH:mm:ss",
5383
5407
  "onUpdate:modelValue": changeHandler
5384
- }, null, 8, ["model-value", "size", "disabled", "default-time", "value-format", "date-format", "time-format"]);
5408
+ }, null, 8, ["model-value", "size", "disabled", "default-time", "format", "value-format", "date-format", "time-format"]);
5385
5409
  };
5386
5410
  }
5387
5411
  });
@@ -5890,8 +5914,9 @@
5890
5914
  };
5891
5915
  const save = async () => {
5892
5916
  try {
5917
+ const changeRecords = form.value?.changeRecords;
5893
5918
  const values = await form.value?.submitForm();
5894
- emit("submit", values, { changeRecords: form.value?.changeRecords });
5919
+ emit("submit", values, { changeRecords });
5895
5920
  } catch (e) {
5896
5921
  emit("error", e);
5897
5922
  }
@@ -6108,7 +6133,8 @@
6108
6133
  if (typeof props.config.form === "function") {
6109
6134
  return props.config.form(mForm, {
6110
6135
  model: props.model || {},
6111
- values: props.values || {}
6136
+ values: mForm ? vue.readonly(mForm.initValues) : null,
6137
+ formValue: props.values || {}
6112
6138
  });
6113
6139
  }
6114
6140
  return props.config.form;
@@ -6965,10 +6991,25 @@
6965
6991
  const buttonClickHandler = () => {
6966
6992
  if (!appendConfig.value) return;
6967
6993
  if (typeof appendConfig.value.handler === "function") {
6994
+ const newChangeRecords = [];
6995
+ const setModel = (key, value) => {
6996
+ newChangeRecords.push({ propPath: props.prop.replace(`${props.name}`, key), value });
6997
+ };
6998
+ const setFormValue = (key, value) => {
6999
+ newChangeRecords.push({ propPath: key, value });
7000
+ };
6968
7001
  appendConfig.value.handler(mForm, {
6969
7002
  model: props.model,
6970
- values: mForm?.values
7003
+ values: mForm ? vue.readonly(mForm.initValues) : null,
7004
+ formValue: props.values || {},
7005
+ setModel,
7006
+ setFormValue
6971
7007
  });
7008
+ if (newChangeRecords.length > 0) {
7009
+ emit("change", props.model[props.name], {
7010
+ changeRecords: newChangeRecords
7011
+ });
7012
+ }
6972
7013
  }
6973
7014
  };
6974
7015
  const keyUpHandler = ($event) => {
@@ -7390,6 +7431,7 @@
7390
7431
  if (typeof props.config.defaultAdd === "function") {
7391
7432
  inputs = await props.config.defaultAdd(mForm, {
7392
7433
  model: props.model[modelName],
7434
+ prop: props.prop,
7393
7435
  formValue: mForm?.values
7394
7436
  });
7395
7437
  } else if (props.config.defaultAdd) {
@@ -7420,16 +7462,10 @@
7420
7462
 
7421
7463
  const useFullscreen = () => {
7422
7464
  const isFullscreen = vue.ref(false);
7423
- const mTableEl = vue.useTemplateRef("mTable");
7424
- const { nextZIndex } = design.useZIndex();
7425
7465
  const toggleFullscreen = () => {
7426
- if (!mTableEl.value) return;
7427
7466
  if (isFullscreen.value) {
7428
- mTableEl.value.classList.remove("fixed");
7429
7467
  isFullscreen.value = false;
7430
7468
  } else {
7431
- mTableEl.value.classList.add("fixed");
7432
- mTableEl.value.style.zIndex = `${nextZIndex()}`;
7433
7469
  isFullscreen.value = true;
7434
7470
  }
7435
7471
  };
@@ -7915,11 +7951,10 @@
7915
7951
  };
7916
7952
  };
7917
7953
 
7918
- const _hoisted_1$1 = { class: "m-fields-table-wrap" };
7919
- const _hoisted_2 = ["innerHTML"];
7920
- const _hoisted_3 = { style: { "display": "flex", "justify-content": "space-between", "margin": "10px 0" } };
7921
- const _hoisted_4 = { style: { "display": "flex" } };
7922
- const _hoisted_5 = {
7954
+ const _hoisted_1$1 = ["innerHTML"];
7955
+ const _hoisted_2 = { style: { "display": "flex", "justify-content": "space-between", "margin": "10px 0" } };
7956
+ const _hoisted_3 = { style: { "display": "flex" } };
7957
+ const _hoisted_4 = {
7923
7958
  key: 1,
7924
7959
  class: "bottom",
7925
7960
  style: { "text-align": "right" }
@@ -7955,6 +7990,7 @@
7955
7990
  props,
7956
7991
  modelName
7957
7992
  );
7993
+ const { nextZIndex } = design.useZIndex();
7958
7994
  const { addable, newHandler } = useAdd(props, emit);
7959
7995
  const { columns } = useTableColumns(props, emit, currentPage, pageSize, modelName);
7960
7996
  useSortable(props, emit, tMagicTableRef, modelName);
@@ -7992,170 +8028,176 @@
7992
8028
  toggleRowSelection
7993
8029
  });
7994
8030
  return (_ctx, _cache) => {
7995
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
7996
- (vue.openBlock(), vue.createBlock(vue.Teleport, {
7997
- to: "body",
7998
- disabled: !vue.unref(isFullscreen)
7999
- }, [
8000
- vue.createElementVNode(
8001
- "div",
8002
- {
8003
- ref: "mTable",
8004
- class: vue.normalizeClass(["m-fields-table", { "m-fields-table-item-extra": __props.config.itemExtra }])
8005
- },
8006
- [
8007
- __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
8008
- key: 0,
8009
- style: { "color": "rgba(0, 0, 0, 0.45)" },
8010
- innerHTML: __props.config.extra
8011
- }, null, 8, _hoisted_2)) : vue.createCommentVNode("v-if", true),
8012
- vue.createVNode(vue.unref(design.TMagicTooltip), {
8013
- content: "拖拽可排序",
8014
- placement: "left-start",
8015
- disabled: __props.config.dropSort !== true
8016
- }, {
8017
- default: vue.withCtx(() => [
8018
- __props.model[modelName.value] ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTable), {
8019
- ref: "tMagicTable",
8020
- style: { "width": "100%" },
8021
- "show-header": "",
8022
- "row-key": __props.config.rowKey || "id",
8023
- columns: vue.unref(columns),
8024
- data: data.value,
8025
- border: __props.config.border,
8026
- "max-height": __props.config.maxHeight,
8027
- "default-expand-all": true,
8028
- key: updateKey.value,
8029
- onSelect: vue.unref(selectHandle),
8030
- onSortChange: sortChangeHandler
8031
- }, null, 8, ["row-key", "columns", "data", "border", "max-height", "onSelect"])) : vue.createCommentVNode("v-if", true)
8032
- ]),
8033
- _: 1
8034
- /* STABLE */
8035
- }, 8, ["disabled"]),
8036
- vue.renderSlot(_ctx.$slots, "default"),
8037
- vue.createElementVNode("div", _hoisted_3, [
8038
- vue.unref(addable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8031
+ return vue.openBlock(), vue.createBlock(vue.Teleport, {
8032
+ to: "body",
8033
+ disabled: !vue.unref(isFullscreen)
8034
+ }, [
8035
+ vue.createElementVNode(
8036
+ "div",
8037
+ vue.mergeProps(_ctx.$attrs, {
8038
+ class: ["m-fields-table-wrap", { fixed: vue.unref(isFullscreen) }],
8039
+ style: vue.unref(isFullscreen) ? `z-index: ${vue.unref(nextZIndex)()}` : ""
8040
+ }),
8041
+ [
8042
+ vue.createElementVNode(
8043
+ "div",
8044
+ {
8045
+ class: vue.normalizeClass(["m-fields-table", { "m-fields-table-item-extra": __props.config.itemExtra }])
8046
+ },
8047
+ [
8048
+ __props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
8039
8049
  key: 0,
8040
- size: "small",
8041
- type: "primary",
8042
- disabled: __props.disabled,
8043
- plain: "",
8044
- onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(newHandler)())
8050
+ style: { "color": "rgba(0, 0, 0, 0.45)" },
8051
+ innerHTML: __props.config.extra
8052
+ }, null, 8, _hoisted_1$1)) : vue.createCommentVNode("v-if", true),
8053
+ vue.createVNode(vue.unref(design.TMagicTooltip), {
8054
+ content: "拖拽可排序",
8055
+ placement: "left-start",
8056
+ disabled: __props.config.dropSort !== true
8045
8057
  }, {
8046
- default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
8047
- vue.createTextVNode(
8048
- "新增一行",
8049
- -1
8050
- /* CACHED */
8051
- )
8052
- ])]),
8058
+ default: vue.withCtx(() => [
8059
+ __props.model[modelName.value] ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTable), {
8060
+ ref: "tMagicTable",
8061
+ style: { "width": "100%" },
8062
+ "show-header": "",
8063
+ "row-key": __props.config.rowKey || "id",
8064
+ columns: vue.unref(columns),
8065
+ data: data.value,
8066
+ border: __props.config.border,
8067
+ "max-height": __props.config.maxHeight,
8068
+ "default-expand-all": true,
8069
+ key: updateKey.value,
8070
+ onSelect: vue.unref(selectHandle),
8071
+ onSortChange: sortChangeHandler
8072
+ }, null, 8, ["row-key", "columns", "data", "border", "max-height", "onSelect"])) : vue.createCommentVNode("v-if", true)
8073
+ ]),
8053
8074
  _: 1
8054
8075
  /* STABLE */
8055
- }, 8, ["disabled"])) : vue.createCommentVNode("v-if", true),
8056
- vue.createElementVNode("div", _hoisted_4, [
8057
- __props.enableToggleMode && __props.config.enableToggleMode !== false && !vue.unref(isFullscreen) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8076
+ }, 8, ["disabled"]),
8077
+ vue.renderSlot(_ctx.$slots, "default"),
8078
+ vue.createElementVNode("div", _hoisted_2, [
8079
+ vue.createElementVNode("div", _hoisted_3, [
8080
+ __props.enableToggleMode && __props.config.enableToggleMode !== false && !vue.unref(isFullscreen) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8081
+ key: 0,
8082
+ icon: vue.unref(iconsVue.Grid),
8083
+ size: "small",
8084
+ onClick: toggleMode
8085
+ }, {
8086
+ default: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
8087
+ vue.createTextVNode(
8088
+ "展开配置",
8089
+ -1
8090
+ /* CACHED */
8091
+ )
8092
+ ])]),
8093
+ _: 1
8094
+ /* STABLE */
8095
+ }, 8, ["icon"])) : vue.createCommentVNode("v-if", true),
8096
+ __props.config.enableFullscreen !== false ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8097
+ key: 1,
8098
+ icon: vue.unref(iconsVue.FullScreen),
8099
+ size: "small",
8100
+ onClick: vue.unref(toggleFullscreen)
8101
+ }, {
8102
+ default: vue.withCtx(() => [
8103
+ vue.createTextVNode(
8104
+ vue.toDisplayString(vue.unref(isFullscreen) ? "退出全屏" : "全屏编辑"),
8105
+ 1
8106
+ /* TEXT */
8107
+ )
8108
+ ]),
8109
+ _: 1
8110
+ /* STABLE */
8111
+ }, 8, ["icon", "onClick"])) : vue.createCommentVNode("v-if", true),
8112
+ vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicUpload), {
8113
+ key: 2,
8114
+ style: { "display": "inline-block" },
8115
+ ref: "excelBtn",
8116
+ action: "/noop",
8117
+ disabled: __props.disabled,
8118
+ "on-change": vue.unref(excelHandler),
8119
+ "auto-upload": false
8120
+ }, {
8121
+ default: vue.withCtx(() => [
8122
+ vue.createVNode(vue.unref(design.TMagicButton), {
8123
+ size: "small",
8124
+ type: "success",
8125
+ disabled: __props.disabled,
8126
+ plain: ""
8127
+ }, {
8128
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
8129
+ vue.createTextVNode(
8130
+ "导入EXCEL",
8131
+ -1
8132
+ /* CACHED */
8133
+ )
8134
+ ])]),
8135
+ _: 1
8136
+ /* STABLE */
8137
+ }, 8, ["disabled"])
8138
+ ]),
8139
+ _: 1
8140
+ /* STABLE */
8141
+ }, 8, ["disabled", "on-change"])) : vue.createCommentVNode("v-if", true),
8142
+ vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8143
+ key: 3,
8144
+ size: "small",
8145
+ type: "warning",
8146
+ disabled: __props.disabled,
8147
+ plain: "",
8148
+ onClick: vue.unref(clearHandler)
8149
+ }, {
8150
+ default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
8151
+ vue.createTextVNode(
8152
+ "清空",
8153
+ -1
8154
+ /* CACHED */
8155
+ )
8156
+ ])]),
8157
+ _: 1
8158
+ /* STABLE */
8159
+ }, 8, ["disabled", "onClick"])) : vue.createCommentVNode("v-if", true)
8160
+ ]),
8161
+ vue.unref(addable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8058
8162
  key: 0,
8059
- icon: vue.unref(iconsVue.Grid),
8060
- size: "small",
8061
- type: "primary",
8062
- onClick: toggleMode
8063
- }, {
8064
- default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
8065
- vue.createTextVNode(
8066
- "展开配置",
8067
- -1
8068
- /* CACHED */
8069
- )
8070
- ])]),
8071
- _: 1
8072
- /* STABLE */
8073
- }, 8, ["icon"])) : vue.createCommentVNode("v-if", true),
8074
- __props.config.enableFullscreen !== false ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8075
- key: 1,
8076
- icon: vue.unref(iconsVue.FullScreen),
8077
8163
  size: "small",
8078
8164
  type: "primary",
8079
- onClick: vue.unref(toggleFullscreen)
8080
- }, {
8081
- default: vue.withCtx(() => [
8082
- vue.createTextVNode(
8083
- vue.toDisplayString(vue.unref(isFullscreen) ? "退出全屏" : "全屏编辑"),
8084
- 1
8085
- /* TEXT */
8086
- )
8087
- ]),
8088
- _: 1
8089
- /* STABLE */
8090
- }, 8, ["icon", "onClick"])) : vue.createCommentVNode("v-if", true),
8091
- vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicUpload), {
8092
- key: 2,
8093
- style: { "display": "inline-block" },
8094
- ref: "excelBtn",
8095
- action: "/noop",
8096
- disabled: __props.disabled,
8097
- "on-change": vue.unref(excelHandler),
8098
- "auto-upload": false
8099
- }, {
8100
- default: vue.withCtx(() => [
8101
- vue.createVNode(vue.unref(design.TMagicButton), {
8102
- size: "small",
8103
- type: "success",
8104
- disabled: __props.disabled,
8105
- plain: ""
8106
- }, {
8107
- default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
8108
- vue.createTextVNode(
8109
- "导入EXCEL",
8110
- -1
8111
- /* CACHED */
8112
- )
8113
- ])]),
8114
- _: 1
8115
- /* STABLE */
8116
- }, 8, ["disabled"])
8117
- ]),
8118
- _: 1
8119
- /* STABLE */
8120
- }, 8, ["disabled", "on-change"])) : vue.createCommentVNode("v-if", true),
8121
- vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
8122
- key: 3,
8123
- size: "small",
8124
- type: "warning",
8125
8165
  disabled: __props.disabled,
8126
8166
  plain: "",
8127
- onClick: vue.unref(clearHandler)
8167
+ onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(newHandler)())
8128
8168
  }, {
8129
8169
  default: vue.withCtx(() => [..._cache[4] || (_cache[4] = [
8130
8170
  vue.createTextVNode(
8131
- "清空",
8171
+ "新增一行",
8132
8172
  -1
8133
8173
  /* CACHED */
8134
8174
  )
8135
8175
  ])]),
8136
8176
  _: 1
8137
8177
  /* STABLE */
8138
- }, 8, ["disabled", "onClick"])) : vue.createCommentVNode("v-if", true)
8139
- ])
8140
- ]),
8141
- __props.config.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
8142
- vue.createVNode(vue.unref(design.TMagicPagination), {
8143
- layout: "total, sizes, prev, pager, next, jumper",
8144
- "hide-on-single-page": __props.model[modelName.value].length < vue.unref(pageSize),
8145
- "current-page": vue.unref(currentPage) + 1,
8146
- "page-sizes": [vue.unref(pageSize), 60, 120, 300],
8147
- "page-size": vue.unref(pageSize),
8148
- total: __props.model[modelName.value].length,
8149
- onSizeChange: vue.unref(handleSizeChange),
8150
- onCurrentChange: vue.unref(handleCurrentChange)
8151
- }, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total", "onSizeChange", "onCurrentChange"])
8152
- ])) : vue.createCommentVNode("v-if", true)
8153
- ],
8154
- 2
8155
- /* CLASS */
8156
- )
8157
- ], 8, ["disabled"]))
8158
- ]);
8178
+ }, 8, ["disabled"])) : vue.createCommentVNode("v-if", true)
8179
+ ]),
8180
+ __props.config.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
8181
+ vue.createVNode(vue.unref(design.TMagicPagination), {
8182
+ layout: "total, sizes, prev, pager, next, jumper",
8183
+ "hide-on-single-page": __props.model[modelName.value].length < vue.unref(pageSize),
8184
+ "current-page": vue.unref(currentPage) + 1,
8185
+ "page-sizes": [vue.unref(pageSize), 60, 120, 300],
8186
+ "page-size": vue.unref(pageSize),
8187
+ total: __props.model[modelName.value].length,
8188
+ onSizeChange: vue.unref(handleSizeChange),
8189
+ onCurrentChange: vue.unref(handleCurrentChange)
8190
+ }, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total", "onSizeChange", "onCurrentChange"])
8191
+ ])) : vue.createCommentVNode("v-if", true)
8192
+ ],
8193
+ 2
8194
+ /* CLASS */
8195
+ )
8196
+ ],
8197
+ 16
8198
+ /* FULL_PROPS */
8199
+ )
8200
+ ], 8, ["disabled"]);
8159
8201
  };
8160
8202
  }
8161
8203
  });
@@ -8199,8 +8241,9 @@
8199
8241
  });
8200
8242
  const submitHandler = async () => {
8201
8243
  try {
8244
+ const changeRecords = form.value?.changeRecords;
8202
8245
  const values = await form.value?.submitForm();
8203
- emit("submit", values, { changeRecords: form.value?.changeRecords });
8246
+ emit("submit", values, { changeRecords });
8204
8247
  } catch (e) {
8205
8248
  emit("error", e);
8206
8249
  }
@@ -8394,8 +8437,9 @@
8394
8437
  });
8395
8438
  const submitHandler = async () => {
8396
8439
  try {
8440
+ const changeRecords = form.value?.changeRecords;
8397
8441
  const values = await form.value?.submitForm();
8398
- emit("submit", values, { changeRecords: form.value?.changeRecords });
8442
+ emit("submit", values, { changeRecords });
8399
8443
  } catch (e) {
8400
8444
  emit("error", e);
8401
8445
  }