@tmagic/form 1.0.0-beta.13 → 1.0.0-beta.14
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/coverage/clover.xml +35 -23
- package/coverage/coverage-final.json +3 -2
- package/coverage/lcov-report/index.html +14 -14
- package/coverage/lcov-report/src/Form.vue.html +2 -2
- package/coverage/lcov-report/src/FormDialog.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Col.vue.html +253 -0
- package/coverage/lcov-report/src/containers/Container.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Fieldset.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupList.vue.html +1 -1
- package/coverage/lcov-report/src/containers/GroupListItem.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Panel.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Row.vue.html +23 -35
- package/coverage/lcov-report/src/containers/Step.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Table.vue.html +1 -1
- package/coverage/lcov-report/src/containers/Tabs.vue.html +1 -1
- package/coverage/lcov-report/src/containers/index.html +29 -14
- package/coverage/lcov-report/src/fields/Cascader.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Checkbox.vue.html +3 -3
- package/coverage/lcov-report/src/fields/CheckboxGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/ColorPicker.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Date.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DateTime.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Daterange.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Display.vue.html +1 -1
- package/coverage/lcov-report/src/fields/DynamicField.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Hidden.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Link.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Number.vue.html +1 -1
- package/coverage/lcov-report/src/fields/RadioGroup.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Select.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Switch.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Text.vue.html +1 -1
- package/coverage/lcov-report/src/fields/Textarea.vue.html +13 -19
- package/coverage/lcov-report/src/fields/Time.vue.html +1 -1
- package/coverage/lcov-report/src/fields/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov-report/src/theme/index.html +1 -1
- package/coverage/lcov-report/src/theme/index.scss.html +1 -1
- package/coverage/lcov-report/src/utils/config.ts.html +1 -1
- package/coverage/lcov-report/src/utils/createForm.ts.html +1 -1
- package/coverage/lcov-report/src/utils/fieldProps.ts.html +1 -1
- package/coverage/lcov-report/src/utils/form.ts.html +1 -1
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov-report/src/utils/useAddField.ts.html +1 -1
- package/coverage/lcov.info +63 -37
- package/dist/tmagic-form.es.js +120 -84
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +120 -84
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/Form.vue.d.ts +354 -0
- package/dist/types/src/FormDialog.vue.d.ts +741 -0
- package/dist/types/src/containers/Col.vue.d.ts +42 -0
- package/dist/types/src/containers/Row.vue.d.ts +0 -1
- package/dist/types/src/fields/Checkbox.vue.d.ts +2 -2
- package/dist/types/src/fields/Link.vue.d.ts +1564 -0
- package/package.json +3 -3
- package/src/Form.vue +1 -1
- package/src/containers/Col.vue +56 -0
- package/src/containers/Row.vue +14 -18
- package/src/fields/Checkbox.vue +2 -2
- package/src/fields/Textarea.vue +11 -13
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
return target;
|
|
177
177
|
};
|
|
178
178
|
|
|
179
|
-
const _sfc_main$
|
|
179
|
+
const _sfc_main$t = vue.defineComponent({
|
|
180
180
|
name: "m-form-container",
|
|
181
181
|
components: { WarningFilled: icons.WarningFilled },
|
|
182
182
|
props: {
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
|
-
const _hoisted_1$
|
|
309
|
+
const _hoisted_1$f = ["innerHTML"];
|
|
310
310
|
const _hoisted_2$7 = ["innerHTML"];
|
|
311
311
|
const _hoisted_3$7 = ["innerHTML"];
|
|
312
312
|
const _hoisted_4$6 = ["innerHTML"];
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
key: 4,
|
|
315
315
|
style: { "text-align": "center" }
|
|
316
316
|
};
|
|
317
|
-
function _sfc_render$
|
|
317
|
+
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
318
318
|
const _component_m_fields_hidden = vue.resolveComponent("m-fields-hidden");
|
|
319
319
|
const _component_el_tooltip = vue.resolveComponent("el-tooltip");
|
|
320
320
|
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
label: vue.withCtx(() => [
|
|
356
356
|
vue.createElementVNode("span", {
|
|
357
357
|
innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
|
|
358
|
-
}, null, 8, _hoisted_1$
|
|
358
|
+
}, null, 8, _hoisted_1$f)
|
|
359
359
|
]),
|
|
360
360
|
default: vue.withCtx(() => [
|
|
361
361
|
_ctx.tooltip ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, { key: 0 }, {
|
|
@@ -440,9 +440,9 @@
|
|
|
440
440
|
])) : vue.createCommentVNode("", true)
|
|
441
441
|
], 6)) : vue.createCommentVNode("", true);
|
|
442
442
|
}
|
|
443
|
-
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
443
|
+
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
|
|
444
444
|
|
|
445
|
-
const _sfc_main$
|
|
445
|
+
const _sfc_main$s = vue.defineComponent({
|
|
446
446
|
name: "m-form-fieldset",
|
|
447
447
|
props: {
|
|
448
448
|
labelWidth: String,
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
});
|
|
497
|
-
const _hoisted_1$
|
|
497
|
+
const _hoisted_1$e = ["innerHTML"];
|
|
498
498
|
const _hoisted_2$6 = ["innerHTML"];
|
|
499
499
|
const _hoisted_3$6 = { key: 1 };
|
|
500
500
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -508,7 +508,7 @@
|
|
|
508
508
|
};
|
|
509
509
|
const _hoisted_10$1 = { style: { "flex": "1" } };
|
|
510
510
|
const _hoisted_11 = ["src"];
|
|
511
|
-
function _sfc_render$
|
|
511
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
512
512
|
const _component_el_checkbox = vue.resolveComponent("el-checkbox");
|
|
513
513
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
514
514
|
return (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model) ? (vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
default: vue.withCtx(() => [
|
|
529
529
|
vue.createElementVNode("span", {
|
|
530
530
|
innerHTML: _ctx.config.legend
|
|
531
|
-
}, null, 8, _hoisted_1$
|
|
531
|
+
}, null, 8, _hoisted_1$e),
|
|
532
532
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
533
533
|
key: 0,
|
|
534
534
|
innerHTML: _ctx.config.extra,
|
|
@@ -600,9 +600,9 @@
|
|
|
600
600
|
}), 128)) : vue.createCommentVNode("", true)
|
|
601
601
|
], 4)) : vue.createCommentVNode("", true);
|
|
602
602
|
}
|
|
603
|
-
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
603
|
+
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
|
|
604
604
|
|
|
605
|
-
const _sfc_main$
|
|
605
|
+
const _sfc_main$r = vue.defineComponent({
|
|
606
606
|
name: "m-form-group-list-item",
|
|
607
607
|
components: { CaretRight: icons.CaretRight, CaretBottom: icons.CaretBottom },
|
|
608
608
|
props: {
|
|
@@ -686,11 +686,11 @@
|
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
|
-
const _hoisted_1$
|
|
689
|
+
const _hoisted_1$d = { class: "m-fields-group-list-item" };
|
|
690
690
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
|
|
691
691
|
const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
|
|
692
692
|
const _hoisted_4$4 = ["innerHTML"];
|
|
693
|
-
function _sfc_render$
|
|
693
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
694
694
|
const _component_caret_bottom = vue.resolveComponent("caret-bottom");
|
|
695
695
|
const _component_caret_right = vue.resolveComponent("caret-right");
|
|
696
696
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
@@ -698,7 +698,7 @@
|
|
|
698
698
|
const _component_CaretRight = vue.resolveComponent("CaretRight");
|
|
699
699
|
const _component_CaretBottom = vue.resolveComponent("CaretBottom");
|
|
700
700
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
701
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
701
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
702
702
|
vue.createElementVNode("div", null, [
|
|
703
703
|
vue.createVNode(_component_el_icon, {
|
|
704
704
|
style: { "margin-right": "7px" },
|
|
@@ -781,9 +781,9 @@
|
|
|
781
781
|
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "onChange"])) : vue.createCommentVNode("", true)
|
|
782
782
|
]);
|
|
783
783
|
}
|
|
784
|
-
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
784
|
+
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
|
|
785
785
|
|
|
786
|
-
const _sfc_main$
|
|
786
|
+
const _sfc_main$q = vue.defineComponent({
|
|
787
787
|
name: "m-form-group-list",
|
|
788
788
|
components: { MFieldsGroupListItem },
|
|
789
789
|
props: {
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
877
|
});
|
|
878
|
-
const _hoisted_1$
|
|
878
|
+
const _hoisted_1$c = { class: "m-fields-group-list" };
|
|
879
879
|
const _hoisted_2$4 = ["innerHTML"];
|
|
880
880
|
const _hoisted_3$4 = {
|
|
881
881
|
key: 1,
|
|
@@ -887,10 +887,10 @@
|
|
|
887
887
|
];
|
|
888
888
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
889
889
|
const _hoisted_7$1 = /* @__PURE__ */ vue.createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
|
|
890
|
-
function _sfc_render$
|
|
890
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
891
891
|
const _component_m_fields_group_list_item = vue.resolveComponent("m-fields-group-list-item");
|
|
892
892
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
893
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
893
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
|
|
894
894
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
895
895
|
key: 0,
|
|
896
896
|
innerHTML: _ctx.config.extra,
|
|
@@ -934,9 +934,9 @@
|
|
|
934
934
|
}, 8, ["onClick"])) : vue.createCommentVNode("", true)
|
|
935
935
|
]);
|
|
936
936
|
}
|
|
937
|
-
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
937
|
+
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
|
|
938
938
|
|
|
939
|
-
const _sfc_main$
|
|
939
|
+
const _sfc_main$p = vue.defineComponent({
|
|
940
940
|
name: "m-form-panel",
|
|
941
941
|
components: { CaretBottom: icons.CaretBottom, CaretRight: icons.CaretRight },
|
|
942
942
|
props: {
|
|
@@ -969,7 +969,7 @@
|
|
|
969
969
|
};
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
|
-
const _hoisted_1$
|
|
972
|
+
const _hoisted_1$b = { class: "clearfix" };
|
|
973
973
|
const _hoisted_2$3 = ["innerHTML"];
|
|
974
974
|
const _hoisted_3$3 = {
|
|
975
975
|
key: 0,
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
};
|
|
978
978
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
979
979
|
const _hoisted_5$1 = ["src"];
|
|
980
|
-
function _sfc_render$
|
|
980
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
981
981
|
const _component_caret_bottom = vue.resolveComponent("caret-bottom");
|
|
982
982
|
const _component_caret_right = vue.resolveComponent("caret-right");
|
|
983
983
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
@@ -989,7 +989,7 @@
|
|
|
989
989
|
"body-style": { display: _ctx.expand ? "block" : "none" }
|
|
990
990
|
}, {
|
|
991
991
|
header: vue.withCtx(() => [
|
|
992
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
992
|
+
vue.createElementVNode("div", _hoisted_1$b, [
|
|
993
993
|
vue.createElementVNode("a", {
|
|
994
994
|
href: "javascript:",
|
|
995
995
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1047,10 +1047,60 @@
|
|
|
1047
1047
|
_: 3
|
|
1048
1048
|
}, 8, ["body-style"])) : vue.createCommentVNode("", true);
|
|
1049
1049
|
}
|
|
1050
|
-
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1050
|
+
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
|
|
1051
|
+
|
|
1052
|
+
const _sfc_main$o = vue.defineComponent({
|
|
1053
|
+
props: {
|
|
1054
|
+
labelWidth: String,
|
|
1055
|
+
expandMore: Boolean,
|
|
1056
|
+
span: Number,
|
|
1057
|
+
model: {
|
|
1058
|
+
type: Object,
|
|
1059
|
+
default: () => ({})
|
|
1060
|
+
},
|
|
1061
|
+
config: {
|
|
1062
|
+
type: Object,
|
|
1063
|
+
default: () => ({})
|
|
1064
|
+
},
|
|
1065
|
+
prop: String,
|
|
1066
|
+
size: String
|
|
1067
|
+
},
|
|
1068
|
+
emits: ["change"],
|
|
1069
|
+
setup(props, { emit }) {
|
|
1070
|
+
const mForm = vue.inject("mForm");
|
|
1071
|
+
const changeHandler = () => emit("change", props.model);
|
|
1072
|
+
return {
|
|
1073
|
+
mForm,
|
|
1074
|
+
display: vue.computed(() => display(mForm, props.config.display, props)),
|
|
1075
|
+
changeHandler
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1080
|
+
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
1081
|
+
const _component_el_col = vue.resolveComponent("el-col");
|
|
1082
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_col, { span: _ctx.span }, {
|
|
1083
|
+
default: vue.withCtx(() => [
|
|
1084
|
+
vue.createVNode(_component_m_form_container, {
|
|
1085
|
+
model: _ctx.model,
|
|
1086
|
+
config: _ctx.config,
|
|
1087
|
+
prop: _ctx.prop,
|
|
1088
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1089
|
+
"expand-more": _ctx.expandMore,
|
|
1090
|
+
size: _ctx.size,
|
|
1091
|
+
onChange: _ctx.changeHandler
|
|
1092
|
+
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1093
|
+
]),
|
|
1094
|
+
_: 1
|
|
1095
|
+
}, 8, ["span"])), [
|
|
1096
|
+
[vue.vShow, _ctx.display && _ctx.config.type !== "hidden"]
|
|
1097
|
+
]);
|
|
1098
|
+
}
|
|
1099
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l]]);
|
|
1051
1100
|
|
|
1052
1101
|
const _sfc_main$n = vue.defineComponent({
|
|
1053
1102
|
name: "m-form-row",
|
|
1103
|
+
components: { Col },
|
|
1054
1104
|
props: {
|
|
1055
1105
|
labelWidth: String,
|
|
1056
1106
|
expandMore: Boolean,
|
|
@@ -1072,38 +1122,27 @@
|
|
|
1072
1122
|
const changeHandler = () => emit("change", props.name ? props.model[props.name] : props.model);
|
|
1073
1123
|
return {
|
|
1074
1124
|
mForm,
|
|
1075
|
-
display(config) {
|
|
1076
|
-
return display(mForm, config.display, props);
|
|
1077
|
-
},
|
|
1078
1125
|
changeHandler
|
|
1079
1126
|
};
|
|
1080
1127
|
}
|
|
1081
1128
|
});
|
|
1082
1129
|
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1083
|
-
const
|
|
1084
|
-
const _component_el_col = vue.resolveComponent("el-col");
|
|
1130
|
+
const _component_Col = vue.resolveComponent("Col");
|
|
1085
1131
|
const _component_el_row = vue.resolveComponent("el-row");
|
|
1086
1132
|
return vue.openBlock(), vue.createBlock(_component_el_row, { gutter: 10 }, {
|
|
1087
1133
|
default: vue.withCtx(() => [
|
|
1088
1134
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (col, index) => {
|
|
1089
|
-
return vue.openBlock(), vue.createBlock(
|
|
1090
|
-
style: vue.normalizeStyle(!_ctx.display(col) || col.type === "hidden" ? "display: none" : ""),
|
|
1135
|
+
return vue.openBlock(), vue.createBlock(_component_Col, {
|
|
1091
1136
|
key: col[_ctx.mForm?.keyProp || "__key"] ?? index,
|
|
1092
|
-
span:
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
size: _ctx.size,
|
|
1102
|
-
onChange: _ctx.changeHandler
|
|
1103
|
-
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1104
|
-
]),
|
|
1105
|
-
_: 2
|
|
1106
|
-
}, 1032, ["style", "span"]);
|
|
1137
|
+
span: _ctx.config.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1138
|
+
config: col,
|
|
1139
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1140
|
+
expandMore: _ctx.expandMore,
|
|
1141
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1142
|
+
prop: _ctx.prop,
|
|
1143
|
+
size: _ctx.size,
|
|
1144
|
+
onChange: _ctx.changeHandler
|
|
1145
|
+
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "prop", "size", "onChange"]);
|
|
1107
1146
|
}), 128))
|
|
1108
1147
|
]),
|
|
1109
1148
|
_: 1
|
|
@@ -1562,7 +1601,7 @@
|
|
|
1562
1601
|
};
|
|
1563
1602
|
}
|
|
1564
1603
|
});
|
|
1565
|
-
const _hoisted_1$
|
|
1604
|
+
const _hoisted_1$a = ["innerHTML"];
|
|
1566
1605
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1567
1606
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1568
1607
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
@@ -1591,7 +1630,7 @@
|
|
|
1591
1630
|
key: 0,
|
|
1592
1631
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1593
1632
|
innerHTML: _ctx.config.extra
|
|
1594
|
-
}, null, 8, _hoisted_1$
|
|
1633
|
+
}, null, 8, _hoisted_1$a)) : vue.createCommentVNode("", true),
|
|
1595
1634
|
vue.createElementVNode("div", _hoisted_2$2, [
|
|
1596
1635
|
vue.createVNode(_component_el_tooltip, {
|
|
1597
1636
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -2113,13 +2152,13 @@
|
|
|
2113
2152
|
};
|
|
2114
2153
|
}
|
|
2115
2154
|
});
|
|
2116
|
-
const _hoisted_1$
|
|
2155
|
+
const _hoisted_1$9 = {
|
|
2117
2156
|
class: "m-cascader",
|
|
2118
2157
|
style: { "width": "100%" }
|
|
2119
2158
|
};
|
|
2120
2159
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2121
2160
|
const _component_el_cascader = vue.resolveComponent("el-cascader");
|
|
2122
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2161
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
2123
2162
|
vue.createVNode(_component_el_cascader, {
|
|
2124
2163
|
modelValue: _ctx.model[_ctx.name],
|
|
2125
2164
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2159,7 +2198,7 @@
|
|
|
2159
2198
|
} else {
|
|
2160
2199
|
return props.config.activeValue;
|
|
2161
2200
|
}
|
|
2162
|
-
return
|
|
2201
|
+
return void 0;
|
|
2163
2202
|
}),
|
|
2164
2203
|
inactiveValue: vue.computed(() => {
|
|
2165
2204
|
if (typeof props.config.inactiveValue === "undefined") {
|
|
@@ -2169,7 +2208,7 @@
|
|
|
2169
2208
|
} else {
|
|
2170
2209
|
return props.config.inactiveValue;
|
|
2171
2210
|
}
|
|
2172
|
-
return
|
|
2211
|
+
return void 0;
|
|
2173
2212
|
}),
|
|
2174
2213
|
changeHandler(value) {
|
|
2175
2214
|
emit("change", value);
|
|
@@ -2242,7 +2281,7 @@
|
|
|
2242
2281
|
}
|
|
2243
2282
|
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$e]]);
|
|
2244
2283
|
|
|
2245
|
-
const _hoisted_1$
|
|
2284
|
+
const _hoisted_1$8 = { key: 0 };
|
|
2246
2285
|
const __default__$2 = vue.defineComponent({
|
|
2247
2286
|
name: "m-fields-color-picker"
|
|
2248
2287
|
});
|
|
@@ -2262,7 +2301,7 @@
|
|
|
2262
2301
|
const changeHandler = (value) => emit("change", value);
|
|
2263
2302
|
return (_ctx, _cache) => {
|
|
2264
2303
|
const _component_el_color_picker = vue.resolveComponent("el-color-picker");
|
|
2265
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2304
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
2266
2305
|
vue.createVNode(_component_el_color_picker, {
|
|
2267
2306
|
modelValue: _ctx.model[_ctx.name],
|
|
2268
2307
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2298,10 +2337,10 @@
|
|
|
2298
2337
|
};
|
|
2299
2338
|
}
|
|
2300
2339
|
});
|
|
2301
|
-
const _hoisted_1$
|
|
2340
|
+
const _hoisted_1$7 = { key: 0 };
|
|
2302
2341
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2303
2342
|
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2304
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2343
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
|
|
2305
2344
|
vue.createVNode(_component_el_date_picker, {
|
|
2306
2345
|
modelValue: _ctx.model[_ctx.modelName],
|
|
2307
2346
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.modelName] = $event),
|
|
@@ -2405,10 +2444,10 @@
|
|
|
2405
2444
|
};
|
|
2406
2445
|
}
|
|
2407
2446
|
});
|
|
2408
|
-
const _hoisted_1$
|
|
2447
|
+
const _hoisted_1$6 = { key: 0 };
|
|
2409
2448
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2410
2449
|
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2411
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2450
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
2412
2451
|
vue.createVNode(_component_el_date_picker, {
|
|
2413
2452
|
modelValue: _ctx.model[_ctx.name],
|
|
2414
2453
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2425,7 +2464,7 @@
|
|
|
2425
2464
|
}
|
|
2426
2465
|
var DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
|
|
2427
2466
|
|
|
2428
|
-
const _hoisted_1$
|
|
2467
|
+
const _hoisted_1$5 = { key: 0 };
|
|
2429
2468
|
const __default__$1 = vue.defineComponent({
|
|
2430
2469
|
name: "m-fields-display"
|
|
2431
2470
|
});
|
|
@@ -2446,7 +2485,7 @@
|
|
|
2446
2485
|
}
|
|
2447
2486
|
useAddField(props.prop);
|
|
2448
2487
|
return (_ctx, _cache) => {
|
|
2449
|
-
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
2488
|
+
return _ctx.model ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$5, vue.toDisplayString(_ctx.model[vue.unref(n)]), 1)) : vue.createCommentVNode("", true);
|
|
2450
2489
|
};
|
|
2451
2490
|
}
|
|
2452
2491
|
});
|
|
@@ -2516,12 +2555,12 @@
|
|
|
2516
2555
|
}
|
|
2517
2556
|
}
|
|
2518
2557
|
});
|
|
2519
|
-
const _hoisted_1$
|
|
2558
|
+
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2520
2559
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2521
2560
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
2522
2561
|
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
2523
2562
|
const _component_el_form = vue.resolveComponent("el-form");
|
|
2524
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2563
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
2525
2564
|
vue.createVNode(_component_el_form, { size: "small" }, {
|
|
2526
2565
|
default: vue.withCtx(() => [
|
|
2527
2566
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Object.keys(_ctx.fieldMap.value), (key) => {
|
|
@@ -2643,7 +2682,7 @@
|
|
|
2643
2682
|
};
|
|
2644
2683
|
}
|
|
2645
2684
|
});
|
|
2646
|
-
const _hoisted_1$
|
|
2685
|
+
const _hoisted_1$3 = ["href"];
|
|
2647
2686
|
const _hoisted_2$1 = {
|
|
2648
2687
|
key: 2,
|
|
2649
2688
|
class: "m-fields-link"
|
|
@@ -2657,7 +2696,7 @@
|
|
|
2657
2696
|
target: "_blank",
|
|
2658
2697
|
href: _ctx.href,
|
|
2659
2698
|
style: vue.normalizeStyle(_ctx.config.css || {})
|
|
2660
|
-
}, vue.toDisplayString(_ctx.displayText), 13, _hoisted_1$
|
|
2699
|
+
}, vue.toDisplayString(_ctx.displayText), 13, _hoisted_1$3)) : _ctx.config.href && _ctx.disabled ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
2661
2700
|
key: 1,
|
|
2662
2701
|
style: vue.normalizeStyle(_ctx.config.disabledCss || {})
|
|
2663
2702
|
}, vue.toDisplayString(_ctx.displayText), 5)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
|
|
@@ -3043,7 +3082,7 @@
|
|
|
3043
3082
|
};
|
|
3044
3083
|
}
|
|
3045
3084
|
});
|
|
3046
|
-
const _hoisted_1$
|
|
3085
|
+
const _hoisted_1$2 = { key: 2 };
|
|
3047
3086
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3048
3087
|
const _component_el_option = vue.resolveComponent("el-option");
|
|
3049
3088
|
const _component_el_option_group = vue.resolveComponent("el-option-group");
|
|
@@ -3096,7 +3135,7 @@
|
|
|
3096
3135
|
disabled: option.disabled
|
|
3097
3136
|
}, null, 8, ["label", "value", "disabled"]);
|
|
3098
3137
|
}), 128)),
|
|
3099
|
-
_ctx.moreLoadingVisible ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3138
|
+
_ctx.moreLoadingVisible ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, null, 512)), [
|
|
3100
3139
|
[_directive_loading, true]
|
|
3101
3140
|
]) : vue.createCommentVNode("", true)
|
|
3102
3141
|
]),
|
|
@@ -3249,7 +3288,7 @@
|
|
|
3249
3288
|
};
|
|
3250
3289
|
}
|
|
3251
3290
|
});
|
|
3252
|
-
const _hoisted_1$
|
|
3291
|
+
const _hoisted_1$1 = { key: 0 };
|
|
3253
3292
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3254
3293
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
3255
3294
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
@@ -3267,7 +3306,7 @@
|
|
|
3267
3306
|
_ctx.config.append ? {
|
|
3268
3307
|
name: "append",
|
|
3269
3308
|
fn: vue.withCtx(() => [
|
|
3270
|
-
typeof _ctx.config.append === "string" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
3309
|
+
typeof _ctx.config.append === "string" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$1, vue.toDisplayString(_ctx.config.append), 1)) : vue.createCommentVNode("", true),
|
|
3271
3310
|
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3272
3311
|
key: 1,
|
|
3273
3312
|
style: { "color": "#409eff" },
|
|
@@ -3317,22 +3356,19 @@
|
|
|
3317
3356
|
};
|
|
3318
3357
|
}
|
|
3319
3358
|
});
|
|
3320
|
-
const _hoisted_1$1 = { key: 0 };
|
|
3321
3359
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3322
3360
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
3323
|
-
return
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"])
|
|
3335
|
-
])) : vue.createCommentVNode("", true);
|
|
3361
|
+
return vue.openBlock(), vue.createBlock(_component_el_input, {
|
|
3362
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3363
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3364
|
+
type: "textarea",
|
|
3365
|
+
size: _ctx.size,
|
|
3366
|
+
clearable: "",
|
|
3367
|
+
placeholder: _ctx.config.placeholder,
|
|
3368
|
+
disabled: _ctx.disabled,
|
|
3369
|
+
onChange: _ctx.changeHandler,
|
|
3370
|
+
onInput: _ctx.inputHandler
|
|
3371
|
+
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
3336
3372
|
}
|
|
3337
3373
|
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
3338
3374
|
|
|
@@ -3480,7 +3516,7 @@
|
|
|
3480
3516
|
submitForm: async (native) => {
|
|
3481
3517
|
try {
|
|
3482
3518
|
await elForm.value?.validate();
|
|
3483
|
-
return native ? values.value : lodashEs.cloneDeep(values.value);
|
|
3519
|
+
return native ? values.value : lodashEs.cloneDeep(vue.toRaw(values.value));
|
|
3484
3520
|
} catch (invalidFields) {
|
|
3485
3521
|
const error = [];
|
|
3486
3522
|
Object.entries(invalidFields).forEach(([, ValidateError]) => {
|