@tmagic/form 1.0.2 → 1.0.3
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/style.css +3 -0
- package/dist/tmagic-form.es.js +219 -225
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +221 -227
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Fieldset.vue.d.ts +54 -31
- package/dist/types/src/containers/Tabs.vue.d.ts +2 -0
- package/dist/types/src/fields/SelectOptionGroups.vue.d.ts +13 -0
- package/dist/types/src/fields/SelectOptions.vue.d.ts +21 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/schema.d.ts +10 -1
- package/package.json +8 -9
- package/src/containers/Fieldset.vue +45 -73
- package/src/containers/Tabs.vue +11 -2
- package/src/fields/Cascader.vue +2 -1
- package/src/fields/DateTime.vue +1 -1
- package/src/fields/Daterange.vue +1 -1
- package/src/fields/Select.vue +10 -23
- package/src/fields/SelectOptionGroups.vue +20 -0
- package/src/fields/SelectOptions.vue +18 -0
- package/src/index.ts +1 -1
- package/src/schema.ts +10 -1
- package/src/theme/fieldset.scss +4 -0
- package/src/utils/form.ts +3 -12
package/dist/tmagic-form.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance,
|
|
1
|
+
import { toRaw, defineComponent, inject, ref, computed, resolveComponent, watchEffect, openBlock, createElementBlock, normalizeStyle, normalizeClass, createBlock, resolveDynamicComponent, Fragment, createVNode, withCtx, createElementVNode, createCommentVNode, renderList, createTextVNode, toDisplayString, watch, unref, withDirectives, vShow, renderSlot, onMounted, toRefs, getCurrentInstance, reactive, onBeforeUnmount, vModelText, onBeforeMount, resolveDirective, createSlots, withModifiers, provide } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretRight, CaretBottom, Delete, ArrowDown, ArrowUp, FullScreen, Grid } from '@element-plus/icons';
|
|
3
3
|
import { cloneDeep, isEqual } from 'lodash-es';
|
|
4
4
|
import { ElMessage } from 'element-plus';
|
|
@@ -12,16 +12,7 @@ const asyncLoadConfig = (value, initValue2, { asyncLoad, name, type }) => {
|
|
|
12
12
|
value.asyncLoad = typeof initValue2.asyncLoad === "object" ? initValue2.asyncLoad : asyncLoad;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
const isMultipleValue = (type) => typeof type === "string" && [
|
|
16
|
-
"checkbox-group",
|
|
17
|
-
"checkboxGroup",
|
|
18
|
-
"table",
|
|
19
|
-
"cascader",
|
|
20
|
-
"group-list",
|
|
21
|
-
"groupList",
|
|
22
|
-
"dynamic-tab",
|
|
23
|
-
"dynamicTab"
|
|
24
|
-
].includes(type);
|
|
15
|
+
const isMultipleValue = (type) => typeof type === "string" && ["checkbox-group", "checkboxGroup", "table", "cascader", "group-list", "groupList"].includes(type);
|
|
25
16
|
const initItemsValue = (mForm, value, initValue2, { items, name, extensible }) => {
|
|
26
17
|
if (Array.isArray(initValue2[name])) {
|
|
27
18
|
value[name] = initValue2[name].map((v, index) => init(mForm, items, v, value[name]?.[index]));
|
|
@@ -34,7 +25,7 @@ const initItemsValue = (mForm, value, initValue2, { items, name, extensible }) =
|
|
|
34
25
|
};
|
|
35
26
|
const setValue = (mForm, value, initValue2, item) => {
|
|
36
27
|
const { items, name, type, checkbox } = item;
|
|
37
|
-
if (isMultipleValue(type)) {
|
|
28
|
+
if (isMultipleValue(type) || type === "tab" && item.dynamic) {
|
|
38
29
|
value[name] = initValue2[name] || [];
|
|
39
30
|
}
|
|
40
31
|
if (items) {
|
|
@@ -137,7 +128,7 @@ const getRules = function(mForm, rules = [], props) {
|
|
|
137
128
|
const fnc = item.validator;
|
|
138
129
|
item.validator = (rule, value, callback, source, options) => fnc({
|
|
139
130
|
rule,
|
|
140
|
-
value,
|
|
131
|
+
value: props.config.names ? props.model : value,
|
|
141
132
|
callback,
|
|
142
133
|
source,
|
|
143
134
|
options
|
|
@@ -175,7 +166,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
175
166
|
return target;
|
|
176
167
|
};
|
|
177
168
|
|
|
178
|
-
const _sfc_main$
|
|
169
|
+
const _sfc_main$v = defineComponent({
|
|
179
170
|
name: "m-form-container",
|
|
180
171
|
components: { WarningFilled },
|
|
181
172
|
props: {
|
|
@@ -328,7 +319,7 @@ const _hoisted_5$4 = {
|
|
|
328
319
|
key: 4,
|
|
329
320
|
style: { "text-align": "center" }
|
|
330
321
|
};
|
|
331
|
-
function _sfc_render$
|
|
322
|
+
function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
|
|
332
323
|
const _component_m_fields_hidden = resolveComponent("m-fields-hidden");
|
|
333
324
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
334
325
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -455,32 +446,32 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
455
446
|
])) : createCommentVNode("", true)
|
|
456
447
|
], 6)) : createCommentVNode("", true);
|
|
457
448
|
}
|
|
458
|
-
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
449
|
+
var Container = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$p]]);
|
|
459
450
|
|
|
460
|
-
const
|
|
461
|
-
|
|
451
|
+
const _hoisted_1$d = ["innerHTML"];
|
|
452
|
+
const _hoisted_2$6 = ["innerHTML"];
|
|
453
|
+
const _hoisted_3$6 = { key: 1 };
|
|
454
|
+
const _hoisted_4$5 = ["innerHTML"];
|
|
455
|
+
const _hoisted_5$3 = ["innerHTML"];
|
|
456
|
+
const _hoisted_6$2 = {
|
|
457
|
+
key: 2,
|
|
458
|
+
style: { "display": "flex" }
|
|
459
|
+
};
|
|
460
|
+
const _hoisted_7$2 = { style: { "flex": "1" } };
|
|
461
|
+
const _hoisted_8$1 = ["src"];
|
|
462
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
463
|
+
__name: "Fieldset",
|
|
462
464
|
props: {
|
|
463
|
-
labelWidth:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
type: Object,
|
|
470
|
-
default: () => ({})
|
|
471
|
-
},
|
|
472
|
-
rules: {
|
|
473
|
-
type: Object,
|
|
474
|
-
default: () => ({})
|
|
475
|
-
},
|
|
476
|
-
prop: {
|
|
477
|
-
type: String,
|
|
478
|
-
default: () => ""
|
|
479
|
-
},
|
|
480
|
-
size: String
|
|
465
|
+
labelWidth: null,
|
|
466
|
+
prop: { default: "" },
|
|
467
|
+
size: null,
|
|
468
|
+
model: null,
|
|
469
|
+
config: null,
|
|
470
|
+
rules: { default: {} }
|
|
481
471
|
},
|
|
482
472
|
emits: ["change"],
|
|
483
|
-
setup(
|
|
473
|
+
setup(__props, { emit }) {
|
|
474
|
+
const props = __props;
|
|
484
475
|
const mForm = inject("mForm");
|
|
485
476
|
const name = computed(() => props.config.name || "");
|
|
486
477
|
const show = computed(() => {
|
|
@@ -499,125 +490,90 @@ const _sfc_main$s = defineComponent({
|
|
|
499
490
|
emit("change", props.model);
|
|
500
491
|
};
|
|
501
492
|
const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
"false-label": 0,
|
|
541
|
-
onChange: _ctx.change
|
|
542
|
-
}, {
|
|
543
|
-
default: withCtx(() => [
|
|
544
|
-
createElementVNode("span", {
|
|
545
|
-
innerHTML: _ctx.config.legend
|
|
546
|
-
}, null, 8, _hoisted_1$d),
|
|
547
|
-
_ctx.config.extra ? (openBlock(), createElementBlock("span", {
|
|
548
|
-
key: 0,
|
|
549
|
-
innerHTML: _ctx.config.extra,
|
|
550
|
-
class: "m-form-tip"
|
|
551
|
-
}, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
|
|
552
|
-
]),
|
|
553
|
-
_: 1
|
|
554
|
-
}, 8, ["modelValue", "prop", "onChange"])) : _ctx.config.checkbox && _ctx.name ? (openBlock(), createElementBlock("legend", _hoisted_3$6, [
|
|
555
|
-
createVNode(_component_el_checkbox, {
|
|
556
|
-
modelValue: _ctx.model[_ctx.name].value,
|
|
557
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.model[_ctx.name].value = $event),
|
|
558
|
-
prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.config.name}.value`,
|
|
559
|
-
"true-label": 1,
|
|
560
|
-
"false-label": 0,
|
|
561
|
-
onChange: _ctx.change
|
|
562
|
-
}, {
|
|
563
|
-
default: withCtx(() => [
|
|
493
|
+
if (props.config.checkbox && name.value) {
|
|
494
|
+
watch(() => props.model[name.value]?.value, () => {
|
|
495
|
+
console.log(props.model);
|
|
496
|
+
emit("change", props.model);
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
return (_ctx, _cache) => {
|
|
500
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
501
|
+
const _component_m_form_container = resolveComponent("m-form-container");
|
|
502
|
+
return (unref(name) ? __props.model[unref(name)] : __props.model) ? (openBlock(), createElementBlock("fieldset", {
|
|
503
|
+
key: 0,
|
|
504
|
+
class: "m-fieldset",
|
|
505
|
+
style: normalizeStyle(unref(show) ? "padding: 15px 15px 0 5px;" : "border: 0")
|
|
506
|
+
}, [
|
|
507
|
+
unref(name) && __props.config.checkbox ? (openBlock(), createBlock(resolveDynamicComponent(!unref(show) ? "div" : "legend"), { key: 0 }, {
|
|
508
|
+
default: withCtx(() => [
|
|
509
|
+
createVNode(_component_el_checkbox, {
|
|
510
|
+
modelValue: __props.model[unref(name)].value,
|
|
511
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[unref(name)].value = $event),
|
|
512
|
+
prop: `${__props.prop}${__props.prop ? "." : ""}${__props.config.name}.value`,
|
|
513
|
+
"true-label": 1,
|
|
514
|
+
"false-label": 0
|
|
515
|
+
}, {
|
|
516
|
+
default: withCtx(() => [
|
|
517
|
+
createElementVNode("span", {
|
|
518
|
+
innerHTML: __props.config.legend
|
|
519
|
+
}, null, 8, _hoisted_1$d),
|
|
520
|
+
__props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
521
|
+
key: 0,
|
|
522
|
+
innerHTML: __props.config.extra,
|
|
523
|
+
class: "m-form-tip"
|
|
524
|
+
}, null, 8, _hoisted_2$6)) : createCommentVNode("", true)
|
|
525
|
+
]),
|
|
526
|
+
_: 1
|
|
527
|
+
}, 8, ["modelValue", "prop"])
|
|
528
|
+
]),
|
|
529
|
+
_: 1
|
|
530
|
+
})) : (openBlock(), createElementBlock("legend", _hoisted_3$6, [
|
|
564
531
|
createElementVNode("span", {
|
|
565
|
-
innerHTML:
|
|
532
|
+
innerHTML: __props.config.legend
|
|
566
533
|
}, null, 8, _hoisted_4$5),
|
|
567
|
-
|
|
534
|
+
__props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
568
535
|
key: 0,
|
|
569
|
-
innerHTML:
|
|
536
|
+
innerHTML: __props.config.extra,
|
|
570
537
|
class: "m-form-tip"
|
|
571
538
|
}, null, 8, _hoisted_5$3)) : createCommentVNode("", true)
|
|
572
|
-
]),
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
539
|
+
])),
|
|
540
|
+
__props.config.schematic && unref(show) ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
541
|
+
createElementVNode("div", _hoisted_7$2, [
|
|
542
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.config.items, (item, index) => {
|
|
543
|
+
return openBlock(), createBlock(_component_m_form_container, {
|
|
544
|
+
key: key(item, index),
|
|
545
|
+
model: unref(name) ? __props.model[unref(name)] : __props.model,
|
|
546
|
+
rules: unref(name) ? __props.rules[unref(name)] : [],
|
|
547
|
+
config: item,
|
|
548
|
+
prop: __props.prop,
|
|
549
|
+
labelWidth: unref(lWidth),
|
|
550
|
+
size: __props.size,
|
|
551
|
+
onChange: change
|
|
552
|
+
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size"]);
|
|
553
|
+
}), 128))
|
|
554
|
+
]),
|
|
555
|
+
createElementVNode("img", {
|
|
556
|
+
class: "m-form-schematic",
|
|
557
|
+
src: __props.config.schematic
|
|
558
|
+
}, null, 8, _hoisted_8$1)
|
|
559
|
+
])) : unref(show) ? (openBlock(true), createElementBlock(Fragment, { key: 3 }, renderList(__props.config.items, (item, index) => {
|
|
588
560
|
return openBlock(), createBlock(_component_m_form_container, {
|
|
589
|
-
key:
|
|
590
|
-
model:
|
|
591
|
-
rules:
|
|
561
|
+
key: key(item, index),
|
|
562
|
+
model: unref(name) ? __props.model[unref(name)] : __props.model,
|
|
563
|
+
rules: unref(name) ? __props.rules[unref(name)] : [],
|
|
592
564
|
config: item,
|
|
593
|
-
prop:
|
|
594
|
-
labelWidth:
|
|
595
|
-
size:
|
|
596
|
-
onChange:
|
|
597
|
-
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size"
|
|
598
|
-
}), 128))
|
|
599
|
-
]),
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}, null, 8, _hoisted_11)
|
|
604
|
-
])) : _ctx.show ? (openBlock(true), createElementBlock(Fragment, { key: 4 }, renderList(_ctx.config.items, (item, index) => {
|
|
605
|
-
return openBlock(), createBlock(_component_m_form_container, {
|
|
606
|
-
key: _ctx.key(item, index),
|
|
607
|
-
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
608
|
-
rules: _ctx.name ? _ctx.rules[_ctx.name] : [],
|
|
609
|
-
config: item,
|
|
610
|
-
prop: _ctx.prop,
|
|
611
|
-
labelWidth: _ctx.lWidth,
|
|
612
|
-
size: _ctx.size,
|
|
613
|
-
onChange: _ctx.change
|
|
614
|
-
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size", "onChange"]);
|
|
615
|
-
}), 128)) : createCommentVNode("", true)
|
|
616
|
-
], 4)) : createCommentVNode("", true);
|
|
617
|
-
}
|
|
618
|
-
var Fieldset = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
|
|
565
|
+
prop: __props.prop,
|
|
566
|
+
labelWidth: unref(lWidth),
|
|
567
|
+
size: __props.size,
|
|
568
|
+
onChange: change
|
|
569
|
+
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size"]);
|
|
570
|
+
}), 128)) : createCommentVNode("", true)
|
|
571
|
+
], 4)) : createCommentVNode("", true);
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
});
|
|
619
575
|
|
|
620
|
-
const _sfc_main$
|
|
576
|
+
const _sfc_main$t = defineComponent({
|
|
621
577
|
name: "m-form-group-list-item",
|
|
622
578
|
components: { CaretRight, CaretBottom },
|
|
623
579
|
props: {
|
|
@@ -796,9 +752,9 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
796
752
|
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "onChange"])) : createCommentVNode("", true)
|
|
797
753
|
]);
|
|
798
754
|
}
|
|
799
|
-
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
755
|
+
var MFieldsGroupListItem = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$o]]);
|
|
800
756
|
|
|
801
|
-
const _sfc_main$
|
|
757
|
+
const _sfc_main$s = defineComponent({
|
|
802
758
|
name: "m-form-group-list",
|
|
803
759
|
components: { MFieldsGroupListItem },
|
|
804
760
|
props: {
|
|
@@ -953,9 +909,9 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
953
909
|
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
954
910
|
]);
|
|
955
911
|
}
|
|
956
|
-
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
912
|
+
var GroupList = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$n]]);
|
|
957
913
|
|
|
958
|
-
const _sfc_main$
|
|
914
|
+
const _sfc_main$r = defineComponent({
|
|
959
915
|
name: "m-form-panel",
|
|
960
916
|
components: { CaretBottom, CaretRight },
|
|
961
917
|
props: {
|
|
@@ -1066,9 +1022,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1066
1022
|
_: 3
|
|
1067
1023
|
}, 8, ["body-style"])) : createCommentVNode("", true);
|
|
1068
1024
|
}
|
|
1069
|
-
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1025
|
+
var Panel = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$m]]);
|
|
1070
1026
|
|
|
1071
|
-
const _sfc_main$
|
|
1027
|
+
const _sfc_main$q = defineComponent({
|
|
1072
1028
|
props: {
|
|
1073
1029
|
labelWidth: String,
|
|
1074
1030
|
expandMore: Boolean,
|
|
@@ -1115,9 +1071,9 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1115
1071
|
[vShow, _ctx.display && _ctx.config.type !== "hidden"]
|
|
1116
1072
|
]);
|
|
1117
1073
|
}
|
|
1118
|
-
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1074
|
+
var Col = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$l]]);
|
|
1119
1075
|
|
|
1120
|
-
const _sfc_main$
|
|
1076
|
+
const _sfc_main$p = defineComponent({
|
|
1121
1077
|
name: "m-form-row",
|
|
1122
1078
|
components: { Col },
|
|
1123
1079
|
props: {
|
|
@@ -1167,9 +1123,9 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1167
1123
|
_: 1
|
|
1168
1124
|
});
|
|
1169
1125
|
}
|
|
1170
|
-
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1126
|
+
var Row = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$k]]);
|
|
1171
1127
|
|
|
1172
|
-
const _sfc_main$
|
|
1128
|
+
const _sfc_main$o = defineComponent({
|
|
1173
1129
|
name: "m-form-step",
|
|
1174
1130
|
props: {
|
|
1175
1131
|
model: {
|
|
@@ -1247,11 +1203,11 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1247
1203
|
}), 256))
|
|
1248
1204
|
]);
|
|
1249
1205
|
}
|
|
1250
|
-
var MStep = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1206
|
+
var MStep = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$j]]);
|
|
1251
1207
|
|
|
1252
1208
|
let loadedAMapJS = false;
|
|
1253
1209
|
let firstLoadingAMapJS = true;
|
|
1254
|
-
const _sfc_main$
|
|
1210
|
+
const _sfc_main$n = defineComponent({
|
|
1255
1211
|
name: "m-form-table",
|
|
1256
1212
|
props: {
|
|
1257
1213
|
name: {
|
|
@@ -1882,7 +1838,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1882
1838
|
])
|
|
1883
1839
|
], 2);
|
|
1884
1840
|
}
|
|
1885
|
-
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1841
|
+
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$i]]);
|
|
1886
1842
|
|
|
1887
1843
|
const getActive = (mForm, props, activeTabName) => {
|
|
1888
1844
|
const { config, model, prop } = props;
|
|
@@ -1920,6 +1876,7 @@ const Tab = defineComponent({
|
|
|
1920
1876
|
default: () => ({})
|
|
1921
1877
|
},
|
|
1922
1878
|
prop: String,
|
|
1879
|
+
name: String,
|
|
1923
1880
|
size: String
|
|
1924
1881
|
},
|
|
1925
1882
|
emits: {
|
|
@@ -2000,7 +1957,7 @@ const Tab = defineComponent({
|
|
|
2000
1957
|
};
|
|
2001
1958
|
}
|
|
2002
1959
|
});
|
|
2003
|
-
const _sfc_main$
|
|
1960
|
+
const _sfc_main$m = Tab;
|
|
2004
1961
|
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2005
1962
|
const _component_m_form_container = resolveComponent("m-form-container");
|
|
2006
1963
|
const _component_el_tab_pane = resolveComponent("el-tab-pane");
|
|
@@ -2030,7 +1987,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2030
1987
|
return openBlock(), createBlock(_component_m_form_container, {
|
|
2031
1988
|
key: item[_ctx.mForm?.keyProp || "__key"],
|
|
2032
1989
|
config: item,
|
|
2033
|
-
model: _ctx.config.dynamic ? _ctx.model[_ctx.
|
|
1990
|
+
model: _ctx.config.dynamic ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tabIndex] : tab.name ? (_ctx.name ? _ctx.model[_ctx.name] : _ctx.model)[tab.name] : _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
2034
1991
|
prop: _ctx.config.dynamic ? `${_ctx.prop}${_ctx.prop ? "." : ""}${String(tabIndex)}` : _ctx.prop,
|
|
2035
1992
|
size: _ctx.size,
|
|
2036
1993
|
"label-width": tab.labelWidth || _ctx.labelWidth,
|
|
@@ -2047,7 +2004,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2047
2004
|
_: 1
|
|
2048
2005
|
}, 8, ["modelValue", "class", "type", "editable", "tab-position", "onTabClick", "onTabAdd", "onTabRemove"]);
|
|
2049
2006
|
}
|
|
2050
|
-
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2007
|
+
var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$h]]);
|
|
2051
2008
|
|
|
2052
2009
|
let $MAGIC_FORM = {};
|
|
2053
2010
|
const setConfig = (option) => {
|
|
@@ -2091,7 +2048,7 @@ const useAddField = (prop) => {
|
|
|
2091
2048
|
});
|
|
2092
2049
|
};
|
|
2093
2050
|
|
|
2094
|
-
const _sfc_main$
|
|
2051
|
+
const _sfc_main$l = defineComponent({
|
|
2095
2052
|
name: "m-fields-cascader",
|
|
2096
2053
|
props: {
|
|
2097
2054
|
...fieldProps,
|
|
@@ -2126,8 +2083,9 @@ const _sfc_main$j = defineComponent({
|
|
|
2126
2083
|
if (typeof body === "function" && props.model && mForm) {
|
|
2127
2084
|
body = body(mForm, {
|
|
2128
2085
|
model: props.model,
|
|
2129
|
-
formValue:
|
|
2130
|
-
formValues: mForm.values
|
|
2086
|
+
formValue: mForm.values,
|
|
2087
|
+
formValues: mForm.values,
|
|
2088
|
+
config: props.config
|
|
2131
2089
|
});
|
|
2132
2090
|
}
|
|
2133
2091
|
postOptions.data = body;
|
|
@@ -2206,9 +2164,9 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2206
2164
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "options", "props", "onChange"])
|
|
2207
2165
|
]);
|
|
2208
2166
|
}
|
|
2209
|
-
var Cascader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2167
|
+
var Cascader = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$g]]);
|
|
2210
2168
|
|
|
2211
|
-
const _sfc_main$
|
|
2169
|
+
const _sfc_main$k = defineComponent({
|
|
2212
2170
|
name: "m-fields-checkbox",
|
|
2213
2171
|
props: {
|
|
2214
2172
|
...fieldProps,
|
|
@@ -2260,9 +2218,9 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2260
2218
|
onChange: _ctx.changeHandler
|
|
2261
2219
|
}, null, 8, ["modelValue", "size", "trueLabel", "falseLabel", "disabled", "label", "onChange"]);
|
|
2262
2220
|
}
|
|
2263
|
-
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2221
|
+
var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$f]]);
|
|
2264
2222
|
|
|
2265
|
-
const _sfc_main$
|
|
2223
|
+
const _sfc_main$j = defineComponent({
|
|
2266
2224
|
name: "m-fields-checkbox-group",
|
|
2267
2225
|
props: {
|
|
2268
2226
|
...fieldProps,
|
|
@@ -2310,13 +2268,13 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2310
2268
|
_: 1
|
|
2311
2269
|
}, 8, ["modelValue", "size", "disabled", "onChange"]);
|
|
2312
2270
|
}
|
|
2313
|
-
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2271
|
+
var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$e]]);
|
|
2314
2272
|
|
|
2315
2273
|
const _hoisted_1$7 = { key: 0 };
|
|
2316
2274
|
const __default__$2 = defineComponent({
|
|
2317
2275
|
name: "m-fields-color-picker"
|
|
2318
2276
|
});
|
|
2319
|
-
const _sfc_main$
|
|
2277
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2320
2278
|
...__default__$2,
|
|
2321
2279
|
props: {
|
|
2322
2280
|
...fieldProps,
|
|
@@ -2346,7 +2304,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2346
2304
|
}
|
|
2347
2305
|
});
|
|
2348
2306
|
|
|
2349
|
-
const _sfc_main$
|
|
2307
|
+
const _sfc_main$h = defineComponent({
|
|
2350
2308
|
name: "m-fields-date",
|
|
2351
2309
|
props: {
|
|
2352
2310
|
...fieldProps,
|
|
@@ -2385,9 +2343,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2385
2343
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "onChange"])
|
|
2386
2344
|
])) : createCommentVNode("", true);
|
|
2387
2345
|
}
|
|
2388
|
-
var Date$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2346
|
+
var Date$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$d]]);
|
|
2389
2347
|
|
|
2390
|
-
const _sfc_main$
|
|
2348
|
+
const _sfc_main$g = defineComponent({
|
|
2391
2349
|
name: "m-fields-daterange",
|
|
2392
2350
|
props: {
|
|
2393
2351
|
...fieldProps,
|
|
@@ -2448,13 +2406,13 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2448
2406
|
size: _ctx.size,
|
|
2449
2407
|
"unlink-panels": true,
|
|
2450
2408
|
disabled: _ctx.disabled,
|
|
2451
|
-
"default-time": _ctx.config.defaultTime
|
|
2409
|
+
"default-time": _ctx.config.defaultTime,
|
|
2452
2410
|
onChange: _ctx.changeHandler
|
|
2453
2411
|
}, null, 8, ["modelValue", "size", "disabled", "default-time", "onChange"]);
|
|
2454
2412
|
}
|
|
2455
|
-
var Daterange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2413
|
+
var Daterange = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$c]]);
|
|
2456
2414
|
|
|
2457
|
-
const _sfc_main$
|
|
2415
|
+
const _sfc_main$f = defineComponent({
|
|
2458
2416
|
name: "m-fields-datetime",
|
|
2459
2417
|
props: {
|
|
2460
2418
|
...fieldProps,
|
|
@@ -2494,17 +2452,17 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2494
2452
|
disabled: _ctx.disabled,
|
|
2495
2453
|
format: _ctx.config.format || "YYYY-MM-DD HH:mm:ss",
|
|
2496
2454
|
"value-format": _ctx.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2497
|
-
"default-time": _ctx.config.defaultTime
|
|
2455
|
+
"default-time": _ctx.config.defaultTime,
|
|
2498
2456
|
onChange: _ctx.changeHandler
|
|
2499
2457
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format", "default-time", "onChange"]);
|
|
2500
2458
|
}
|
|
2501
|
-
var DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2459
|
+
var DateTime = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$b]]);
|
|
2502
2460
|
|
|
2503
2461
|
const _hoisted_1$5 = { key: 0 };
|
|
2504
2462
|
const __default__$1 = defineComponent({
|
|
2505
2463
|
name: "m-fields-display"
|
|
2506
2464
|
});
|
|
2507
|
-
const _sfc_main$
|
|
2465
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2508
2466
|
...__default__$1,
|
|
2509
2467
|
props: {
|
|
2510
2468
|
...fieldProps,
|
|
@@ -2526,7 +2484,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2526
2484
|
}
|
|
2527
2485
|
});
|
|
2528
2486
|
|
|
2529
|
-
const _sfc_main$
|
|
2487
|
+
const _sfc_main$d = defineComponent({
|
|
2530
2488
|
name: "m-fields-dynamic-field",
|
|
2531
2489
|
props: {
|
|
2532
2490
|
...fieldProps,
|
|
@@ -2620,12 +2578,12 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2620
2578
|
})
|
|
2621
2579
|
]);
|
|
2622
2580
|
}
|
|
2623
|
-
var DynamicField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2581
|
+
var DynamicField = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$a]]);
|
|
2624
2582
|
|
|
2625
2583
|
const __default__ = defineComponent({
|
|
2626
2584
|
name: "m-fields-hidden"
|
|
2627
2585
|
});
|
|
2628
|
-
const _sfc_main$
|
|
2586
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
2629
2587
|
...__default__,
|
|
2630
2588
|
props: {
|
|
2631
2589
|
...fieldProps,
|
|
@@ -2650,7 +2608,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2650
2608
|
}
|
|
2651
2609
|
});
|
|
2652
2610
|
|
|
2653
|
-
const _sfc_main$
|
|
2611
|
+
const _sfc_main$b = defineComponent({
|
|
2654
2612
|
name: "m-fields-link",
|
|
2655
2613
|
props: {
|
|
2656
2614
|
...fieldProps,
|
|
@@ -2758,9 +2716,9 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2758
2716
|
}, null, 8, ["title", "width", "values", "config", "parentValues", "fullscreen", "onSubmit"])
|
|
2759
2717
|
]));
|
|
2760
2718
|
}
|
|
2761
|
-
var Link = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2719
|
+
var Link = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$9]]);
|
|
2762
2720
|
|
|
2763
|
-
const _sfc_main$
|
|
2721
|
+
const _sfc_main$a = defineComponent({
|
|
2764
2722
|
name: "m-fields-number",
|
|
2765
2723
|
props: {
|
|
2766
2724
|
...fieldProps,
|
|
@@ -2803,9 +2761,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2803
2761
|
onInput: _ctx.inputHandler
|
|
2804
2762
|
}, null, 8, ["modelValue", "size", "max", "min", "step", "placeholder", "disabled", "onChange", "onInput"])) : createCommentVNode("", true);
|
|
2805
2763
|
}
|
|
2806
|
-
var Number$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2764
|
+
var Number$1 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
|
|
2807
2765
|
|
|
2808
|
-
const _sfc_main$
|
|
2766
|
+
const _sfc_main$9 = defineComponent({
|
|
2809
2767
|
name: "m-fields-radio-group",
|
|
2810
2768
|
props: {
|
|
2811
2769
|
...fieldProps,
|
|
@@ -2849,10 +2807,64 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2849
2807
|
_: 1
|
|
2850
2808
|
}, 8, ["modelValue", "size", "disabled", "onChange"])) : createCommentVNode("", true);
|
|
2851
2809
|
}
|
|
2852
|
-
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2810
|
+
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$7]]);
|
|
2811
|
+
|
|
2812
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
2813
|
+
__name: "SelectOptionGroups",
|
|
2814
|
+
props: {
|
|
2815
|
+
options: null
|
|
2816
|
+
},
|
|
2817
|
+
setup(__props) {
|
|
2818
|
+
return (_ctx, _cache) => {
|
|
2819
|
+
const _component_el_option = resolveComponent("el-option");
|
|
2820
|
+
const _component_el_option_group = resolveComponent("el-option-group");
|
|
2821
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (group, index) => {
|
|
2822
|
+
return openBlock(), createBlock(_component_el_option_group, {
|
|
2823
|
+
key: index,
|
|
2824
|
+
label: group.label,
|
|
2825
|
+
disabled: group.disabled
|
|
2826
|
+
}, {
|
|
2827
|
+
default: withCtx(() => [
|
|
2828
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
|
|
2829
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
2830
|
+
key: index2,
|
|
2831
|
+
label: item.label,
|
|
2832
|
+
value: item.value,
|
|
2833
|
+
disabled: item.disabled
|
|
2834
|
+
}, null, 8, ["label", "value", "disabled"]);
|
|
2835
|
+
}), 128))
|
|
2836
|
+
]),
|
|
2837
|
+
_: 2
|
|
2838
|
+
}, 1032, ["label", "disabled"]);
|
|
2839
|
+
}), 128);
|
|
2840
|
+
};
|
|
2841
|
+
}
|
|
2842
|
+
});
|
|
2843
|
+
|
|
2844
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2845
|
+
__name: "SelectOptions",
|
|
2846
|
+
props: {
|
|
2847
|
+
options: null,
|
|
2848
|
+
valueKey: null
|
|
2849
|
+
},
|
|
2850
|
+
setup(__props) {
|
|
2851
|
+
return (_ctx, _cache) => {
|
|
2852
|
+
const _component_el_option = resolveComponent("el-option");
|
|
2853
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
2854
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
2855
|
+
label: option.text,
|
|
2856
|
+
value: option.value,
|
|
2857
|
+
key: __props.valueKey ? option.value[__props.valueKey] : option.value,
|
|
2858
|
+
disabled: option.disabled
|
|
2859
|
+
}, null, 8, ["label", "value", "disabled"]);
|
|
2860
|
+
}), 128);
|
|
2861
|
+
};
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2853
2864
|
|
|
2854
2865
|
const _sfc_main$6 = defineComponent({
|
|
2855
2866
|
name: "m-fields-select",
|
|
2867
|
+
components: { SelectOptions: _sfc_main$7, SelectOptionGroups: _sfc_main$8 },
|
|
2856
2868
|
props: {
|
|
2857
2869
|
...fieldProps,
|
|
2858
2870
|
config: {
|
|
@@ -3083,6 +3095,7 @@ const _sfc_main$6 = defineComponent({
|
|
|
3083
3095
|
loading,
|
|
3084
3096
|
remote,
|
|
3085
3097
|
options,
|
|
3098
|
+
groupOptions: options,
|
|
3086
3099
|
moreLoadingVisible,
|
|
3087
3100
|
popperClass: mForm?.popperClass,
|
|
3088
3101
|
getOptions,
|
|
@@ -3121,8 +3134,8 @@ const _sfc_main$6 = defineComponent({
|
|
|
3121
3134
|
});
|
|
3122
3135
|
const _hoisted_1$2 = { key: 2 };
|
|
3123
3136
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3124
|
-
const
|
|
3125
|
-
const
|
|
3137
|
+
const _component_select_option_groups = resolveComponent("select-option-groups");
|
|
3138
|
+
const _component_select_options = resolveComponent("select-options");
|
|
3126
3139
|
const _component_el_select = resolveComponent("el-select");
|
|
3127
3140
|
const _directive_loading = resolveDirective("loading");
|
|
3128
3141
|
return _ctx.model ? withDirectives((openBlock(), createBlock(_component_el_select, {
|
|
@@ -3146,32 +3159,13 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3146
3159
|
onVisibleChange: _ctx.visibleHandler
|
|
3147
3160
|
}, {
|
|
3148
3161
|
default: withCtx(() => [
|
|
3149
|
-
_ctx.config.group ? (openBlock(
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(group.options, (item, index2) => {
|
|
3157
|
-
return openBlock(), createBlock(_component_el_option, {
|
|
3158
|
-
key: index2,
|
|
3159
|
-
label: item.label,
|
|
3160
|
-
value: item.value,
|
|
3161
|
-
disabled: item.disabled
|
|
3162
|
-
}, null, 8, ["label", "value", "disabled"]);
|
|
3163
|
-
}), 128))
|
|
3164
|
-
]),
|
|
3165
|
-
_: 2
|
|
3166
|
-
}, 1032, ["label", "disabled"]);
|
|
3167
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.options, (option) => {
|
|
3168
|
-
return openBlock(), createBlock(_component_el_option, {
|
|
3169
|
-
label: option.text,
|
|
3170
|
-
value: option.value,
|
|
3171
|
-
key: _ctx.config.valueKey ? option.value[_ctx.config.valueKey] : option.value,
|
|
3172
|
-
disabled: option.disabled
|
|
3173
|
-
}, null, 8, ["label", "value", "disabled"]);
|
|
3174
|
-
}), 128)),
|
|
3162
|
+
_ctx.config.group ? (openBlock(), createBlock(_component_select_option_groups, {
|
|
3163
|
+
key: 0,
|
|
3164
|
+
options: _ctx.groupOptions
|
|
3165
|
+
}, null, 8, ["options"])) : (openBlock(), createBlock(_component_select_options, {
|
|
3166
|
+
key: 1,
|
|
3167
|
+
options: _ctx.options
|
|
3168
|
+
}, null, 8, ["options"])),
|
|
3175
3169
|
_ctx.moreLoadingVisible ? withDirectives((openBlock(), createElementBlock("div", _hoisted_1$2, null, 512)), [
|
|
3176
3170
|
[_directive_loading, true]
|
|
3177
3171
|
]) : createCommentVNode("", true)
|
|
@@ -3805,7 +3799,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3805
3799
|
}
|
|
3806
3800
|
var FormDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
3807
3801
|
|
|
3808
|
-
var index$1 = /* #__PURE__ */ (() => ".m-form-dialog .el-dialog__body {\n padding: 0 !important;\n}\n.m-form-dialog .m-dialog-body {\n padding: 0 20px;\n}\n.m-form-dialog .el-table .m-form-item .el-form-item {\n margin-bottom: 0;\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.5s;\n}\n\n.fade-enter, .fade-leave-to {\n opacity: 0;\n}\n\n.m-form .m-form-tip {\n color: rgba(0, 0, 0, 0.45);\n font-size: 12px;\n transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.m-form .m-form-schematic {\n max-width: 50%;\n height: 100%;\n}\n.m-form .el-table .cell > div.m-form-container {\n display: block;\n}\n.m-form .el-tabs {\n margin-bottom: 10px;\n}\n.m-form .el-form-item.hidden .el-form-item__label {\n display: none;\n}\n\n.magic-datetime-picker-popper .el-picker-panel__footer button:first-child {\n display: none;\n}\n\ndiv.m-fields-link {\n width: fit-content;\n}\n\nfieldset.m-fieldset {\n position: relative;\n border: 1px solid rgb(229, 229, 229);\n margin-top: 10px;\n margin-bottom: 10px;\n min-inline-size: auto;\n}\nfieldset.m-fieldset legend {\n font-size: 14px;\n position: absolute;\n border: 0;\n top: -10px;\n left: 20px;\n background: rgb(255, 255, 255);\n width: auto;\n padding: 0px 3px;\n font-weight: bold;\n line-height: 20px;\n}\nfieldset.m-fieldset .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-group-list .el-button--text {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon.expand {\n transform: rotate(90deg);\n}\n.m-fields-group-list .m-fields-group-list-item {\n border-bottom: 1px solid #ebeef5;\n margin-bottom: 7px;\n}\n.m-fields-group-list .m-fields-group-list-item:last-of-type {\n border-bottom: 0;\n}\n\n.m-form-panel .el-card__header:hover {\n background: #f2f6fc;\n}\n.m-form-panel .el-card__header a {\n color: #409eff;\n}\n.m-form-panel .el-card__body {\n padding: 10px;\n}\n.m-form-panel .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-table {\n width: 100%;\n}\n.m-fields-table.fixed {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed::before {\n content: \" \";\n display: block;\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed > .el-form-item__content {\n z-index: 101;\n position: relative;\n margin: 10vh auto;\n max-width: fit-content;\n}\n.m-fields-table.fixed table {\n width: 95vw !important;\n}\n.m-fields-table th {\n background-color: #f2f2f2 !important;\n color: #333 !important;\n}\n.m-fields-table .el-table th {\n padding: 0 !important;\n}\n.m-fields-table .el-table__column--dropable {\n cursor: move;\n}\n.m-fields-table .el-form-item__content .el-input-group {\n vertical-align: middle;\n}\n.m-fields-table.m-fields-table-item-extra tr.expanded td {\n border-bottom: 0;\n}\n.m-fields-table .el-table__expanded-cell .m-form-tip {\n margin-left: 80px;\n}\n.m-fields-table .el-form-item {\n margin-bottom: 0;\n}\n\n.m-select {\n width: 100%;\n}")();
|
|
3802
|
+
var index$1 = /* #__PURE__ */ (() => ".m-form-dialog .el-dialog__body {\n padding: 0 !important;\n}\n.m-form-dialog .m-dialog-body {\n padding: 0 20px;\n}\n.m-form-dialog .el-table .m-form-item .el-form-item {\n margin-bottom: 0;\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.5s;\n}\n\n.fade-enter, .fade-leave-to {\n opacity: 0;\n}\n\n.m-form .m-form-tip {\n color: rgba(0, 0, 0, 0.45);\n font-size: 12px;\n transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);\n}\n.m-form .m-form-schematic {\n max-width: 50%;\n height: 100%;\n}\n.m-form .el-table .cell > div.m-form-container {\n display: block;\n}\n.m-form .el-tabs {\n margin-bottom: 10px;\n}\n.m-form .el-form-item.hidden .el-form-item__label {\n display: none;\n}\n\n.magic-datetime-picker-popper .el-picker-panel__footer button:first-child {\n display: none;\n}\n\ndiv.m-fields-link {\n width: fit-content;\n}\n\nfieldset.m-fieldset {\n position: relative;\n border: 1px solid rgb(229, 229, 229);\n margin-top: 10px;\n margin-bottom: 10px;\n min-inline-size: auto;\n}\nfieldset.m-fieldset .el-checkbox {\n height: 22px;\n}\nfieldset.m-fieldset legend {\n font-size: 14px;\n position: absolute;\n border: 0;\n top: -10px;\n left: 20px;\n background: rgb(255, 255, 255);\n width: auto;\n padding: 0px 3px;\n font-weight: bold;\n line-height: 20px;\n}\nfieldset.m-fieldset .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-group-list .el-button--text {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon {\n padding: 0;\n margin-bottom: 7px;\n}\n.m-fields-group-list .el-tree-node__expand-icon.expand {\n transform: rotate(90deg);\n}\n.m-fields-group-list .m-fields-group-list-item {\n border-bottom: 1px solid #ebeef5;\n margin-bottom: 7px;\n}\n.m-fields-group-list .m-fields-group-list-item:last-of-type {\n border-bottom: 0;\n}\n\n.m-form-panel .el-card__header:hover {\n background: #f2f6fc;\n}\n.m-form-panel .el-card__header a {\n color: #409eff;\n}\n.m-form-panel .el-card__body {\n padding: 10px;\n}\n.m-form-panel .m-form-tip {\n margin-left: 5px;\n}\n\n.m-fields-table {\n width: 100%;\n}\n.m-fields-table.fixed {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed::before {\n content: \" \";\n display: block;\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 100;\n}\n.m-fields-table.fixed > .el-form-item__content {\n z-index: 101;\n position: relative;\n margin: 10vh auto;\n max-width: fit-content;\n}\n.m-fields-table.fixed table {\n width: 95vw !important;\n}\n.m-fields-table th {\n background-color: #f2f2f2 !important;\n color: #333 !important;\n}\n.m-fields-table .el-table th {\n padding: 0 !important;\n}\n.m-fields-table .el-table__column--dropable {\n cursor: move;\n}\n.m-fields-table .el-form-item__content .el-input-group {\n vertical-align: middle;\n}\n.m-fields-table.m-fields-table-item-extra tr.expanded td {\n border-bottom: 0;\n}\n.m-fields-table .el-table__expanded-cell .m-form-tip {\n margin-left: 80px;\n}\n.m-fields-table .el-form-item {\n margin-bottom: 0;\n}\n\n.m-select {\n width: 100%;\n}")();
|
|
3809
3803
|
|
|
3810
3804
|
const defaultInstallOpt = {};
|
|
3811
3805
|
const install = (app, opt) => {
|
|
@@ -3815,7 +3809,7 @@ const install = (app, opt) => {
|
|
|
3815
3809
|
app.component(Form.name, Form);
|
|
3816
3810
|
app.component(FormDialog.name, FormDialog);
|
|
3817
3811
|
app.component(Container.name, Container);
|
|
3818
|
-
app.component(
|
|
3812
|
+
app.component("m-form-fieldset", _sfc_main$u);
|
|
3819
3813
|
app.component(GroupList.name, GroupList);
|
|
3820
3814
|
app.component(Panel.name, Panel);
|
|
3821
3815
|
app.component(Row.name, Row);
|
|
@@ -3825,17 +3819,17 @@ const install = (app, opt) => {
|
|
|
3825
3819
|
app.component(Text.name, Text);
|
|
3826
3820
|
app.component(Number$1.name, Number$1);
|
|
3827
3821
|
app.component(Textarea.name, Textarea);
|
|
3828
|
-
app.component(_sfc_main$
|
|
3822
|
+
app.component(_sfc_main$c.name, _sfc_main$c);
|
|
3829
3823
|
app.component(Date$1.name, Date$1);
|
|
3830
3824
|
app.component(DateTime.name, DateTime);
|
|
3831
3825
|
app.component(Time.name, Time);
|
|
3832
3826
|
app.component(Checkbox.name, Checkbox);
|
|
3833
3827
|
app.component(Switch.name, Switch);
|
|
3834
3828
|
app.component(Daterange.name, Daterange);
|
|
3835
|
-
app.component(_sfc_main$
|
|
3829
|
+
app.component(_sfc_main$i.name, _sfc_main$i);
|
|
3836
3830
|
app.component(CheckboxGroup.name, CheckboxGroup);
|
|
3837
3831
|
app.component(RadioGroup.name, RadioGroup);
|
|
3838
|
-
app.component(_sfc_main$
|
|
3832
|
+
app.component(_sfc_main$e.name, _sfc_main$e);
|
|
3839
3833
|
app.component(Link.name, Link);
|
|
3840
3834
|
app.component(Select.name, Select);
|
|
3841
3835
|
app.component(Cascader.name, Cascader);
|
|
@@ -3845,5 +3839,5 @@ var index = {
|
|
|
3845
3839
|
install
|
|
3846
3840
|
};
|
|
3847
3841
|
|
|
3848
|
-
export { Cascader as MCascader, Checkbox as MCheckbox, CheckboxGroup as MCheckboxGroup, _sfc_main$
|
|
3842
|
+
export { Cascader as MCascader, Checkbox as MCheckbox, CheckboxGroup as MCheckboxGroup, _sfc_main$i as MColorPicker, Container as MContainer, Date$1 as MDate, DateTime as MDateTime, Daterange as MDaterange, _sfc_main$e as MDisplay, DynamicField as MDynamicField, _sfc_main$u as MFieldset, Form as MForm, FormDialog as MFormDialog, GroupList as MGroupList, _sfc_main$c as MHidden, Link as MLink, Number$1 as MNumber, Panel as MPanel, RadioGroup as MRadioGroup, Row as MRow, Select as MSelect, Switch as MSwitch, Table as MTable, Tabs as MTabs, Text as MText, Textarea as MTextarea, Time as MTime, index as default, display, fieldProps, filterFunction, getRules, initValue, useAddField };
|
|
3849
3843
|
//# sourceMappingURL=tmagic-form.es.js.map
|