@tmagic/form 1.0.3 → 1.0.4

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.
@@ -311,7 +311,7 @@ const _sfc_main$v = defineComponent({
311
311
  };
312
312
  }
313
313
  });
314
- const _hoisted_1$e = ["innerHTML"];
314
+ const _hoisted_1$d = ["innerHTML"];
315
315
  const _hoisted_2$7 = ["innerHTML"];
316
316
  const _hoisted_3$7 = ["innerHTML"];
317
317
  const _hoisted_4$6 = ["innerHTML"];
@@ -361,7 +361,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
361
361
  label: withCtx(() => [
362
362
  createElementVNode("span", {
363
363
  innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
364
- }, null, 8, _hoisted_1$e)
364
+ }, null, 8, _hoisted_1$d)
365
365
  ]),
366
366
  default: withCtx(() => [
367
367
  _ctx.tooltip ? (openBlock(), createBlock(_component_el_tooltip, { key: 0 }, {
@@ -448,7 +448,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
448
448
  }
449
449
  var Container = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$p]]);
450
450
 
451
- const _hoisted_1$d = ["innerHTML"];
451
+ const _hoisted_1$c = ["innerHTML"];
452
452
  const _hoisted_2$6 = ["innerHTML"];
453
453
  const _hoisted_3$6 = { key: 1 };
454
454
  const _hoisted_4$5 = ["innerHTML"];
@@ -492,7 +492,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
492
492
  const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
493
493
  if (props.config.checkbox && name.value) {
494
494
  watch(() => props.model[name.value]?.value, () => {
495
- console.log(props.model);
496
495
  emit("change", props.model);
497
496
  });
498
497
  }
@@ -516,7 +515,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
516
515
  default: withCtx(() => [
517
516
  createElementVNode("span", {
518
517
  innerHTML: __props.config.legend
519
- }, null, 8, _hoisted_1$d),
518
+ }, null, 8, _hoisted_1$c),
520
519
  __props.config.extra ? (openBlock(), createElementBlock("span", {
521
520
  key: 0,
522
521
  innerHTML: __props.config.extra,
@@ -657,7 +656,7 @@ const _sfc_main$t = defineComponent({
657
656
  };
658
657
  }
659
658
  });
660
- const _hoisted_1$c = { class: "m-fields-group-list-item" };
659
+ const _hoisted_1$b = { class: "m-fields-group-list-item" };
661
660
  const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("\u4E0A\u79FB");
662
661
  const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("\u4E0B\u79FB");
663
662
  const _hoisted_4$4 = ["innerHTML"];
@@ -669,7 +668,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
669
668
  const _component_CaretRight = resolveComponent("CaretRight");
670
669
  const _component_CaretBottom = resolveComponent("CaretBottom");
671
670
  const _component_m_form_container = resolveComponent("m-form-container");
672
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
671
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [
673
672
  createElementVNode("div", null, [
674
673
  createVNode(_component_el_icon, {
675
674
  style: { "margin-right": "7px" },
@@ -850,7 +849,7 @@ const _sfc_main$s = defineComponent({
850
849
  };
851
850
  }
852
851
  });
853
- const _hoisted_1$b = { class: "m-fields-group-list" };
852
+ const _hoisted_1$a = { class: "m-fields-group-list" };
854
853
  const _hoisted_2$4 = ["innerHTML"];
855
854
  const _hoisted_3$4 = {
856
855
  key: 1,
@@ -865,7 +864,7 @@ const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u5207\u6362\u4E3A\u8868\u
865
864
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
866
865
  const _component_m_fields_group_list_item = resolveComponent("m-fields-group-list-item");
867
866
  const _component_el_button = resolveComponent("el-button");
868
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
867
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
869
868
  _ctx.config.extra ? (openBlock(), createElementBlock("div", {
870
869
  key: 0,
871
870
  innerHTML: _ctx.config.extra,
@@ -944,7 +943,7 @@ const _sfc_main$r = defineComponent({
944
943
  };
945
944
  }
946
945
  });
947
- const _hoisted_1$a = { class: "clearfix" };
946
+ const _hoisted_1$9 = { class: "clearfix" };
948
947
  const _hoisted_2$3 = ["innerHTML"];
949
948
  const _hoisted_3$3 = {
950
949
  key: 0,
@@ -964,7 +963,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
964
963
  "body-style": { display: _ctx.expand ? "block" : "none" }
965
964
  }, {
966
965
  header: withCtx(() => [
967
- createElementVNode("div", _hoisted_1$a, [
966
+ createElementVNode("div", _hoisted_1$9, [
968
967
  createElementVNode("a", {
969
968
  href: "javascript:",
970
969
  style: { "width": "100%", "display": "block" },
@@ -1576,7 +1575,7 @@ const _sfc_main$n = defineComponent({
1576
1575
  };
1577
1576
  }
1578
1577
  });
1579
- const _hoisted_1$9 = ["innerHTML"];
1578
+ const _hoisted_1$8 = ["innerHTML"];
1580
1579
  const _hoisted_2$2 = { class: "el-form-item__content" };
1581
1580
  const _hoisted_3$2 = ["innerHTML"];
1582
1581
  const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0");
@@ -1605,7 +1604,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
1605
1604
  key: 0,
1606
1605
  style: { "color": "rgba(0, 0, 0, 0.45)" },
1607
1606
  innerHTML: _ctx.config.extra
1608
- }, null, 8, _hoisted_1$9)) : createCommentVNode("", true),
1607
+ }, null, 8, _hoisted_1$8)) : createCommentVNode("", true),
1609
1608
  createElementVNode("div", _hoisted_2$2, [
1610
1609
  createVNode(_component_el_tooltip, {
1611
1610
  content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
@@ -2141,13 +2140,13 @@ const _sfc_main$l = defineComponent({
2141
2140
  };
2142
2141
  }
2143
2142
  });
2144
- const _hoisted_1$8 = {
2143
+ const _hoisted_1$7 = {
2145
2144
  class: "m-cascader",
2146
2145
  style: { "width": "100%" }
2147
2146
  };
2148
2147
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
2149
2148
  const _component_el_cascader = resolveComponent("el-cascader");
2150
- return openBlock(), createElementBlock("div", _hoisted_1$8, [
2149
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
2151
2150
  createVNode(_component_el_cascader, {
2152
2151
  modelValue: _ctx.model[_ctx.name],
2153
2152
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
@@ -2270,7 +2269,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
2270
2269
  }
2271
2270
  var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$e]]);
2272
2271
 
2273
- const _hoisted_1$7 = { key: 0 };
2272
+ const _hoisted_1$6 = { key: 0 };
2274
2273
  const __default__$2 = defineComponent({
2275
2274
  name: "m-fields-color-picker"
2276
2275
  });
@@ -2290,7 +2289,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2290
2289
  const changeHandler = (value) => emit("change", value);
2291
2290
  return (_ctx, _cache) => {
2292
2291
  const _component_el_color_picker = resolveComponent("el-color-picker");
2293
- return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
2292
+ return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
2294
2293
  createVNode(_component_el_color_picker, {
2295
2294
  modelValue: _ctx.model[_ctx.name],
2296
2295
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
@@ -2316,32 +2315,27 @@ const _sfc_main$h = defineComponent({
2316
2315
  emits: ["change", "input"],
2317
2316
  setup(props, { emit }) {
2318
2317
  useAddField(props.prop);
2319
- const modelName = computed(() => props.prop || props.config.name || "");
2320
- props.model[modelName.value] = datetimeFormatter(props.model[modelName.value], "");
2318
+ props.model[props.name] = datetimeFormatter(props.model[props.name], "");
2321
2319
  return {
2322
- modelName,
2323
2320
  changeHandler(v) {
2324
2321
  emit("change", v);
2325
2322
  }
2326
2323
  };
2327
2324
  }
2328
2325
  });
2329
- const _hoisted_1$6 = { key: 0 };
2330
2326
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
2331
2327
  const _component_el_date_picker = resolveComponent("el-date-picker");
2332
- return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
2333
- createVNode(_component_el_date_picker, {
2334
- modelValue: _ctx.model[_ctx.modelName],
2335
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.modelName] = $event),
2336
- type: "date",
2337
- size: _ctx.size,
2338
- placeholder: _ctx.config.placeholder,
2339
- disabled: _ctx.disabled,
2340
- format: _ctx.config.format,
2341
- "value-format": _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
2342
- onChange: _ctx.changeHandler
2343
- }, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"])
2344
- ])) : createCommentVNode("", true);
2328
+ return openBlock(), createBlock(_component_el_date_picker, {
2329
+ modelValue: _ctx.model[_ctx.name],
2330
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
2331
+ type: "date",
2332
+ size: _ctx.size,
2333
+ placeholder: _ctx.config.placeholder,
2334
+ disabled: _ctx.disabled,
2335
+ format: _ctx.config.format,
2336
+ "value-format": _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
2337
+ onChange: _ctx.changeHandler
2338
+ }, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"]);
2345
2339
  }
2346
2340
  var Date$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$d]]);
2347
2341
 
@@ -3428,17 +3422,15 @@ const _sfc_main$2 = defineComponent({
3428
3422
  });
3429
3423
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3430
3424
  const _component_el_time_picker = resolveComponent("el-time-picker");
3431
- return openBlock(), createElementBlock("div", null, [
3432
- createVNode(_component_el_time_picker, {
3433
- modelValue: _ctx.model[_ctx.name],
3434
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3435
- size: _ctx.size,
3436
- "value-format": "HH:mm:ss",
3437
- placeholder: _ctx.config.placeholder,
3438
- disabled: _ctx.disabled,
3439
- onChange: _ctx.changeHandler
3440
- }, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange"])
3441
- ]);
3425
+ return openBlock(), createBlock(_component_el_time_picker, {
3426
+ modelValue: _ctx.model[_ctx.name],
3427
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
3428
+ size: _ctx.size,
3429
+ "value-format": "HH:mm:ss",
3430
+ placeholder: _ctx.config.placeholder,
3431
+ disabled: _ctx.disabled,
3432
+ onChange: _ctx.changeHandler
3433
+ }, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange"]);
3442
3434
  }
3443
3435
  var Time = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
3444
3436