@tmagic/form 1.0.6 → 1.1.0-beta.10
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 → tmagic-form.mjs} +225 -190
- package/dist/tmagic-form.mjs.map +1 -0
- package/dist/tmagic-form.umd.js +239 -204
- package/dist/tmagic-form.umd.js.map +1 -1
- package/package.json +17 -16
- package/src/Form.vue +3 -7
- package/src/containers/Container.vue +1 -1
- package/src/containers/GroupListItem.vue +4 -4
- package/src/containers/Panel.vue +1 -1
- package/src/containers/Table.vue +1 -1
- package/src/fields/Cascader.vue +3 -5
- package/src/fields/ColorPicker.vue +19 -26
- package/src/fields/Daterange.vue +73 -52
- package/src/fields/Display.vue +13 -23
- package/src/fields/Hidden.vue +10 -20
- package/src/fields/Select.vue +1 -2
- package/src/fields/Text.vue +6 -4
- package/src/index.ts +4 -4
- package/tsconfig.build.json +13 -0
- package/types/Form.vue.d.ts +125 -0
- package/types/FormDialog.vue.d.ts +300 -0
- package/{dist/types/src → types}/containers/Col.vue.d.ts +4 -4
- package/types/containers/Container.vue.d.ts +70 -0
- package/types/containers/Fieldset.vue.d.ts +118 -0
- package/{dist/types/src → types}/containers/GroupList.vue.d.ts +6 -6
- package/{dist/types/src → types}/containers/GroupListItem.vue.d.ts +15 -15
- package/{dist/types/src → types}/containers/Panel.vue.d.ts +6 -6
- package/{dist/types/src → types}/containers/Row.vue.d.ts +3 -3
- package/{dist/types/src → types}/containers/Step.vue.d.ts +4 -4
- package/types/containers/Table.vue.d.ts +128 -0
- package/{dist/types/src → types}/containers/Tabs.vue.d.ts +11 -7
- package/types/fields/Cascader.vue.d.ts +74 -0
- package/{dist/types/src → types}/fields/Checkbox.vue.d.ts +5 -5
- package/{dist/types/src → types}/fields/CheckboxGroup.vue.d.ts +3 -3
- package/types/fields/ColorPicker.vue.d.ts +100 -0
- package/{dist/types/src → types}/fields/Date.vue.d.ts +3 -3
- package/{dist/types/src → types}/fields/DateTime.vue.d.ts +3 -3
- package/types/fields/Daterange.vue.d.ts +100 -0
- package/types/fields/Display.vue.d.ts +84 -0
- package/{dist/types/src → types}/fields/DynamicField.vue.d.ts +4 -4
- package/types/fields/Hidden.vue.d.ts +84 -0
- package/types/fields/Link.vue.d.ts +686 -0
- package/{dist/types/src → types}/fields/Number.vue.d.ts +3 -3
- package/{dist/types/src → types}/fields/RadioGroup.vue.d.ts +4 -5
- package/types/fields/Select.vue.d.ts +67 -0
- package/types/fields/SelectOptionGroups.vue.d.ts +64 -0
- package/types/fields/SelectOptions.vue.d.ts +68 -0
- package/{dist/types/src → types}/fields/Switch.vue.d.ts +6 -6
- package/{dist/types/src → types}/fields/Text.vue.d.ts +4 -4
- package/{dist/types/src → types}/fields/Textarea.vue.d.ts +10 -4
- package/{dist/types/src → types}/fields/Time.vue.d.ts +8 -4
- package/{dist/types/src → types}/index.d.ts +1 -0
- package/{dist/types/src → types}/schema.d.ts +0 -0
- package/{dist/types/src → types}/utils/config.d.ts +0 -0
- package/types/utils/containerProps.d.ts +26 -0
- package/types/utils/createForm.d.ts +3 -0
- package/{dist/types/src → types}/utils/fieldProps.d.ts +0 -0
- package/{dist/types/src → types}/utils/form.d.ts +0 -0
- package/types/utils/useAddField.d.ts +1 -0
- package/dist/tmagic-form.es.js.map +0 -1
- package/dist/types/src/containers/Container.vue.d.ts +0 -70
- package/dist/types/src/containers/Fieldset.vue.d.ts +0 -79
- package/dist/types/src/containers/Table.vue.d.ts +0 -128
- package/dist/types/src/fields/Daterange.vue.d.ts +0 -57
- package/dist/types/src/fields/Display.vue.d.ts +0 -3
- package/dist/types/src/fields/Hidden.vue.d.ts +0 -3
- package/dist/types/src/fields/SelectOptionGroups.vue.d.ts +0 -13
- package/dist/types/src/fields/SelectOptions.vue.d.ts +0 -21
- package/dist/types/src/shims-vue.d.ts +0 -6
- package/dist/types/src/utils/useAddField.d.ts +0 -1
- package/dist/types/src/vite-env.d.ts +0 -1
- package/src/vite-env.d.ts +0 -1
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons'), require('lodash-es'), require('element-plus'), require('sortablejs'), require('@tmagic/utils')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons', 'lodash-es', 'element-plus', 'sortablejs', '@tmagic/utils'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.Vue, global.
|
|
5
|
-
})(this, (function (exports, vue,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons-vue'), require('lodash-es'), require('element-plus'), require('sortablejs'), require('@tmagic/utils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', 'lodash-es', 'element-plus', 'sortablejs', '@tmagic/utils'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.Vue, global.iconsVue, global.lodashEs, global.ElementPlus, global.Sortable, global.utils));
|
|
5
|
+
})(this, (function (exports, vue, iconsVue, lodashEs, elementPlus, Sortable, utils) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const Sortable__default = /*#__PURE__*/_interopDefaultLegacy(Sortable);
|
|
10
10
|
|
|
11
11
|
const isTableSelect = (type) => typeof type === "string" && ["table-select", "tableSelect"].includes(type);
|
|
12
12
|
const asyncLoadConfig = (value, initValue2, { asyncLoad, name, type }) => {
|
|
@@ -161,17 +161,9 @@
|
|
|
161
161
|
return valuesTmp || {};
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
const target = sfc.__vccOpts || sfc;
|
|
166
|
-
for (const [key, val] of props) {
|
|
167
|
-
target[key] = val;
|
|
168
|
-
}
|
|
169
|
-
return target;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
const _sfc_main$v = vue.defineComponent({
|
|
164
|
+
const _sfc_main$u = vue.defineComponent({
|
|
173
165
|
name: "m-form-container",
|
|
174
|
-
components: { WarningFilled:
|
|
166
|
+
components: { WarningFilled: iconsVue.WarningFilled },
|
|
175
167
|
props: {
|
|
176
168
|
labelWidth: String,
|
|
177
169
|
expandMore: Boolean,
|
|
@@ -314,7 +306,16 @@
|
|
|
314
306
|
};
|
|
315
307
|
}
|
|
316
308
|
});
|
|
317
|
-
|
|
309
|
+
|
|
310
|
+
const _export_sfc = (sfc, props) => {
|
|
311
|
+
const target = sfc.__vccOpts || sfc;
|
|
312
|
+
for (const [key, val] of props) {
|
|
313
|
+
target[key] = val;
|
|
314
|
+
}
|
|
315
|
+
return target;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
const _hoisted_1$c = ["innerHTML"];
|
|
318
319
|
const _hoisted_2$7 = ["innerHTML"];
|
|
319
320
|
const _hoisted_3$7 = ["innerHTML"];
|
|
320
321
|
const _hoisted_4$6 = ["innerHTML"];
|
|
@@ -322,7 +323,7 @@
|
|
|
322
323
|
key: 4,
|
|
323
324
|
style: { "text-align": "center" }
|
|
324
325
|
};
|
|
325
|
-
function _sfc_render$
|
|
326
|
+
function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
326
327
|
const _component_m_fields_hidden = vue.resolveComponent("m-fields-hidden");
|
|
327
328
|
const _component_el_tooltip = vue.resolveComponent("el-tooltip");
|
|
328
329
|
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
@@ -364,7 +365,7 @@
|
|
|
364
365
|
label: vue.withCtx(() => [
|
|
365
366
|
vue.createElementVNode("span", {
|
|
366
367
|
innerHTML: _ctx.type === "checkbox" ? "" : _ctx.config.text
|
|
367
|
-
}, null, 8, _hoisted_1$
|
|
368
|
+
}, null, 8, _hoisted_1$c)
|
|
368
369
|
]),
|
|
369
370
|
default: vue.withCtx(() => [
|
|
370
371
|
_ctx.tooltip ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, { key: 0 }, {
|
|
@@ -449,9 +450,9 @@
|
|
|
449
450
|
])) : vue.createCommentVNode("", true)
|
|
450
451
|
], 6)) : vue.createCommentVNode("", true);
|
|
451
452
|
}
|
|
452
|
-
|
|
453
|
+
const Container = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$o]]);
|
|
453
454
|
|
|
454
|
-
const _hoisted_1$
|
|
455
|
+
const _hoisted_1$b = ["innerHTML"];
|
|
455
456
|
const _hoisted_2$6 = ["innerHTML"];
|
|
456
457
|
const _hoisted_3$6 = { key: 1 };
|
|
457
458
|
const _hoisted_4$5 = ["innerHTML"];
|
|
@@ -462,7 +463,7 @@
|
|
|
462
463
|
};
|
|
463
464
|
const _hoisted_7$2 = { style: { "flex": "1" } };
|
|
464
465
|
const _hoisted_8$1 = ["src"];
|
|
465
|
-
const _sfc_main$
|
|
466
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
466
467
|
__name: "Fieldset",
|
|
467
468
|
props: {
|
|
468
469
|
labelWidth: null,
|
|
@@ -518,7 +519,7 @@
|
|
|
518
519
|
default: vue.withCtx(() => [
|
|
519
520
|
vue.createElementVNode("span", {
|
|
520
521
|
innerHTML: __props.config.legend
|
|
521
|
-
}, null, 8, _hoisted_1$
|
|
522
|
+
}, null, 8, _hoisted_1$b),
|
|
522
523
|
__props.config.extra ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
523
524
|
key: 0,
|
|
524
525
|
innerHTML: __props.config.extra,
|
|
@@ -575,9 +576,9 @@
|
|
|
575
576
|
}
|
|
576
577
|
});
|
|
577
578
|
|
|
578
|
-
const _sfc_main$
|
|
579
|
+
const _sfc_main$s = vue.defineComponent({
|
|
579
580
|
name: "m-form-group-list-item",
|
|
580
|
-
components: { CaretRight:
|
|
581
|
+
components: { CaretBottom: iconsVue.CaretBottom, CaretRight: iconsVue.CaretRight, CaretTop: iconsVue.CaretTop },
|
|
581
582
|
props: {
|
|
582
583
|
labelWidth: String,
|
|
583
584
|
model: {
|
|
@@ -655,30 +656,30 @@
|
|
|
655
656
|
rowConfig,
|
|
656
657
|
changeHandler,
|
|
657
658
|
length,
|
|
658
|
-
Delete:
|
|
659
|
+
Delete: iconsVue.Delete
|
|
659
660
|
};
|
|
660
661
|
}
|
|
661
662
|
});
|
|
662
|
-
|
|
663
|
+
|
|
664
|
+
const _hoisted_1$a = { class: "m-fields-group-list-item" };
|
|
663
665
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
|
|
664
666
|
const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
|
|
665
667
|
const _hoisted_4$4 = ["innerHTML"];
|
|
666
|
-
function _sfc_render$
|
|
667
|
-
const
|
|
668
|
-
const
|
|
668
|
+
function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
669
|
+
const _component_CaretBottom = vue.resolveComponent("CaretBottom");
|
|
670
|
+
const _component_CaretRight = vue.resolveComponent("CaretRight");
|
|
669
671
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
670
672
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
671
|
-
const
|
|
672
|
-
const _component_CaretBottom = vue.resolveComponent("CaretBottom");
|
|
673
|
+
const _component_CaretTop = vue.resolveComponent("CaretTop");
|
|
673
674
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
674
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
675
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
675
676
|
vue.createElementVNode("div", null, [
|
|
676
677
|
vue.createVNode(_component_el_icon, {
|
|
677
678
|
style: { "margin-right": "7px" },
|
|
678
679
|
onClick: _ctx.expandHandler
|
|
679
680
|
}, {
|
|
680
681
|
default: vue.withCtx(() => [
|
|
681
|
-
_ctx.expand ? (vue.openBlock(), vue.createBlock(
|
|
682
|
+
_ctx.expand ? (vue.openBlock(), vue.createBlock(_component_CaretBottom, { key: 0 })) : (vue.openBlock(), vue.createBlock(_component_CaretRight, { key: 1 }))
|
|
682
683
|
]),
|
|
683
684
|
_: 1
|
|
684
685
|
}, 8, ["onClick"]),
|
|
@@ -709,7 +710,7 @@
|
|
|
709
710
|
_hoisted_2$5,
|
|
710
711
|
vue.createVNode(_component_el_icon, null, {
|
|
711
712
|
default: vue.withCtx(() => [
|
|
712
|
-
vue.createVNode(
|
|
713
|
+
vue.createVNode(_component_CaretTop)
|
|
713
714
|
]),
|
|
714
715
|
_: 1
|
|
715
716
|
})
|
|
@@ -754,9 +755,9 @@
|
|
|
754
755
|
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "onChange"])) : vue.createCommentVNode("", true)
|
|
755
756
|
]);
|
|
756
757
|
}
|
|
757
|
-
|
|
758
|
+
const MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$n]]);
|
|
758
759
|
|
|
759
|
-
const _sfc_main$
|
|
760
|
+
const _sfc_main$r = vue.defineComponent({
|
|
760
761
|
name: "m-form-group-list",
|
|
761
762
|
components: { MFieldsGroupListItem },
|
|
762
763
|
props: {
|
|
@@ -852,7 +853,8 @@
|
|
|
852
853
|
};
|
|
853
854
|
}
|
|
854
855
|
});
|
|
855
|
-
|
|
856
|
+
|
|
857
|
+
const _hoisted_1$9 = { class: "m-fields-group-list" };
|
|
856
858
|
const _hoisted_2$4 = ["innerHTML"];
|
|
857
859
|
const _hoisted_3$4 = {
|
|
858
860
|
key: 1,
|
|
@@ -864,10 +866,10 @@
|
|
|
864
866
|
];
|
|
865
867
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
866
868
|
const _hoisted_7$1 = /* @__PURE__ */ vue.createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
|
|
867
|
-
function _sfc_render$
|
|
869
|
+
function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
868
870
|
const _component_m_fields_group_list_item = vue.resolveComponent("m-fields-group-list-item");
|
|
869
871
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
870
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
872
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
871
873
|
_ctx.config.extra ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
872
874
|
key: 0,
|
|
873
875
|
innerHTML: _ctx.config.extra,
|
|
@@ -911,11 +913,11 @@
|
|
|
911
913
|
}, 8, ["onClick"])) : vue.createCommentVNode("", true)
|
|
912
914
|
]);
|
|
913
915
|
}
|
|
914
|
-
|
|
916
|
+
const GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$m]]);
|
|
915
917
|
|
|
916
|
-
const _sfc_main$
|
|
918
|
+
const _sfc_main$q = vue.defineComponent({
|
|
917
919
|
name: "m-form-panel",
|
|
918
|
-
components: { CaretBottom:
|
|
920
|
+
components: { CaretBottom: iconsVue.CaretBottom, CaretRight: iconsVue.CaretRight },
|
|
919
921
|
props: {
|
|
920
922
|
labelWidth: String,
|
|
921
923
|
model: {
|
|
@@ -946,7 +948,8 @@
|
|
|
946
948
|
};
|
|
947
949
|
}
|
|
948
950
|
});
|
|
949
|
-
|
|
951
|
+
|
|
952
|
+
const _hoisted_1$8 = { class: "clearfix" };
|
|
950
953
|
const _hoisted_2$3 = ["innerHTML"];
|
|
951
954
|
const _hoisted_3$3 = {
|
|
952
955
|
key: 0,
|
|
@@ -954,7 +957,7 @@
|
|
|
954
957
|
};
|
|
955
958
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
956
959
|
const _hoisted_5$1 = ["src"];
|
|
957
|
-
function _sfc_render$
|
|
960
|
+
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
958
961
|
const _component_caret_bottom = vue.resolveComponent("caret-bottom");
|
|
959
962
|
const _component_caret_right = vue.resolveComponent("caret-right");
|
|
960
963
|
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
@@ -966,7 +969,7 @@
|
|
|
966
969
|
"body-style": { display: _ctx.expand ? "block" : "none" }
|
|
967
970
|
}, {
|
|
968
971
|
header: vue.withCtx(() => [
|
|
969
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
972
|
+
vue.createElementVNode("div", _hoisted_1$8, [
|
|
970
973
|
vue.createElementVNode("a", {
|
|
971
974
|
href: "javascript:",
|
|
972
975
|
style: { "width": "100%", "display": "block" },
|
|
@@ -1024,9 +1027,9 @@
|
|
|
1024
1027
|
_: 3
|
|
1025
1028
|
}, 8, ["body-style"])) : vue.createCommentVNode("", true);
|
|
1026
1029
|
}
|
|
1027
|
-
|
|
1030
|
+
const Panel = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$l]]);
|
|
1028
1031
|
|
|
1029
|
-
const _sfc_main$
|
|
1032
|
+
const _sfc_main$p = vue.defineComponent({
|
|
1030
1033
|
props: {
|
|
1031
1034
|
labelWidth: String,
|
|
1032
1035
|
expandMore: Boolean,
|
|
@@ -1053,7 +1056,8 @@
|
|
|
1053
1056
|
};
|
|
1054
1057
|
}
|
|
1055
1058
|
});
|
|
1056
|
-
|
|
1059
|
+
|
|
1060
|
+
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1057
1061
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
1058
1062
|
const _component_el_col = vue.resolveComponent("el-col");
|
|
1059
1063
|
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_col, { span: _ctx.span }, {
|
|
@@ -1073,9 +1077,9 @@
|
|
|
1073
1077
|
[vue.vShow, _ctx.display && _ctx.config.type !== "hidden"]
|
|
1074
1078
|
]);
|
|
1075
1079
|
}
|
|
1076
|
-
|
|
1080
|
+
const Col = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$k]]);
|
|
1077
1081
|
|
|
1078
|
-
const _sfc_main$
|
|
1082
|
+
const _sfc_main$o = vue.defineComponent({
|
|
1079
1083
|
name: "m-form-row",
|
|
1080
1084
|
components: { Col },
|
|
1081
1085
|
props: {
|
|
@@ -1103,7 +1107,8 @@
|
|
|
1103
1107
|
};
|
|
1104
1108
|
}
|
|
1105
1109
|
});
|
|
1106
|
-
|
|
1110
|
+
|
|
1111
|
+
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1107
1112
|
const _component_Col = vue.resolveComponent("Col");
|
|
1108
1113
|
const _component_el_row = vue.resolveComponent("el-row");
|
|
1109
1114
|
return vue.openBlock(), vue.createBlock(_component_el_row, { gutter: 10 }, {
|
|
@@ -1125,9 +1130,9 @@
|
|
|
1125
1130
|
_: 1
|
|
1126
1131
|
});
|
|
1127
1132
|
}
|
|
1128
|
-
|
|
1133
|
+
const Row = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$j]]);
|
|
1129
1134
|
|
|
1130
|
-
const _sfc_main$
|
|
1135
|
+
const _sfc_main$n = vue.defineComponent({
|
|
1131
1136
|
name: "m-form-step",
|
|
1132
1137
|
props: {
|
|
1133
1138
|
model: {
|
|
@@ -1162,7 +1167,8 @@
|
|
|
1162
1167
|
return { mForm, active, stepClick, changeHandler };
|
|
1163
1168
|
}
|
|
1164
1169
|
});
|
|
1165
|
-
|
|
1170
|
+
|
|
1171
|
+
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1166
1172
|
const _component_el_step = vue.resolveComponent("el-step");
|
|
1167
1173
|
const _component_el_steps = vue.resolveComponent("el-steps");
|
|
1168
1174
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
@@ -1205,11 +1211,11 @@
|
|
|
1205
1211
|
}), 256))
|
|
1206
1212
|
]);
|
|
1207
1213
|
}
|
|
1208
|
-
|
|
1214
|
+
const MStep = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$i]]);
|
|
1209
1215
|
|
|
1210
1216
|
let loadedAMapJS = false;
|
|
1211
1217
|
let firstLoadingAMapJS = true;
|
|
1212
|
-
const _sfc_main$
|
|
1218
|
+
const _sfc_main$m = vue.defineComponent({
|
|
1213
1219
|
name: "m-form-table",
|
|
1214
1220
|
props: {
|
|
1215
1221
|
name: {
|
|
@@ -1285,7 +1291,7 @@
|
|
|
1285
1291
|
const tableEl = elTable.value?.$el;
|
|
1286
1292
|
if (tableEl?.querySelectorAll(".el-table__body > tbody")) {
|
|
1287
1293
|
const el = tableEl.querySelectorAll(".el-table__body > tbody")[0];
|
|
1288
|
-
const sortable = Sortable__default
|
|
1294
|
+
const sortable = Sortable__default.default.create(el, {
|
|
1289
1295
|
onEnd: ({ newIndex, oldIndex }) => {
|
|
1290
1296
|
if (typeof newIndex === "undefined")
|
|
1291
1297
|
return;
|
|
@@ -1390,11 +1396,11 @@
|
|
|
1390
1396
|
excelBtn,
|
|
1391
1397
|
modelName,
|
|
1392
1398
|
updateKey,
|
|
1393
|
-
ArrowDown:
|
|
1394
|
-
ArrowUp:
|
|
1395
|
-
Delete:
|
|
1396
|
-
FullScreen:
|
|
1397
|
-
Grid:
|
|
1399
|
+
ArrowDown: iconsVue.ArrowDown,
|
|
1400
|
+
ArrowUp: iconsVue.ArrowUp,
|
|
1401
|
+
Delete: iconsVue.Delete,
|
|
1402
|
+
FullScreen: iconsVue.FullScreen,
|
|
1403
|
+
Grid: iconsVue.Grid,
|
|
1398
1404
|
data: vue.computed(() => props.model[modelName.value].filter((item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value)),
|
|
1399
1405
|
addable: vue.computed(() => {
|
|
1400
1406
|
if (!props.model[modelName.value].length) {
|
|
@@ -1578,7 +1584,8 @@
|
|
|
1578
1584
|
};
|
|
1579
1585
|
}
|
|
1580
1586
|
});
|
|
1581
|
-
|
|
1587
|
+
|
|
1588
|
+
const _hoisted_1$7 = ["innerHTML"];
|
|
1582
1589
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1583
1590
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1584
1591
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
@@ -1591,7 +1598,7 @@
|
|
|
1591
1598
|
class: "bottom",
|
|
1592
1599
|
style: { "text-align": "right" }
|
|
1593
1600
|
};
|
|
1594
|
-
function _sfc_render$
|
|
1601
|
+
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1595
1602
|
const _component_el_table_column = vue.resolveComponent("el-table-column");
|
|
1596
1603
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
1597
1604
|
const _component_el_tooltip = vue.resolveComponent("el-tooltip");
|
|
@@ -1607,7 +1614,7 @@
|
|
|
1607
1614
|
key: 0,
|
|
1608
1615
|
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
1609
1616
|
innerHTML: _ctx.config.extra
|
|
1610
|
-
}, null, 8, _hoisted_1$
|
|
1617
|
+
}, null, 8, _hoisted_1$7)) : vue.createCommentVNode("", true),
|
|
1611
1618
|
vue.createElementVNode("div", _hoisted_2$2, [
|
|
1612
1619
|
vue.createVNode(_component_el_tooltip, {
|
|
1613
1620
|
content: "\u62D6\u62FD\u53EF\u6392\u5E8F",
|
|
@@ -1840,7 +1847,7 @@
|
|
|
1840
1847
|
])
|
|
1841
1848
|
], 2);
|
|
1842
1849
|
}
|
|
1843
|
-
|
|
1850
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$h]]);
|
|
1844
1851
|
|
|
1845
1852
|
const getActive = (mForm, props, activeTabName) => {
|
|
1846
1853
|
const { config, model, prop } = props;
|
|
@@ -1959,8 +1966,8 @@
|
|
|
1959
1966
|
};
|
|
1960
1967
|
}
|
|
1961
1968
|
});
|
|
1962
|
-
|
|
1963
|
-
function _sfc_render$
|
|
1969
|
+
|
|
1970
|
+
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1964
1971
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
1965
1972
|
const _component_el_tab_pane = vue.resolveComponent("el-tab-pane");
|
|
1966
1973
|
const _component_el_tabs = vue.resolveComponent("el-tabs");
|
|
@@ -2006,7 +2013,7 @@
|
|
|
2006
2013
|
_: 1
|
|
2007
2014
|
}, 8, ["modelValue", "class", "type", "editable", "tab-position", "onTabClick", "onTabAdd", "onTabRemove"]);
|
|
2008
2015
|
}
|
|
2009
|
-
|
|
2016
|
+
const Tabs = /* @__PURE__ */ _export_sfc(Tab, [["render", _sfc_render$g]]);
|
|
2010
2017
|
|
|
2011
2018
|
let $MAGIC_FORM = {};
|
|
2012
2019
|
const setConfig = (option) => {
|
|
@@ -2014,7 +2021,7 @@
|
|
|
2014
2021
|
};
|
|
2015
2022
|
const getConfig = (key) => $MAGIC_FORM[key];
|
|
2016
2023
|
|
|
2017
|
-
|
|
2024
|
+
const fieldProps = {
|
|
2018
2025
|
model: {
|
|
2019
2026
|
type: Object,
|
|
2020
2027
|
required: true,
|
|
@@ -2065,8 +2072,8 @@
|
|
|
2065
2072
|
const vm = vue.getCurrentInstance();
|
|
2066
2073
|
useAddField(props.prop);
|
|
2067
2074
|
const requestFunc = getConfig("request");
|
|
2068
|
-
const cascader = vue.ref(
|
|
2069
|
-
const dialog = vue.ref(
|
|
2075
|
+
const cascader = vue.ref();
|
|
2076
|
+
const dialog = vue.ref();
|
|
2070
2077
|
const options = Array.isArray(props.config.options) ? vue.ref(props.config.options) : vue.ref([]);
|
|
2071
2078
|
const remoteData = vue.ref(null);
|
|
2072
2079
|
const setRemoteOptions = async function() {
|
|
@@ -2143,13 +2150,14 @@
|
|
|
2143
2150
|
};
|
|
2144
2151
|
}
|
|
2145
2152
|
});
|
|
2146
|
-
|
|
2153
|
+
|
|
2154
|
+
const _hoisted_1$6 = {
|
|
2147
2155
|
class: "m-cascader",
|
|
2148
2156
|
style: { "width": "100%" }
|
|
2149
2157
|
};
|
|
2150
|
-
function _sfc_render$
|
|
2158
|
+
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2151
2159
|
const _component_el_cascader = vue.resolveComponent("el-cascader");
|
|
2152
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2160
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
|
|
2153
2161
|
vue.createVNode(_component_el_cascader, {
|
|
2154
2162
|
modelValue: _ctx.model[_ctx.name],
|
|
2155
2163
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
@@ -2166,7 +2174,7 @@
|
|
|
2166
2174
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "options", "props", "onChange"])
|
|
2167
2175
|
]);
|
|
2168
2176
|
}
|
|
2169
|
-
|
|
2177
|
+
const Cascader = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$f]]);
|
|
2170
2178
|
|
|
2171
2179
|
const _sfc_main$k = vue.defineComponent({
|
|
2172
2180
|
name: "m-fields-checkbox",
|
|
@@ -2207,7 +2215,8 @@
|
|
|
2207
2215
|
};
|
|
2208
2216
|
}
|
|
2209
2217
|
});
|
|
2210
|
-
|
|
2218
|
+
|
|
2219
|
+
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2211
2220
|
const _component_el_checkbox = vue.resolveComponent("el-checkbox");
|
|
2212
2221
|
return vue.openBlock(), vue.createBlock(_component_el_checkbox, {
|
|
2213
2222
|
modelValue: _ctx.model[_ctx.name],
|
|
@@ -2220,7 +2229,7 @@
|
|
|
2220
2229
|
onChange: _ctx.changeHandler
|
|
2221
2230
|
}, null, 8, ["modelValue", "size", "trueLabel", "falseLabel", "disabled", "label", "onChange"]);
|
|
2222
2231
|
}
|
|
2223
|
-
|
|
2232
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$e]]);
|
|
2224
2233
|
|
|
2225
2234
|
const _sfc_main$j = vue.defineComponent({
|
|
2226
2235
|
name: "m-fields-checkbox-group",
|
|
@@ -2244,7 +2253,8 @@
|
|
|
2244
2253
|
};
|
|
2245
2254
|
}
|
|
2246
2255
|
});
|
|
2247
|
-
|
|
2256
|
+
|
|
2257
|
+
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2248
2258
|
const _component_el_checkbox = vue.resolveComponent("el-checkbox");
|
|
2249
2259
|
const _component_el_checkbox_group = vue.resolveComponent("el-checkbox-group");
|
|
2250
2260
|
return vue.openBlock(), vue.createBlock(_component_el_checkbox_group, {
|
|
@@ -2270,20 +2280,19 @@
|
|
|
2270
2280
|
_: 1
|
|
2271
2281
|
}, 8, ["modelValue", "size", "disabled", "onChange"]);
|
|
2272
2282
|
}
|
|
2273
|
-
|
|
2283
|
+
const CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$d]]);
|
|
2274
2284
|
|
|
2275
|
-
const _hoisted_1$6 = { key: 0 };
|
|
2276
|
-
const __default__$2 = vue.defineComponent({
|
|
2277
|
-
name: "m-fields-color-picker"
|
|
2278
|
-
});
|
|
2279
2285
|
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
2280
|
-
|
|
2286
|
+
__name: "ColorPicker",
|
|
2281
2287
|
props: {
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2288
|
+
config: null,
|
|
2289
|
+
model: null,
|
|
2290
|
+
initValues: null,
|
|
2291
|
+
values: null,
|
|
2292
|
+
name: null,
|
|
2293
|
+
prop: null,
|
|
2294
|
+
disabled: { type: Boolean },
|
|
2295
|
+
size: null
|
|
2287
2296
|
},
|
|
2288
2297
|
emits: ["change"],
|
|
2289
2298
|
setup(__props, { emit }) {
|
|
@@ -2292,16 +2301,14 @@
|
|
|
2292
2301
|
const changeHandler = (value) => emit("change", value);
|
|
2293
2302
|
return (_ctx, _cache) => {
|
|
2294
2303
|
const _component_el_color_picker = vue.resolveComponent("el-color-picker");
|
|
2295
|
-
return
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
}, null, 8, ["modelValue", "size", "disabled"])
|
|
2304
|
-
])) : vue.createCommentVNode("", true);
|
|
2304
|
+
return vue.openBlock(), vue.createBlock(_component_el_color_picker, {
|
|
2305
|
+
modelValue: __props.model[__props.name],
|
|
2306
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
|
|
2307
|
+
size: __props.size,
|
|
2308
|
+
disabled: __props.disabled,
|
|
2309
|
+
showAlpha: true,
|
|
2310
|
+
onChange: changeHandler
|
|
2311
|
+
}, null, 8, ["modelValue", "size", "disabled"]);
|
|
2305
2312
|
};
|
|
2306
2313
|
}
|
|
2307
2314
|
});
|
|
@@ -2326,7 +2333,8 @@
|
|
|
2326
2333
|
};
|
|
2327
2334
|
}
|
|
2328
2335
|
});
|
|
2329
|
-
|
|
2336
|
+
|
|
2337
|
+
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2330
2338
|
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2331
2339
|
return vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
2332
2340
|
modelValue: _ctx.model[_ctx.name],
|
|
@@ -2340,74 +2348,95 @@
|
|
|
2340
2348
|
onChange: _ctx.changeHandler
|
|
2341
2349
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"]);
|
|
2342
2350
|
}
|
|
2343
|
-
|
|
2351
|
+
const Date$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$c]]);
|
|
2344
2352
|
|
|
2345
|
-
const _sfc_main$g = vue.defineComponent({
|
|
2346
|
-
|
|
2353
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2354
|
+
__name: "Daterange",
|
|
2347
2355
|
props: {
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2356
|
+
config: null,
|
|
2357
|
+
model: null,
|
|
2358
|
+
initValues: null,
|
|
2359
|
+
values: null,
|
|
2360
|
+
name: null,
|
|
2361
|
+
prop: null,
|
|
2362
|
+
disabled: { type: Boolean },
|
|
2363
|
+
size: null
|
|
2353
2364
|
},
|
|
2354
2365
|
emits: ["change"],
|
|
2355
|
-
setup(
|
|
2366
|
+
setup(__props, { emit }) {
|
|
2367
|
+
const props = __props;
|
|
2356
2368
|
useAddField(props.prop);
|
|
2357
2369
|
const { names } = props.config;
|
|
2358
2370
|
const value = vue.ref([]);
|
|
2359
2371
|
if (props.model !== void 0) {
|
|
2360
2372
|
if (names?.length) {
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
const setValue = (v) => {
|
|
2367
|
-
if (names?.length && v instanceof Array) {
|
|
2368
|
-
names.forEach((item, index) => {
|
|
2369
|
-
if (props.model) {
|
|
2370
|
-
props.model[item] = utils.datetimeFormatter(v[index].toString(), "");
|
|
2373
|
+
vue.watch([() => props.model[names[0]], () => props.model[names[1]]], ([start, end], [preStart, preEnd]) => {
|
|
2374
|
+
if (!value.value) {
|
|
2375
|
+
value.value = [];
|
|
2371
2376
|
}
|
|
2377
|
+
if (!start || !end)
|
|
2378
|
+
value.value = [];
|
|
2379
|
+
if (start !== preStart)
|
|
2380
|
+
value.value[0] = new Date(start);
|
|
2381
|
+
if (end !== preEnd)
|
|
2382
|
+
value.value[1] = new Date(end);
|
|
2383
|
+
}, {
|
|
2384
|
+
immediate: true
|
|
2372
2385
|
});
|
|
2373
|
-
} else if (props.
|
|
2374
|
-
props.model[props.name]
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
}
|
|
2386
|
+
} else if (props.name && props.model[props.name]) {
|
|
2387
|
+
vue.watch(() => props.model[props.name], (start, preStart) => {
|
|
2388
|
+
if (start !== preStart)
|
|
2389
|
+
value.value = start.map((item) => item ? new Date(item) : void 0);
|
|
2390
|
+
}, {
|
|
2391
|
+
immediate: true
|
|
2380
2392
|
});
|
|
2381
|
-
} else if (props.name) {
|
|
2382
|
-
props.model[props.name] = void 0;
|
|
2383
2393
|
}
|
|
2394
|
+
}
|
|
2395
|
+
const setValue = (v) => {
|
|
2396
|
+
names?.forEach((item, index) => {
|
|
2397
|
+
if (!props.model) {
|
|
2398
|
+
return;
|
|
2399
|
+
}
|
|
2400
|
+
if (Array.isArray(v)) {
|
|
2401
|
+
props.model[item] = utils.datetimeFormatter(v[index]?.toString(), "");
|
|
2402
|
+
} else {
|
|
2403
|
+
props.model[item] = void 0;
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2384
2406
|
};
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2407
|
+
const changeHandler = (v) => {
|
|
2408
|
+
const value2 = v || [];
|
|
2409
|
+
if (props.name) {
|
|
2410
|
+
emit("change", value2.map((item) => {
|
|
2411
|
+
if (item)
|
|
2412
|
+
return utils.datetimeFormatter(item, "");
|
|
2413
|
+
return void 0;
|
|
2414
|
+
}));
|
|
2415
|
+
} else {
|
|
2416
|
+
if (names?.length) {
|
|
2417
|
+
setValue(value2);
|
|
2418
|
+
}
|
|
2419
|
+
emit("change", value2);
|
|
2390
2420
|
}
|
|
2391
2421
|
};
|
|
2422
|
+
return (_ctx, _cache) => {
|
|
2423
|
+
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2424
|
+
return vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
2425
|
+
modelValue: value.value,
|
|
2426
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
2427
|
+
type: "datetimerange",
|
|
2428
|
+
"range-separator": "-",
|
|
2429
|
+
"start-placeholder": "\u5F00\u59CB\u65E5\u671F",
|
|
2430
|
+
"end-placeholder": "\u7ED3\u675F\u65E5\u671F",
|
|
2431
|
+
size: __props.size,
|
|
2432
|
+
"unlink-panels": true,
|
|
2433
|
+
disabled: __props.disabled,
|
|
2434
|
+
"default-time": __props.config.defaultTime,
|
|
2435
|
+
onChange: changeHandler
|
|
2436
|
+
}, null, 8, ["modelValue", "size", "disabled", "default-time"]);
|
|
2437
|
+
};
|
|
2392
2438
|
}
|
|
2393
2439
|
});
|
|
2394
|
-
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2395
|
-
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2396
|
-
return vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
2397
|
-
modelValue: _ctx.value,
|
|
2398
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value = $event),
|
|
2399
|
-
type: "datetimerange",
|
|
2400
|
-
"range-separator": "-",
|
|
2401
|
-
"start-placeholder": "\u5F00\u59CB\u65E5\u671F",
|
|
2402
|
-
"end-placeholder": "\u7ED3\u675F\u65E5\u671F",
|
|
2403
|
-
size: _ctx.size,
|
|
2404
|
-
"unlink-panels": true,
|
|
2405
|
-
disabled: _ctx.disabled,
|
|
2406
|
-
"default-time": _ctx.config.defaultTime,
|
|
2407
|
-
onChange: _ctx.changeHandler
|
|
2408
|
-
}, null, 8, ["modelValue", "size", "disabled", "default-time", "onChange"]);
|
|
2409
|
-
}
|
|
2410
|
-
var Daterange = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$c]]);
|
|
2411
2440
|
|
|
2412
2441
|
const _sfc_main$f = vue.defineComponent({
|
|
2413
2442
|
name: "m-fields-datetime",
|
|
@@ -2437,6 +2466,7 @@
|
|
|
2437
2466
|
};
|
|
2438
2467
|
}
|
|
2439
2468
|
});
|
|
2469
|
+
|
|
2440
2470
|
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2441
2471
|
const _component_el_date_picker = vue.resolveComponent("el-date-picker");
|
|
2442
2472
|
return vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
@@ -2453,30 +2483,27 @@
|
|
|
2453
2483
|
onChange: _ctx.changeHandler
|
|
2454
2484
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "default-time", "onChange"]);
|
|
2455
2485
|
}
|
|
2456
|
-
|
|
2486
|
+
const DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$b]]);
|
|
2457
2487
|
|
|
2458
2488
|
const _hoisted_1$5 = { key: 0 };
|
|
2459
|
-
const __default__$1 = vue.defineComponent({
|
|
2460
|
-
name: "m-fields-display"
|
|
2461
|
-
});
|
|
2462
2489
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
2463
|
-
|
|
2490
|
+
__name: "Display",
|
|
2464
2491
|
props: {
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2492
|
+
config: null,
|
|
2493
|
+
model: null,
|
|
2494
|
+
initValues: null,
|
|
2495
|
+
values: null,
|
|
2496
|
+
name: null,
|
|
2497
|
+
prop: null
|
|
2470
2498
|
},
|
|
2471
2499
|
setup(__props) {
|
|
2472
2500
|
const props = __props;
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
props.model[n.value] = props.config.initValue;
|
|
2501
|
+
if (props.config.initValue && props.model) {
|
|
2502
|
+
props.model[props.name] = props.config.initValue;
|
|
2476
2503
|
}
|
|
2477
2504
|
useAddField(props.prop);
|
|
2478
2505
|
return (_ctx, _cache) => {
|
|
2479
|
-
return
|
|
2506
|
+
return __props.model ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$5, vue.toDisplayString(__props.model[__props.name]), 1)) : vue.createCommentVNode("", true);
|
|
2480
2507
|
};
|
|
2481
2508
|
}
|
|
2482
2509
|
});
|
|
@@ -2546,6 +2573,7 @@
|
|
|
2546
2573
|
}
|
|
2547
2574
|
}
|
|
2548
2575
|
});
|
|
2576
|
+
|
|
2549
2577
|
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2550
2578
|
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2551
2579
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
@@ -2575,31 +2603,28 @@
|
|
|
2575
2603
|
})
|
|
2576
2604
|
]);
|
|
2577
2605
|
}
|
|
2578
|
-
|
|
2606
|
+
const DynamicField = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$a]]);
|
|
2579
2607
|
|
|
2580
|
-
const __default__ = vue.defineComponent({
|
|
2581
|
-
name: "m-fields-hidden"
|
|
2582
|
-
});
|
|
2583
2608
|
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
2584
|
-
|
|
2609
|
+
__name: "Hidden",
|
|
2585
2610
|
props: {
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2611
|
+
config: null,
|
|
2612
|
+
model: null,
|
|
2613
|
+
initValues: null,
|
|
2614
|
+
values: null,
|
|
2615
|
+
name: null,
|
|
2616
|
+
prop: null
|
|
2591
2617
|
},
|
|
2592
2618
|
setup(__props) {
|
|
2593
2619
|
const props = __props;
|
|
2594
|
-
const n = vue.computed(() => props.name || props.config.name || "");
|
|
2595
2620
|
useAddField(props.prop);
|
|
2596
2621
|
return (_ctx, _cache) => {
|
|
2597
|
-
return
|
|
2622
|
+
return __props.model ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
2598
2623
|
key: 0,
|
|
2599
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
2624
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
|
|
2600
2625
|
type: "hidden"
|
|
2601
2626
|
}, null, 512)), [
|
|
2602
|
-
[vue.vModelText,
|
|
2627
|
+
[vue.vModelText, __props.model[__props.name]]
|
|
2603
2628
|
]) : vue.createCommentVNode("", true);
|
|
2604
2629
|
};
|
|
2605
2630
|
}
|
|
@@ -2673,6 +2698,7 @@
|
|
|
2673
2698
|
};
|
|
2674
2699
|
}
|
|
2675
2700
|
});
|
|
2701
|
+
|
|
2676
2702
|
const _hoisted_1$3 = ["href"];
|
|
2677
2703
|
const _hoisted_2$1 = {
|
|
2678
2704
|
key: 2,
|
|
@@ -2713,7 +2739,7 @@
|
|
|
2713
2739
|
}, null, 8, ["title", "width", "values", "config", "parentValues", "fullscreen", "onSubmit"])
|
|
2714
2740
|
]));
|
|
2715
2741
|
}
|
|
2716
|
-
|
|
2742
|
+
const Link = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$9]]);
|
|
2717
2743
|
|
|
2718
2744
|
const _sfc_main$a = vue.defineComponent({
|
|
2719
2745
|
name: "m-fields-number",
|
|
@@ -2740,6 +2766,7 @@
|
|
|
2740
2766
|
};
|
|
2741
2767
|
}
|
|
2742
2768
|
});
|
|
2769
|
+
|
|
2743
2770
|
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2744
2771
|
const _component_el_input_number = vue.resolveComponent("el-input-number");
|
|
2745
2772
|
return _ctx.model ? (vue.openBlock(), vue.createBlock(_component_el_input_number, {
|
|
@@ -2758,7 +2785,7 @@
|
|
|
2758
2785
|
onInput: _ctx.inputHandler
|
|
2759
2786
|
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled", "onChange", "onInput"])) : vue.createCommentVNode("", true);
|
|
2760
2787
|
}
|
|
2761
|
-
|
|
2788
|
+
const Number$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
|
|
2762
2789
|
|
|
2763
2790
|
const _sfc_main$9 = vue.defineComponent({
|
|
2764
2791
|
name: "m-fields-radio-group",
|
|
@@ -2777,6 +2804,7 @@
|
|
|
2777
2804
|
};
|
|
2778
2805
|
}
|
|
2779
2806
|
});
|
|
2807
|
+
|
|
2780
2808
|
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2781
2809
|
const _component_el_radio = vue.resolveComponent("el-radio");
|
|
2782
2810
|
const _component_el_radio_group = vue.resolveComponent("el-radio-group");
|
|
@@ -2804,7 +2832,7 @@
|
|
|
2804
2832
|
_: 1
|
|
2805
2833
|
}, 8, ["modelValue", "size", "disabled", "onChange"])) : vue.createCommentVNode("", true);
|
|
2806
2834
|
}
|
|
2807
|
-
|
|
2835
|
+
const RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$7]]);
|
|
2808
2836
|
|
|
2809
2837
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
2810
2838
|
__name: "SelectOptionGroups",
|
|
@@ -3129,6 +3157,7 @@
|
|
|
3129
3157
|
};
|
|
3130
3158
|
}
|
|
3131
3159
|
});
|
|
3160
|
+
|
|
3132
3161
|
const _hoisted_1$2 = { key: 2 };
|
|
3133
3162
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3134
3163
|
const _component_select_option_groups = vue.resolveComponent("select-option-groups");
|
|
@@ -3172,7 +3201,7 @@
|
|
|
3172
3201
|
[_directive_loading, _ctx.loading]
|
|
3173
3202
|
]) : vue.createCommentVNode("", true);
|
|
3174
3203
|
}
|
|
3175
|
-
|
|
3204
|
+
const Select = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
|
|
3176
3205
|
|
|
3177
3206
|
const _sfc_main$5 = vue.defineComponent({
|
|
3178
3207
|
name: "m-fields-switch",
|
|
@@ -3214,6 +3243,7 @@
|
|
|
3214
3243
|
};
|
|
3215
3244
|
}
|
|
3216
3245
|
});
|
|
3246
|
+
|
|
3217
3247
|
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3218
3248
|
const _component_el_switch = vue.resolveComponent("el-switch");
|
|
3219
3249
|
return _ctx.model ? (vue.openBlock(), vue.createBlock(_component_el_switch, {
|
|
@@ -3227,7 +3257,7 @@
|
|
|
3227
3257
|
onChange: _ctx.changeHandler
|
|
3228
3258
|
}, null, 8, ["modelValue", "size", "activeValue", "inactiveValue", "disabled", "onChange"])) : vue.createCommentVNode("", true);
|
|
3229
3259
|
}
|
|
3230
|
-
|
|
3260
|
+
const Switch = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
|
|
3231
3261
|
|
|
3232
3262
|
const _sfc_main$4 = vue.defineComponent({
|
|
3233
3263
|
name: "m-fields-text",
|
|
@@ -3275,7 +3305,7 @@
|
|
|
3275
3305
|
const value = props.model[modelName.value];
|
|
3276
3306
|
let num;
|
|
3277
3307
|
let unit;
|
|
3278
|
-
if (
|
|
3308
|
+
if (utils.isNumber(value)) {
|
|
3279
3309
|
num = +value;
|
|
3280
3310
|
} else {
|
|
3281
3311
|
value.replace(/^([0-9.]+)([a-z%]+)$/, ($0, $1, $2) => {
|
|
@@ -3287,14 +3317,14 @@
|
|
|
3287
3317
|
return;
|
|
3288
3318
|
}
|
|
3289
3319
|
const ctrl = navigator.platform.match("Mac") ? $event.metaKey : $event.ctrlKey;
|
|
3290
|
-
const
|
|
3320
|
+
const shift = $event.shiftKey;
|
|
3291
3321
|
const alt = $event.altKey;
|
|
3292
3322
|
if (arrowUp) {
|
|
3293
3323
|
if (ctrl) {
|
|
3294
3324
|
num += 100;
|
|
3295
3325
|
} else if (alt) {
|
|
3296
3326
|
num = (num * 1e4 + 1e3) / 1e4;
|
|
3297
|
-
} else if (
|
|
3327
|
+
} else if (shift) {
|
|
3298
3328
|
num = num + 10;
|
|
3299
3329
|
} else {
|
|
3300
3330
|
num += 1;
|
|
@@ -3304,7 +3334,7 @@
|
|
|
3304
3334
|
num -= 100;
|
|
3305
3335
|
} else if (alt) {
|
|
3306
3336
|
num = (num * 1e4 - 1e3) / 1e4;
|
|
3307
|
-
} else if (
|
|
3337
|
+
} else if (shift) {
|
|
3308
3338
|
num -= 10;
|
|
3309
3339
|
} else {
|
|
3310
3340
|
num -= 1;
|
|
@@ -3316,6 +3346,7 @@
|
|
|
3316
3346
|
};
|
|
3317
3347
|
}
|
|
3318
3348
|
});
|
|
3349
|
+
|
|
3319
3350
|
const _hoisted_1$1 = { key: 0 };
|
|
3320
3351
|
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3321
3352
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
@@ -3350,7 +3381,7 @@
|
|
|
3350
3381
|
} : void 0
|
|
3351
3382
|
]), 1032, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
3352
3383
|
}
|
|
3353
|
-
|
|
3384
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
3354
3385
|
|
|
3355
3386
|
const _sfc_main$3 = vue.defineComponent({
|
|
3356
3387
|
name: "m-fields-textarea",
|
|
@@ -3384,6 +3415,7 @@
|
|
|
3384
3415
|
};
|
|
3385
3416
|
}
|
|
3386
3417
|
});
|
|
3418
|
+
|
|
3387
3419
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3388
3420
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
3389
3421
|
return vue.openBlock(), vue.createBlock(_component_el_input, {
|
|
@@ -3398,7 +3430,7 @@
|
|
|
3398
3430
|
onInput: _ctx.inputHandler
|
|
3399
3431
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
3400
3432
|
}
|
|
3401
|
-
|
|
3433
|
+
const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
3402
3434
|
|
|
3403
3435
|
const _sfc_main$2 = vue.defineComponent({
|
|
3404
3436
|
name: "m-fields-time",
|
|
@@ -3423,6 +3455,7 @@
|
|
|
3423
3455
|
};
|
|
3424
3456
|
}
|
|
3425
3457
|
});
|
|
3458
|
+
|
|
3426
3459
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3427
3460
|
const _component_el_time_picker = vue.resolveComponent("el-time-picker");
|
|
3428
3461
|
return vue.openBlock(), vue.createBlock(_component_el_time_picker, {
|
|
@@ -3435,7 +3468,7 @@
|
|
|
3435
3468
|
onChange: _ctx.changeHandler
|
|
3436
3469
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "onChange"]);
|
|
3437
3470
|
}
|
|
3438
|
-
|
|
3471
|
+
const Time = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
3439
3472
|
|
|
3440
3473
|
const _sfc_main$1 = vue.defineComponent({
|
|
3441
3474
|
name: "m-form",
|
|
@@ -3561,6 +3594,7 @@
|
|
|
3561
3594
|
};
|
|
3562
3595
|
}
|
|
3563
3596
|
});
|
|
3597
|
+
|
|
3564
3598
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3565
3599
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3566
3600
|
const _component_el_form = vue.resolveComponent("el-form");
|
|
@@ -3590,7 +3624,7 @@
|
|
|
3590
3624
|
_: 1
|
|
3591
3625
|
}, 8, ["model", "label-width", "disabled", "style", "inline", "label-position"]);
|
|
3592
3626
|
}
|
|
3593
|
-
|
|
3627
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
3594
3628
|
|
|
3595
3629
|
const _sfc_main = vue.defineComponent({
|
|
3596
3630
|
name: "m-form-dialog",
|
|
@@ -3680,6 +3714,7 @@
|
|
|
3680
3714
|
};
|
|
3681
3715
|
}
|
|
3682
3716
|
});
|
|
3717
|
+
|
|
3683
3718
|
const _hoisted_1 = { style: { "min-height": "1px" } };
|
|
3684
3719
|
const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
|
|
3685
3720
|
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u4E00\u6B65");
|
|
@@ -3792,9 +3827,9 @@
|
|
|
3792
3827
|
}, 8, ["modelValue", "title", "width", "fullscreen", "onClose"])
|
|
3793
3828
|
]);
|
|
3794
3829
|
}
|
|
3795
|
-
|
|
3830
|
+
const FormDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3796
3831
|
|
|
3797
|
-
|
|
3832
|
+
const index$1 = '';
|
|
3798
3833
|
|
|
3799
3834
|
const defaultInstallOpt = {};
|
|
3800
3835
|
const install = (app, opt) => {
|
|
@@ -3804,7 +3839,7 @@
|
|
|
3804
3839
|
app.component(Form.name, Form);
|
|
3805
3840
|
app.component(FormDialog.name, FormDialog);
|
|
3806
3841
|
app.component(Container.name, Container);
|
|
3807
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
3842
|
+
app.component("m-form-fieldset", _sfc_main$t);
|
|
3808
3843
|
app.component(GroupList.name, GroupList);
|
|
3809
3844
|
app.component(Panel.name, Panel);
|
|
3810
3845
|
app.component(Row.name, Row);
|
|
@@ -3814,23 +3849,23 @@
|
|
|
3814
3849
|
app.component(Text.name, Text);
|
|
3815
3850
|
app.component(Number$1.name, Number$1);
|
|
3816
3851
|
app.component(Textarea.name, Textarea);
|
|
3817
|
-
app.component(
|
|
3852
|
+
app.component("m-fields-hidden", _sfc_main$c);
|
|
3818
3853
|
app.component(Date$1.name, Date$1);
|
|
3819
3854
|
app.component(DateTime.name, DateTime);
|
|
3820
3855
|
app.component(Time.name, Time);
|
|
3821
3856
|
app.component(Checkbox.name, Checkbox);
|
|
3822
3857
|
app.component(Switch.name, Switch);
|
|
3823
|
-
app.component(
|
|
3824
|
-
app.component(
|
|
3858
|
+
app.component("m-fields-daterange", _sfc_main$g);
|
|
3859
|
+
app.component("m-fields-color-picker", _sfc_main$i);
|
|
3825
3860
|
app.component(CheckboxGroup.name, CheckboxGroup);
|
|
3826
3861
|
app.component(RadioGroup.name, RadioGroup);
|
|
3827
|
-
app.component(
|
|
3862
|
+
app.component("m-fields-display", _sfc_main$e);
|
|
3828
3863
|
app.component(Link.name, Link);
|
|
3829
3864
|
app.component(Select.name, Select);
|
|
3830
3865
|
app.component(Cascader.name, Cascader);
|
|
3831
3866
|
app.component(DynamicField.name, DynamicField);
|
|
3832
3867
|
};
|
|
3833
|
-
|
|
3868
|
+
const index = {
|
|
3834
3869
|
install
|
|
3835
3870
|
};
|
|
3836
3871
|
|
|
@@ -3841,10 +3876,10 @@
|
|
|
3841
3876
|
exports.MContainer = Container;
|
|
3842
3877
|
exports.MDate = Date$1;
|
|
3843
3878
|
exports.MDateTime = DateTime;
|
|
3844
|
-
exports.MDaterange =
|
|
3879
|
+
exports.MDaterange = _sfc_main$g;
|
|
3845
3880
|
exports.MDisplay = _sfc_main$e;
|
|
3846
3881
|
exports.MDynamicField = DynamicField;
|
|
3847
|
-
exports.MFieldset = _sfc_main$
|
|
3882
|
+
exports.MFieldset = _sfc_main$t;
|
|
3848
3883
|
exports.MForm = Form;
|
|
3849
3884
|
exports.MFormDialog = FormDialog;
|
|
3850
3885
|
exports.MGroupList = GroupList;
|
|
@@ -3861,7 +3896,7 @@
|
|
|
3861
3896
|
exports.MText = Text;
|
|
3862
3897
|
exports.MTextarea = Textarea;
|
|
3863
3898
|
exports.MTime = Time;
|
|
3864
|
-
exports
|
|
3899
|
+
exports.default = index;
|
|
3865
3900
|
exports.display = display;
|
|
3866
3901
|
exports.fieldProps = fieldProps;
|
|
3867
3902
|
exports.filterFunction = filterFunction;
|