@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.es.js
CHANGED
|
@@ -173,7 +173,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
173
173
|
return target;
|
|
174
174
|
};
|
|
175
175
|
|
|
176
|
-
const _sfc_main$
|
|
176
|
+
const _sfc_main$t = defineComponent({
|
|
177
177
|
name: "m-form-container",
|
|
178
178
|
components: { WarningFilled },
|
|
179
179
|
props: {
|
|
@@ -303,7 +303,7 @@ const _sfc_main$s = defineComponent({
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
-
const _hoisted_1$
|
|
306
|
+
const _hoisted_1$f = ["innerHTML"];
|
|
307
307
|
const _hoisted_2$7 = ["innerHTML"];
|
|
308
308
|
const _hoisted_3$7 = ["innerHTML"];
|
|
309
309
|
const _hoisted_4$6 = ["innerHTML"];
|
|
@@ -311,7 +311,7 @@ const _hoisted_5$4 = {
|
|
|
311
311
|
key: 4,
|
|
312
312
|
style: { "text-align": "center" }
|
|
313
313
|
};
|
|
314
|
-
function _sfc_render$
|
|
314
|
+
function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
315
315
|
const _component_m_fields_hidden = resolveComponent("m-fields-hidden");
|
|
316
316
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
317
317
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -352,7 +352,7 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
352
352
|
label: withCtx(() => [
|
|
353
353
|
createElementVNode("span", {
|
|
354
354
|
innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
|
|
355
|
-
}, null, 8, _hoisted_1$
|
|
355
|
+
}, null, 8, _hoisted_1$f)
|
|
356
356
|
]),
|
|
357
357
|
default: withCtx(() => [
|
|
358
358
|
_ctx.tooltip ? (openBlock(), createBlock(_component_el_tooltip, { key: 0 }, {
|
|
@@ -437,9 +437,9 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
437
437
|
])) : createCommentVNode("", true)
|
|
438
438
|
], 6)) : createCommentVNode("", true);
|
|
439
439
|
}
|
|
440
|
-
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
440
|
+
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
|
|
441
441
|
|
|
442
|
-
const _sfc_main$
|
|
442
|
+
const _sfc_main$s = defineComponent({
|
|
443
443
|
name: "m-form-fieldset",
|
|
444
444
|
props: {
|
|
445
445
|
labelWidth: String,
|
|
@@ -491,7 +491,7 @@ const _sfc_main$r = defineComponent({
|
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
|
-
const _hoisted_1$
|
|
494
|
+
const _hoisted_1$e = ["innerHTML"];
|
|
495
495
|
const _hoisted_2$6 = ["innerHTML"];
|
|
496
496
|
const _hoisted_3$6 = { key: 1 };
|
|
497
497
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -505,7 +505,7 @@ const _hoisted_9$1 = {
|
|
|
505
505
|
};
|
|
506
506
|
const _hoisted_10$1 = { style: { "flex": "1" } };
|
|
507
507
|
const _hoisted_11 = ["src"];
|
|
508
|
-
function _sfc_render$
|
|
508
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
509
509
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
510
510
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
511
511
|
return (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model) ? (openBlock(), createElementBlock("fieldset", {
|
|
@@ -525,7 +525,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
525
525
|
default: withCtx(() => [
|
|
526
526
|
createElementVNode("span", {
|
|
527
527
|
innerHTML: _ctx.config.legend
|
|
528
|
-
}, null, 8, _hoisted_1$
|
|
528
|
+
}, null, 8, _hoisted_1$e),
|
|
529
529
|
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
530
530
|
key: 0,
|
|
531
531
|
innerHTML: _ctx.config.extra,
|
|
@@ -597,9 +597,9 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
597
597
|
}), 128)) : createCommentVNode("", true)
|
|
598
598
|
], 4)) : createCommentVNode("", true);
|
|
599
599
|
}
|
|
600
|
-
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
600
|
+
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
|
|
601
601
|
|
|
602
|
-
const _sfc_main$
|
|
602
|
+
const _sfc_main$r = defineComponent({
|
|
603
603
|
name: "m-form-group-list-item",
|
|
604
604
|
components: { CaretRight, CaretBottom },
|
|
605
605
|
props: {
|
|
@@ -683,11 +683,11 @@ const _sfc_main$q = defineComponent({
|
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
});
|
|
686
|
-
const _hoisted_1$
|
|
686
|
+
const _hoisted_1$d = { class: "m-fields-group-list-item" };
|
|
687
687
|
const _hoisted_2$5 = /* @__PURE__ */ createTextVNode("\u4E0A\u79FB");
|
|
688
688
|
const _hoisted_3$5 = /* @__PURE__ */ createTextVNode("\u4E0B\u79FB");
|
|
689
689
|
const _hoisted_4$4 = ["innerHTML"];
|
|
690
|
-
function _sfc_render$
|
|
690
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
691
691
|
const _component_caret_bottom = resolveComponent("caret-bottom");
|
|
692
692
|
const _component_caret_right = resolveComponent("caret-right");
|
|
693
693
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -695,7 +695,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
695
695
|
const _component_CaretRight = resolveComponent("CaretRight");
|
|
696
696
|
const _component_CaretBottom = resolveComponent("CaretBottom");
|
|
697
697
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
698
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
698
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
699
699
|
createElementVNode("div", null, [
|
|
700
700
|
createVNode(_component_el_icon, {
|
|
701
701
|
style: { "margin-right": "7px" },
|
|
@@ -778,9 +778,9 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
778
778
|
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "onChange"])) : createCommentVNode("", true)
|
|
779
779
|
]);
|
|
780
780
|
}
|
|
781
|
-
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
781
|
+
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
|
|
782
782
|
|
|
783
|
-
const _sfc_main$
|
|
783
|
+
const _sfc_main$q = defineComponent({
|
|
784
784
|
name: "m-form-group-list",
|
|
785
785
|
components: { MFieldsGroupListItem },
|
|
786
786
|
props: {
|
|
@@ -872,7 +872,7 @@ const _sfc_main$p = defineComponent({
|
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
874
|
});
|
|
875
|
-
const _hoisted_1$
|
|
875
|
+
const _hoisted_1$c = { class: "m-fields-group-list" };
|
|
876
876
|
const _hoisted_2$4 = ["innerHTML"];
|
|
877
877
|
const _hoisted_3$4 = {
|
|
878
878
|
key: 1,
|
|
@@ -884,10 +884,10 @@ const _hoisted_5$2 = [
|
|
|
884
884
|
];
|
|
885
885
|
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
886
886
|
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
|
|
887
|
-
function _sfc_render$
|
|
887
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
888
888
|
const _component_m_fields_group_list_item = resolveComponent("m-fields-group-list-item");
|
|
889
889
|
const _component_el_button = resolveComponent("el-button");
|
|
890
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
890
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
891
891
|
_ctx.config.extra ? (openBlock(), createElementBlock("div", {
|
|
892
892
|
key: 0,
|
|
893
893
|
innerHTML: _ctx.config.extra,
|
|
@@ -931,9 +931,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
931
931
|
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
932
932
|
]);
|
|
933
933
|
}
|
|
934
|
-
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
934
|
+
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
|
|
935
935
|
|
|
936
|
-
const _sfc_main$
|
|
936
|
+
const _sfc_main$p = defineComponent({
|
|
937
937
|
name: "m-form-panel",
|
|
938
938
|
components: { CaretBottom, CaretRight },
|
|
939
939
|
props: {
|
|
@@ -966,7 +966,7 @@ const _sfc_main$o = defineComponent({
|
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
});
|
|
969
|
-
const _hoisted_1$
|
|
969
|
+
const _hoisted_1$b = { class: "clearfix" };
|
|
970
970
|
const _hoisted_2$3 = ["innerHTML"];
|
|
971
971
|
const _hoisted_3$3 = {
|
|
972
972
|
key: 0,
|
|
@@ -974,7 +974,7 @@ const _hoisted_3$3 = {
|
|
|
974
974
|
};
|
|
975
975
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
976
976
|
const _hoisted_5$1 = ["src"];
|
|
977
|
-
function _sfc_render$
|
|
977
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
978
978
|
const _component_caret_bottom = resolveComponent("caret-bottom");
|
|
979
979
|
const _component_caret_right = resolveComponent("caret-right");
|
|
980
980
|
const _component_el_icon = resolveComponent("el-icon");
|
|
@@ -986,7 +986,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
986
986
|
"body-style": { display: _ctx.expand ? "block" : "none" }
|
|
987
987
|
}, {
|
|
988
988
|
header: withCtx(() => [
|
|
989
|
-
createElementVNode("div", _hoisted_1$
|
|
989
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
990
990
|
createElementVNode("a", {
|
|
991
991
|
href: "javascript:",
|
|
992
992
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1044,10 +1044,60 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1044
1044
|
_: 3
|
|
1045
1045
|
}, 8, ["body-style"])) : createCommentVNode("", true);
|
|
1046
1046
|
}
|
|
1047
|
-
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1047
|
+
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
|
|
1048
|
+
|
|
1049
|
+
const _sfc_main$o = defineComponent({
|
|
1050
|
+
props: {
|
|
1051
|
+
labelWidth: String,
|
|
1052
|
+
expandMore: Boolean,
|
|
1053
|
+
span: Number,
|
|
1054
|
+
model: {
|
|
1055
|
+
type: Object,
|
|
1056
|
+
default: () => ({})
|
|
1057
|
+
},
|
|
1058
|
+
config: {
|
|
1059
|
+
type: Object,
|
|
1060
|
+
default: () => ({})
|
|
1061
|
+
},
|
|
1062
|
+
prop: String,
|
|
1063
|
+
size: String
|
|
1064
|
+
},
|
|
1065
|
+
emits: ["change"],
|
|
1066
|
+
setup(props, { emit }) {
|
|
1067
|
+
const mForm = inject("mForm");
|
|
1068
|
+
const changeHandler = () => emit("change", props.model);
|
|
1069
|
+
return {
|
|
1070
|
+
mForm,
|
|
1071
|
+
display: computed(() => display(mForm, props.config.display, props)),
|
|
1072
|
+
changeHandler
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1077
|
+
const _component_m_form_container = resolveComponent("m-form-container");
|
|
1078
|
+
const _component_el_col = resolveComponent("el-col");
|
|
1079
|
+
return withDirectives((openBlock(), createBlock(_component_el_col, { span: _ctx.span }, {
|
|
1080
|
+
default: withCtx(() => [
|
|
1081
|
+
createVNode(_component_m_form_container, {
|
|
1082
|
+
model: _ctx.model,
|
|
1083
|
+
config: _ctx.config,
|
|
1084
|
+
prop: _ctx.prop,
|
|
1085
|
+
"label-width": _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1086
|
+
"expand-more": _ctx.expandMore,
|
|
1087
|
+
size: _ctx.size,
|
|
1088
|
+
onChange: _ctx.changeHandler
|
|
1089
|
+
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1090
|
+
]),
|
|
1091
|
+
_: 1
|
|
1092
|
+
}, 8, ["span"])), [
|
|
1093
|
+
[vShow, _ctx.display && _ctx.config.type !== "hidden"]
|
|
1094
|
+
]);
|
|
1095
|
+
}
|
|
1096
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l]]);
|
|
1048
1097
|
|
|
1049
1098
|
const _sfc_main$n = defineComponent({
|
|
1050
1099
|
name: "m-form-row",
|
|
1100
|
+
components: { Col },
|
|
1051
1101
|
props: {
|
|
1052
1102
|
labelWidth: String,
|
|
1053
1103
|
expandMore: Boolean,
|
|
@@ -1069,38 +1119,27 @@ const _sfc_main$n = defineComponent({
|
|
|
1069
1119
|
const changeHandler = () => emit("change", props.name ? props.model[props.name] : props.model);
|
|
1070
1120
|
return {
|
|
1071
1121
|
mForm,
|
|
1072
|
-
display(config) {
|
|
1073
|
-
return display(mForm, config.display, props);
|
|
1074
|
-
},
|
|
1075
1122
|
changeHandler
|
|
1076
1123
|
};
|
|
1077
1124
|
}
|
|
1078
1125
|
});
|
|
1079
1126
|
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1080
|
-
const
|
|
1081
|
-
const _component_el_col = resolveComponent("el-col");
|
|
1127
|
+
const _component_Col = resolveComponent("Col");
|
|
1082
1128
|
const _component_el_row = resolveComponent("el-row");
|
|
1083
1129
|
return openBlock(), createBlock(_component_el_row, { gutter: 10 }, {
|
|
1084
1130
|
default: withCtx(() => [
|
|
1085
1131
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.items, (col, index) => {
|
|
1086
|
-
return openBlock(), createBlock(
|
|
1087
|
-
style: normalizeStyle(!_ctx.display(col) || col.type === "hidden" ? "display: none" : ""),
|
|
1132
|
+
return openBlock(), createBlock(_component_Col, {
|
|
1088
1133
|
key: col[_ctx.mForm?.keyProp || "__key"] ?? index,
|
|
1089
|
-
span:
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
size: _ctx.size,
|
|
1099
|
-
onChange: _ctx.changeHandler
|
|
1100
|
-
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "onChange"])
|
|
1101
|
-
]),
|
|
1102
|
-
_: 2
|
|
1103
|
-
}, 1032, ["style", "span"]);
|
|
1134
|
+
span: _ctx.config.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1135
|
+
config: col,
|
|
1136
|
+
labelWidth: _ctx.config.labelWidth || _ctx.labelWidth,
|
|
1137
|
+
expandMore: _ctx.expandMore,
|
|
1138
|
+
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
1139
|
+
prop: _ctx.prop,
|
|
1140
|
+
size: _ctx.size,
|
|
1141
|
+
onChange: _ctx.changeHandler
|
|
1142
|
+
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "prop", "size", "onChange"]);
|
|
1104
1143
|
}), 128))
|
|
1105
1144
|
]),
|
|
1106
1145
|
_: 1
|
|
@@ -1559,7 +1598,7 @@ const _sfc_main$l = defineComponent({
|
|
|
1559
1598
|
};
|
|
1560
1599
|
}
|
|
1561
1600
|
});
|
|
1562
|
-
const _hoisted_1$
|
|
1601
|
+
const _hoisted_1$a = ["innerHTML"];
|
|
1563
1602
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1564
1603
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1565
1604
|
const _hoisted_4$1 = /* @__PURE__ */ createTextVNode("\u6DFB\u52A0");
|
|
@@ -1588,7 +1627,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1588
1627
|
key: 0,
|
|
1589
1628
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1590
1629
|
innerHTML: _ctx.config.extra
|
|
1591
|
-
}, null, 8, _hoisted_1$
|
|
1630
|
+
}, null, 8, _hoisted_1$a)) : createCommentVNode("", true),
|
|
1592
1631
|
createElementVNode("div", _hoisted_2$2, [
|
|
1593
1632
|
createVNode(_component_el_tooltip, {
|
|
1594
1633
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -2110,13 +2149,13 @@ const _sfc_main$j = defineComponent({
|
|
|
2110
2149
|
};
|
|
2111
2150
|
}
|
|
2112
2151
|
});
|
|
2113
|
-
const _hoisted_1$
|
|
2152
|
+
const _hoisted_1$9 = {
|
|
2114
2153
|
class: "m-cascader",
|
|
2115
2154
|
style: { "width": "100%" }
|
|
2116
2155
|
};
|
|
2117
2156
|
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2118
2157
|
const _component_el_cascader = resolveComponent("el-cascader");
|
|
2119
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2158
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2120
2159
|
createVNode(_component_el_cascader, {
|
|
2121
2160
|
modelValue: _ctx.model[_ctx.name],
|
|
2122
2161
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2156,7 +2195,7 @@ const _sfc_main$i = defineComponent({
|
|
|
2156
2195
|
} else {
|
|
2157
2196
|
return props.config.activeValue;
|
|
2158
2197
|
}
|
|
2159
|
-
return
|
|
2198
|
+
return void 0;
|
|
2160
2199
|
}),
|
|
2161
2200
|
inactiveValue: computed(() => {
|
|
2162
2201
|
if (typeof props.config.inactiveValue === "undefined") {
|
|
@@ -2166,7 +2205,7 @@ const _sfc_main$i = defineComponent({
|
|
|
2166
2205
|
} else {
|
|
2167
2206
|
return props.config.inactiveValue;
|
|
2168
2207
|
}
|
|
2169
|
-
return
|
|
2208
|
+
return void 0;
|
|
2170
2209
|
}),
|
|
2171
2210
|
changeHandler(value) {
|
|
2172
2211
|
emit("change", value);
|
|
@@ -2239,7 +2278,7 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2239
2278
|
}
|
|
2240
2279
|
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$e]]);
|
|
2241
2280
|
|
|
2242
|
-
const _hoisted_1$
|
|
2281
|
+
const _hoisted_1$8 = { key: 0 };
|
|
2243
2282
|
const __default__$2 = defineComponent({
|
|
2244
2283
|
name: "m-fields-color-picker"
|
|
2245
2284
|
});
|
|
@@ -2259,7 +2298,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2259
2298
|
const changeHandler = (value) => emit("change", value);
|
|
2260
2299
|
return (_ctx, _cache) => {
|
|
2261
2300
|
const _component_el_color_picker = resolveComponent("el-color-picker");
|
|
2262
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2301
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
2263
2302
|
createVNode(_component_el_color_picker, {
|
|
2264
2303
|
modelValue: _ctx.model[_ctx.name],
|
|
2265
2304
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2295,10 +2334,10 @@ const _sfc_main$f = defineComponent({
|
|
|
2295
2334
|
};
|
|
2296
2335
|
}
|
|
2297
2336
|
});
|
|
2298
|
-
const _hoisted_1$
|
|
2337
|
+
const _hoisted_1$7 = { key: 0 };
|
|
2299
2338
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2300
2339
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
2301
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2340
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
2302
2341
|
createVNode(_component_el_date_picker, {
|
|
2303
2342
|
modelValue: _ctx.model[_ctx.modelName],
|
|
2304
2343
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.modelName] = $event),
|
|
@@ -2402,10 +2441,10 @@ const _sfc_main$d = defineComponent({
|
|
|
2402
2441
|
};
|
|
2403
2442
|
}
|
|
2404
2443
|
});
|
|
2405
|
-
const _hoisted_1$
|
|
2444
|
+
const _hoisted_1$6 = { key: 0 };
|
|
2406
2445
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2407
2446
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
2408
|
-
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2447
|
+
return _ctx.model ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
2409
2448
|
createVNode(_component_el_date_picker, {
|
|
2410
2449
|
modelValue: _ctx.model[_ctx.name],
|
|
2411
2450
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2422,7 +2461,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2422
2461
|
}
|
|
2423
2462
|
var DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
|
|
2424
2463
|
|
|
2425
|
-
const _hoisted_1$
|
|
2464
|
+
const _hoisted_1$5 = { key: 0 };
|
|
2426
2465
|
const __default__$1 = defineComponent({
|
|
2427
2466
|
name: "m-fields-display"
|
|
2428
2467
|
});
|
|
@@ -2443,7 +2482,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2443
2482
|
}
|
|
2444
2483
|
useAddField(props.prop);
|
|
2445
2484
|
return (_ctx, _cache) => {
|
|
2446
|
-
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2485
|
+
return _ctx.model ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(_ctx.model[unref(n)]), 1)) : createCommentVNode("", true);
|
|
2447
2486
|
};
|
|
2448
2487
|
}
|
|
2449
2488
|
});
|
|
@@ -2513,12 +2552,12 @@ const _sfc_main$b = defineComponent({
|
|
|
2513
2552
|
}
|
|
2514
2553
|
}
|
|
2515
2554
|
});
|
|
2516
|
-
const _hoisted_1$
|
|
2555
|
+
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2517
2556
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2518
2557
|
const _component_el_input = resolveComponent("el-input");
|
|
2519
2558
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
2520
2559
|
const _component_el_form = resolveComponent("el-form");
|
|
2521
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2560
|
+
return openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
2522
2561
|
createVNode(_component_el_form, { size: "small" }, {
|
|
2523
2562
|
default: withCtx(() => [
|
|
2524
2563
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.keys(_ctx.fieldMap.value), (key) => {
|
|
@@ -2640,7 +2679,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
2640
2679
|
};
|
|
2641
2680
|
}
|
|
2642
2681
|
});
|
|
2643
|
-
const _hoisted_1$
|
|
2682
|
+
const _hoisted_1$3 = ["href"];
|
|
2644
2683
|
const _hoisted_2$1 = {
|
|
2645
2684
|
key: 2,
|
|
2646
2685
|
class: "m-fields-link"
|
|
@@ -2654,7 +2693,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2654
2693
|
target: "_blank",
|
|
2655
2694
|
href: _ctx.href,
|
|
2656
2695
|
style: normalizeStyle(_ctx.config.css || {})
|
|
2657
|
-
}, toDisplayString(_ctx.displayText), 13, _hoisted_1$
|
|
2696
|
+
}, toDisplayString(_ctx.displayText), 13, _hoisted_1$3)) : _ctx.config.href && _ctx.disabled ? (openBlock(), createElementBlock("span", {
|
|
2658
2697
|
key: 1,
|
|
2659
2698
|
style: normalizeStyle(_ctx.config.disabledCss || {})
|
|
2660
2699
|
}, toDisplayString(_ctx.displayText), 5)) : (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
@@ -3040,7 +3079,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
3040
3079
|
};
|
|
3041
3080
|
}
|
|
3042
3081
|
});
|
|
3043
|
-
const _hoisted_1$
|
|
3082
|
+
const _hoisted_1$2 = { key: 2 };
|
|
3044
3083
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3045
3084
|
const _component_el_option = resolveComponent("el-option");
|
|
3046
3085
|
const _component_el_option_group = resolveComponent("el-option-group");
|
|
@@ -3093,7 +3132,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3093
3132
|
disabled: option.disabled
|
|
3094
3133
|
}, null, 8, ["label", "value", "disabled"]);
|
|
3095
3134
|
}), 128)),
|
|
3096
|
-
_ctx.moreLoadingVisible ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$
|
|
3135
|
+
_ctx.moreLoadingVisible ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$2, null, 512)), [
|
|
3097
3136
|
[_directive_loading, true]
|
|
3098
3137
|
]) : createCommentVNode("", true)
|
|
3099
3138
|
]),
|
|
@@ -3246,7 +3285,7 @@ const _sfc_main$4 = defineComponent({
|
|
|
3246
3285
|
};
|
|
3247
3286
|
}
|
|
3248
3287
|
});
|
|
3249
|
-
const _hoisted_1$
|
|
3288
|
+
const _hoisted_1$1 = { key: 0 };
|
|
3250
3289
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3251
3290
|
const _component_el_button = resolveComponent("el-button");
|
|
3252
3291
|
const _component_el_input = resolveComponent("el-input");
|
|
@@ -3264,7 +3303,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3264
3303
|
_ctx.config.append ? {
|
|
3265
3304
|
name: "append",
|
|
3266
3305
|
fn: withCtx(() => [
|
|
3267
|
-
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
3306
|
+
typeof _ctx.config.append === "string" ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.config.append), 1)) : createCommentVNode("", true),
|
|
3268
3307
|
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (openBlock(), createBlock(_component_el_button, {
|
|
3269
3308
|
key: 1,
|
|
3270
3309
|
style: { "color": "#409eff" },
|
|
@@ -3314,22 +3353,19 @@ const _sfc_main$3 = defineComponent({
|
|
|
3314
3353
|
};
|
|
3315
3354
|
}
|
|
3316
3355
|
});
|
|
3317
|
-
const _hoisted_1$1 = { key: 0 };
|
|
3318
3356
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3319
3357
|
const _component_el_input = resolveComponent("el-input");
|
|
3320
|
-
return
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"])
|
|
3332
|
-
])) : createCommentVNode("", true);
|
|
3358
|
+
return openBlock(), createBlock(_component_el_input, {
|
|
3359
|
+
modelValue: _ctx.model[_ctx.name],
|
|
3360
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3361
|
+
type: "textarea",
|
|
3362
|
+
size: _ctx.size,
|
|
3363
|
+
clearable: "",
|
|
3364
|
+
placeholder: _ctx.config.placeholder,
|
|
3365
|
+
disabled: _ctx.disabled,
|
|
3366
|
+
onChange: _ctx.changeHandler,
|
|
3367
|
+
onInput: _ctx.inputHandler
|
|
3368
|
+
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
3333
3369
|
}
|
|
3334
3370
|
var Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
3335
3371
|
|
|
@@ -3477,7 +3513,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
3477
3513
|
submitForm: async (native) => {
|
|
3478
3514
|
try {
|
|
3479
3515
|
await elForm.value?.validate();
|
|
3480
|
-
return native ? values.value : cloneDeep(values.value);
|
|
3516
|
+
return native ? values.value : cloneDeep(toRaw(values.value));
|
|
3481
3517
|
} catch (invalidFields) {
|
|
3482
3518
|
const error = [];
|
|
3483
3519
|
Object.entries(invalidFields).forEach(([, ValidateError]) => {
|