@tmagic/form 1.2.0-beta.1 → 1.2.0-beta.2
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.mjs +110 -114
- package/dist/tmagic-form.mjs.map +1 -1
- package/dist/tmagic-form.umd.js +109 -113
- package/dist/tmagic-form.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/FormDialog.vue +50 -48
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
const _hoisted_2$7 = ["innerHTML"];
|
|
324
324
|
const _hoisted_3$7 = ["innerHTML"];
|
|
325
325
|
const _hoisted_4$6 = ["innerHTML"];
|
|
326
|
-
const _hoisted_5$
|
|
326
|
+
const _hoisted_5$4 = {
|
|
327
327
|
key: 4,
|
|
328
328
|
style: { "text-align": "center" }
|
|
329
329
|
};
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
|
|
442
442
|
}), 128)) : vue.createCommentVNode("", true)
|
|
443
443
|
], 64)) : vue.createCommentVNode("", true),
|
|
444
|
-
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
444
|
+
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
|
|
445
445
|
vue.createVNode(_component_el_button, {
|
|
446
446
|
text: "",
|
|
447
447
|
onClick: _ctx.expandHandler
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
const _hoisted_2$6 = ["innerHTML"];
|
|
461
461
|
const _hoisted_3$6 = { key: 1 };
|
|
462
462
|
const _hoisted_4$5 = ["innerHTML"];
|
|
463
|
-
const _hoisted_5$
|
|
463
|
+
const _hoisted_5$3 = ["innerHTML"];
|
|
464
464
|
const _hoisted_6$2 = {
|
|
465
465
|
key: 2,
|
|
466
466
|
style: { "display": "flex" }
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
key: 0,
|
|
546
546
|
innerHTML: __props.config.extra,
|
|
547
547
|
class: "m-form-tip"
|
|
548
|
-
}, null, 8, _hoisted_5$
|
|
548
|
+
}, null, 8, _hoisted_5$3)) : vue.createCommentVNode("", true)
|
|
549
549
|
])),
|
|
550
550
|
__props.config.schematic && vue.unref(show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
551
551
|
vue.createElementVNode("div", _hoisted_7$2, [
|
|
@@ -869,7 +869,7 @@
|
|
|
869
869
|
class: "el-table__empty-block"
|
|
870
870
|
};
|
|
871
871
|
const _hoisted_4$3 = /* @__PURE__ */ vue.createElementVNode("span", { class: "el-table__empty-text" }, "\u6682\u65E0\u6570\u636E", -1);
|
|
872
|
-
const _hoisted_5$
|
|
872
|
+
const _hoisted_5$2 = [
|
|
873
873
|
_hoisted_4$3
|
|
874
874
|
];
|
|
875
875
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
@@ -883,7 +883,7 @@
|
|
|
883
883
|
innerHTML: _ctx.config.extra,
|
|
884
884
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
885
885
|
}, null, 8, _hoisted_2$4)) : vue.createCommentVNode("", true),
|
|
886
|
-
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, _hoisted_5$
|
|
886
|
+
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, _hoisted_5$2)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
887
887
|
return vue.openBlock(), vue.createBlock(_component_m_fields_group_list_item, {
|
|
888
888
|
key: index,
|
|
889
889
|
model: item,
|
|
@@ -964,7 +964,7 @@
|
|
|
964
964
|
style: { "display": "flex" }
|
|
965
965
|
};
|
|
966
966
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
967
|
-
const _hoisted_5$
|
|
967
|
+
const _hoisted_5$1 = ["src"];
|
|
968
968
|
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
969
969
|
const _component_caret_bottom = vue.resolveComponent("caret-bottom");
|
|
970
970
|
const _component_caret_right = vue.resolveComponent("caret-right");
|
|
@@ -1018,7 +1018,7 @@
|
|
|
1018
1018
|
vue.createElementVNode("img", {
|
|
1019
1019
|
class: "m-form-schematic",
|
|
1020
1020
|
src: _ctx.config.schematic
|
|
1021
|
-
}, null, 8, _hoisted_5$
|
|
1021
|
+
}, null, 8, _hoisted_5$1)
|
|
1022
1022
|
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.items, (item, index) => {
|
|
1023
1023
|
return vue.openBlock(), vue.createBlock(_component_m_form_container, {
|
|
1024
1024
|
key: item[_ctx.mForm?.keyProp || "__key"] ?? index,
|
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1605
1605
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1606
1606
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
1607
|
-
const _hoisted_5
|
|
1607
|
+
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode(" \xA0 ");
|
|
1608
1608
|
const _hoisted_6 = /* @__PURE__ */ vue.createTextVNode("\u5C55\u5F00\u914D\u7F6E");
|
|
1609
1609
|
const _hoisted_7 = /* @__PURE__ */ vue.createTextVNode("\u5BFC\u5165EXCEL");
|
|
1610
1610
|
const _hoisted_8 = /* @__PURE__ */ vue.createTextVNode("\xA0 ");
|
|
@@ -1794,7 +1794,7 @@
|
|
|
1794
1794
|
]),
|
|
1795
1795
|
_: 1
|
|
1796
1796
|
})) : vue.createCommentVNode("", true),
|
|
1797
|
-
_hoisted_5
|
|
1797
|
+
_hoisted_5,
|
|
1798
1798
|
_ctx.enableToggleMode && !_ctx.isFullscreen ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
1799
1799
|
key: 1,
|
|
1800
1800
|
icon: _ctx.Grid,
|
|
@@ -3770,121 +3770,117 @@
|
|
|
3770
3770
|
}
|
|
3771
3771
|
});
|
|
3772
3772
|
|
|
3773
|
-
const _hoisted_1 = {
|
|
3774
|
-
const _hoisted_2 =
|
|
3775
|
-
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\
|
|
3776
|
-
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\
|
|
3777
|
-
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u4E00\u6B65");
|
|
3773
|
+
const _hoisted_1 = { style: { "min-height": "1px" } };
|
|
3774
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
|
|
3775
|
+
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u4E00\u6B65");
|
|
3776
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u4E00\u6B65");
|
|
3778
3777
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3779
3778
|
const _component_m_form = vue.resolveComponent("m-form");
|
|
3780
3779
|
const _component_el_col = vue.resolveComponent("el-col");
|
|
3781
3780
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
3782
3781
|
const _component_el_row = vue.resolveComponent("el-row");
|
|
3783
3782
|
const _component_el_dialog = vue.resolveComponent("el-dialog");
|
|
3784
|
-
return vue.openBlock(), vue.createBlock(
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3783
|
+
return vue.openBlock(), vue.createBlock(_component_el_dialog, {
|
|
3784
|
+
modelValue: _ctx.dialogVisible,
|
|
3785
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.dialogVisible = $event),
|
|
3786
|
+
class: "m-form-dialog",
|
|
3787
|
+
top: "20px",
|
|
3788
|
+
"append-to-body": "",
|
|
3789
|
+
title: _ctx.title,
|
|
3790
|
+
width: _ctx.width,
|
|
3791
|
+
fullscreen: _ctx.fullscreen,
|
|
3792
|
+
"close-on-click-modal": false,
|
|
3793
|
+
onClose: _ctx.closeHandler
|
|
3794
|
+
}, {
|
|
3795
|
+
footer: vue.withCtx(() => [
|
|
3796
|
+
vue.createVNode(_component_el_row, { class: "dialog-footer" }, {
|
|
3797
|
+
default: vue.withCtx(() => [
|
|
3798
|
+
vue.createVNode(_component_el_col, {
|
|
3799
|
+
span: 12,
|
|
3800
|
+
style: { "text-align": "left" }
|
|
3801
|
+
}, {
|
|
3798
3802
|
default: vue.withCtx(() => [
|
|
3799
|
-
vue.
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
vue.
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
|
|
3852
|
-
]),
|
|
3853
|
-
_: 1
|
|
3854
|
-
}, 8, ["loading", "onClick"]))
|
|
3855
|
-
])
|
|
3856
|
-
]),
|
|
3857
|
-
_: 3
|
|
3858
|
-
})
|
|
3803
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
3804
|
+
vue.renderSlot(_ctx.$slots, "left")
|
|
3805
|
+
])
|
|
3806
|
+
]),
|
|
3807
|
+
_: 3
|
|
3808
|
+
}),
|
|
3809
|
+
vue.createVNode(_component_el_col, { span: 12 }, {
|
|
3810
|
+
default: vue.withCtx(() => [
|
|
3811
|
+
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
3812
|
+
vue.createVNode(_component_el_button, {
|
|
3813
|
+
onClick: _ctx.cancel,
|
|
3814
|
+
size: "small"
|
|
3815
|
+
}, {
|
|
3816
|
+
default: vue.withCtx(() => [
|
|
3817
|
+
_hoisted_2
|
|
3818
|
+
]),
|
|
3819
|
+
_: 1
|
|
3820
|
+
}, 8, ["onClick"]),
|
|
3821
|
+
_ctx.hasStep && _ctx.stepActive > 1 ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3822
|
+
key: 0,
|
|
3823
|
+
type: "info",
|
|
3824
|
+
size: "small",
|
|
3825
|
+
onClick: _ctx.preStep
|
|
3826
|
+
}, {
|
|
3827
|
+
default: vue.withCtx(() => [
|
|
3828
|
+
_hoisted_3
|
|
3829
|
+
]),
|
|
3830
|
+
_: 1
|
|
3831
|
+
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
3832
|
+
_ctx.hasStep && _ctx.stepCount > _ctx.stepActive ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3833
|
+
key: 1,
|
|
3834
|
+
type: "info",
|
|
3835
|
+
size: "small",
|
|
3836
|
+
onClick: _ctx.nextStep
|
|
3837
|
+
}, {
|
|
3838
|
+
default: vue.withCtx(() => [
|
|
3839
|
+
_hoisted_4
|
|
3840
|
+
]),
|
|
3841
|
+
_: 1
|
|
3842
|
+
}, 8, ["onClick"])) : (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3843
|
+
key: 2,
|
|
3844
|
+
type: "primary",
|
|
3845
|
+
size: "small",
|
|
3846
|
+
loading: _ctx.saveFetch,
|
|
3847
|
+
onClick: _ctx.save
|
|
3848
|
+
}, {
|
|
3849
|
+
default: vue.withCtx(() => [
|
|
3850
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
|
|
3851
|
+
]),
|
|
3852
|
+
_: 1
|
|
3853
|
+
}, 8, ["loading", "onClick"]))
|
|
3854
|
+
])
|
|
3859
3855
|
]),
|
|
3860
3856
|
_: 3
|
|
3861
3857
|
})
|
|
3862
3858
|
]),
|
|
3863
|
-
default: vue.withCtx(() => [
|
|
3864
|
-
vue.createElementVNode("div", {
|
|
3865
|
-
class: "m-dialog-body",
|
|
3866
|
-
style: vue.normalizeStyle(`max-height: ${_ctx.bodyHeight}; overflow-y: auto; overflow-x: hidden;`)
|
|
3867
|
-
}, [
|
|
3868
|
-
vue.createVNode(_component_m_form, {
|
|
3869
|
-
modelValue: _ctx.stepActive,
|
|
3870
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.stepActive = $event),
|
|
3871
|
-
ref: "form",
|
|
3872
|
-
size: _ctx.size,
|
|
3873
|
-
config: _ctx.config,
|
|
3874
|
-
"init-values": _ctx.values,
|
|
3875
|
-
"parent-values": _ctx.parentValues,
|
|
3876
|
-
"label-width": _ctx.labelWidth,
|
|
3877
|
-
onChange: _ctx.changeHandler
|
|
3878
|
-
}, null, 8, ["modelValue", "size", "config", "init-values", "parent-values", "label-width", "onChange"]),
|
|
3879
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
3880
|
-
], 4)
|
|
3881
|
-
]),
|
|
3882
3859
|
_: 3
|
|
3883
|
-
}
|
|
3884
|
-
]
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3860
|
+
})
|
|
3861
|
+
]),
|
|
3862
|
+
default: vue.withCtx(() => [
|
|
3863
|
+
_ctx.dialogVisible ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3864
|
+
key: 0,
|
|
3865
|
+
class: "m-dialog-body",
|
|
3866
|
+
style: vue.normalizeStyle(`max-height: ${_ctx.bodyHeight}; overflow-y: auto; overflow-x: hidden;`)
|
|
3867
|
+
}, [
|
|
3868
|
+
vue.createVNode(_component_m_form, {
|
|
3869
|
+
modelValue: _ctx.stepActive,
|
|
3870
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.stepActive = $event),
|
|
3871
|
+
ref: "form",
|
|
3872
|
+
size: _ctx.size,
|
|
3873
|
+
config: _ctx.config,
|
|
3874
|
+
"init-values": _ctx.values,
|
|
3875
|
+
"parent-values": _ctx.parentValues,
|
|
3876
|
+
"label-width": _ctx.labelWidth,
|
|
3877
|
+
onChange: _ctx.changeHandler
|
|
3878
|
+
}, null, 8, ["modelValue", "size", "config", "init-values", "parent-values", "label-width", "onChange"]),
|
|
3879
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
3880
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
3881
|
+
]),
|
|
3882
|
+
_: 3
|
|
3883
|
+
}, 8, ["modelValue", "title", "width", "fullscreen", "onClose"]);
|
|
3888
3884
|
}
|
|
3889
3885
|
const FormDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3890
3886
|
|