@tmagic/form 1.0.3 → 1.0.6
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.
- package/dist/tmagic-form.es.js +37 -45
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +37 -45
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Table.vue.d.ts +3 -653
- package/dist/types/src/fields/Date.vue.d.ts +1 -2
- package/package.json +2 -2
- package/src/containers/Fieldset.vue +0 -1
- package/src/containers/Table.vue +2 -2
- package/src/fields/Date.vue +12 -16
- package/src/fields/Time.vue +8 -10
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
|
-
const _hoisted_1$
|
|
317
|
+
const _hoisted_1$d = ["innerHTML"];
|
|
318
318
|
const _hoisted_2$7 = ["innerHTML"];
|
|
319
319
|
const _hoisted_3$7 = ["innerHTML"];
|
|
320
320
|
const _hoisted_4$6 = ["innerHTML"];
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
label: vue.withCtx(() => [
|
|
365
365
|
vue.createElementVNode("span", {
|
|
366
366
|
innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
|
|
367
|
-
}, null, 8, _hoisted_1$
|
|
367
|
+
}, null, 8, _hoisted_1$d)
|
|
368
368
|
]),
|
|
369
369
|
default: vue.withCtx(() => [
|
|
370
370
|
_ctx.tooltip ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, { key: 0 }, {
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
}
|
|
452
452
|
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$p]]);
|
|
453
453
|
|
|
454
|
-
const _hoisted_1$
|
|
454
|
+
const _hoisted_1$c = ["innerHTML"];
|
|
455
455
|
const _hoisted_2$6 = ["innerHTML"];
|
|
456
456
|
const _hoisted_3$6 = { key: 1 };
|
|
457
457
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -495,7 +495,6 @@
|
|
|
495
495
|
const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
|
|
496
496
|
if (props.config.checkbox && name.value) {
|
|
497
497
|
vue.watch(() => props.model[name.value]?.value, () => {
|
|
498
|
-
console.log(props.model);
|
|
499
498
|
emit("change", props.model);
|
|
500
499
|
});
|
|
501
500
|
}
|
|
@@ -519,7 +518,7 @@
|
|
|
519
518
|
default: vue.withCtx(() => [
|
|
520
519
|
vue.createElementVNode("span", {
|
|
521
520
|
innerHTML: __props.config.legend
|
|
522
|
-
}, null, 8, _hoisted_1$
|
|
521
|
+
}, null, 8, _hoisted_1$c),
|
|
523
522
|
__props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
524
523
|
key: 0,
|
|
525
524
|
innerHTML: __props.config.extra,
|
|
@@ -660,7 +659,7 @@
|
|
|
660
659
|
};
|
|
661
660
|
}
|
|
662
661
|
});
|
|
663
|
-
const _hoisted_1$
|
|
662
|
+
const _hoisted_1$b = { class: "m-fields-group-list-item" };
|
|
664
663
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
|
|
665
664
|
const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
|
|
666
665
|
const _hoisted_4$4 = ["innerHTML"];
|
|
@@ -672,7 +671,7 @@
|
|
|
672
671
|
const _component_CaretRight = vue.resolveComponent("CaretRight");
|
|
673
672
|
const _component_CaretBottom = vue.resolveComponent("CaretBottom");
|
|
674
673
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
675
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
674
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
676
675
|
vue.createElementVNode("div", null, [
|
|
677
676
|
vue.createVNode(_component_el_icon, {
|
|
678
677
|
style: { "margin-right": "7px" },
|
|
@@ -853,7 +852,7 @@
|
|
|
853
852
|
};
|
|
854
853
|
}
|
|
855
854
|
});
|
|
856
|
-
const _hoisted_1$
|
|
855
|
+
const _hoisted_1$a = { class: "m-fields-group-list" };
|
|
857
856
|
const _hoisted_2$4 = ["innerHTML"];
|
|
858
857
|
const _hoisted_3$4 = {
|
|
859
858
|
key: 1,
|
|
@@ -868,7 +867,7 @@
|
|
|
868
867
|
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
869
868
|
const _component_m_fields_group_list_item = vue.resolveComponent("m-fields-group-list-item");
|
|
870
869
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
871
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
870
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
872
871
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
873
872
|
key: 0,
|
|
874
873
|
innerHTML: _ctx.config.extra,
|
|
@@ -947,7 +946,7 @@
|
|
|
947
946
|
};
|
|
948
947
|
}
|
|
949
948
|
});
|
|
950
|
-
const _hoisted_1$
|
|
949
|
+
const _hoisted_1$9 = { class: "clearfix" };
|
|
951
950
|
const _hoisted_2$3 = ["innerHTML"];
|
|
952
951
|
const _hoisted_3$3 = {
|
|
953
952
|
key: 0,
|
|
@@ -967,7 +966,7 @@
|
|
|
967
966
|
"body-style": { display: _ctx.expand ? "block" : "none" }
|
|
968
967
|
}, {
|
|
969
968
|
header: vue.withCtx(() => [
|
|
970
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
969
|
+
vue.createElementVNode("div", _hoisted_1$9, [
|
|
971
970
|
vue.createElementVNode("a", {
|
|
972
971
|
href: "javascript:",
|
|
973
972
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1579,7 +1578,7 @@
|
|
|
1579
1578
|
};
|
|
1580
1579
|
}
|
|
1581
1580
|
});
|
|
1582
|
-
const _hoisted_1$
|
|
1581
|
+
const _hoisted_1$8 = ["innerHTML"];
|
|
1583
1582
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1584
1583
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1585
1584
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
@@ -1608,7 +1607,7 @@
|
|
|
1608
1607
|
key: 0,
|
|
1609
1608
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1610
1609
|
innerHTML: _ctx.config.extra
|
|
1611
|
-
}, null, 8, _hoisted_1$
|
|
1610
|
+
}, null, 8, _hoisted_1$8)) : vue.createCommentVNode("", true),
|
|
1612
1611
|
vue.createElementVNode("div", _hoisted_2$2, [
|
|
1613
1612
|
vue.createVNode(_component_el_tooltip, {
|
|
1614
1613
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -2144,13 +2143,13 @@
|
|
|
2144
2143
|
};
|
|
2145
2144
|
}
|
|
2146
2145
|
});
|
|
2147
|
-
const _hoisted_1$
|
|
2146
|
+
const _hoisted_1$7 = {
|
|
2148
2147
|
class: "m-cascader",
|
|
2149
2148
|
style: { "width": "100%" }
|
|
2150
2149
|
};
|
|
2151
2150
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2152
2151
|
const _component_el_cascader = vue.resolveComponent("el-cascader");
|
|
2153
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2152
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
|
|
2154
2153
|
vue.createVNode(_component_el_cascader, {
|
|
2155
2154
|
modelValue: _ctx.model[_ctx.name],
|
|
2156
2155
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2273,7 +2272,7 @@
|
|
|
2273
2272
|
}
|
|
2274
2273
|
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$e]]);
|
|
2275
2274
|
|
|
2276
|
-
const _hoisted_1$
|
|
2275
|
+
const _hoisted_1$6 = { key: 0 };
|
|
2277
2276
|
const __default__$2 = vue.defineComponent({
|
|
2278
2277
|
name: "m-fields-color-picker"
|
|
2279
2278
|
});
|
|
@@ -2293,7 +2292,7 @@
|
|
|
2293
2292
|
const changeHandler = (value) => emit("change", value);
|
|
2294
2293
|
return (_ctx, _cache) => {
|
|
2295
2294
|
const _component_el_color_picker = vue.resolveComponent("el-color-picker");
|
|
2296
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2295
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
2297
2296
|
vue.createVNode(_component_el_color_picker, {
|
|
2298
2297
|
modelValue: _ctx.model[_ctx.name],
|
|
2299
2298
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2319,32 +2318,27 @@
|
|
|
2319
2318
|
emits: ["change", "input"],
|
|
2320
2319
|
setup(props, { emit }) {
|
|
2321
2320
|
useAddField(props.prop);
|
|
2322
|
-
|
|
2323
|
-
props.model[modelName.value] = utils.datetimeFormatter(props.model[modelName.value], "");
|
|
2321
|
+
props.model[props.name] = utils.datetimeFormatter(props.model[props.name], "");
|
|
2324
2322
|
return {
|
|
2325
|
-
modelName,
|
|
2326
2323
|
changeHandler(v) {
|
|
2327
2324
|
emit("change", v);
|
|
2328
2325
|
}
|
|
2329
2326
|
};
|
|
2330
2327
|
}
|
|
2331
2328
|
});
|
|
2332
|
-
const _hoisted_1$6 = { key: 0 };
|
|
2333
2329
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2334
2330
|
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2335
|
-
return
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"])
|
|
2347
|
-
])) : vue.createCommentVNode("", true);
|
|
2331
|
+
return vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
2332
|
+
modelValue: _ctx.model[_ctx.name],
|
|
2333
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
2334
|
+
type: "date",
|
|
2335
|
+
size: _ctx.size,
|
|
2336
|
+
placeholder: _ctx.config.placeholder,
|
|
2337
|
+
disabled: _ctx.disabled,
|
|
2338
|
+
format: _ctx.config.format,
|
|
2339
|
+
"value-format": _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
|
|
2340
|
+
onChange: _ctx.changeHandler
|
|
2341
|
+
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"]);
|
|
2348
2342
|
}
|
|
2349
2343
|
var Date$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$d]]);
|
|
2350
2344
|
|
|
@@ -3431,17 +3425,15 @@
|
|
|
3431
3425
|
});
|
|
3432
3426
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3433
3427
|
const _component_el_time_picker = vue.resolveComponent("el-time-picker");
|
|
3434
|
-
return vue.openBlock(), vue.
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange"])
|
|
3444
|
-
]);
|
|
3428
|
+
return vue.openBlock(), vue.createBlock(_component_el_time_picker, {
|
|
3429
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3430
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3431
|
+
size: _ctx.size,
|
|
3432
|
+
"value-format": "HH:mm:ss",
|
|
3433
|
+
placeholder: _ctx.config.placeholder,
|
|
3434
|
+
disabled: _ctx.disabled,
|
|
3435
|
+
onChange: _ctx.changeHandler
|
|
3436
|
+
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange"]);
|
|
3445
3437
|
}
|
|
3446
3438
|
var Time = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
3447
3439
|
|