@tmagic/form 1.2.0-beta.9 → 1.2.0
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 +1 -1
- package/dist/{tmagic-form.mjs → tmagic-form.js} +307 -124
- package/dist/tmagic-form.js.map +1 -0
- package/dist/{tmagic-form.umd.js → tmagic-form.umd.cjs} +306 -122
- package/dist/tmagic-form.umd.cjs.map +1 -0
- package/package.json +10 -8
- package/src/Form.vue +2 -2
- package/src/FormDialog.vue +3 -1
- package/src/containers/Col.vue +3 -1
- package/src/containers/Container.vue +6 -3
- package/src/containers/Fieldset.vue +4 -1
- package/src/containers/GroupList.vue +4 -2
- package/src/containers/GroupListItem.vue +8 -5
- package/src/containers/Panel.vue +4 -1
- package/src/containers/Row.vue +3 -1
- package/src/containers/Step.vue +3 -1
- package/src/containers/Table.vue +44 -18
- package/src/containers/Tabs.vue +9 -4
- package/src/fields/Cascader.vue +2 -2
- package/src/fields/Checkbox.vue +2 -2
- package/src/fields/CheckboxGroup.vue +8 -3
- package/src/fields/ColorPicker.vue +2 -2
- package/src/fields/Date.vue +3 -3
- package/src/fields/DateTime.vue +2 -2
- package/src/fields/Daterange.vue +2 -2
- package/src/fields/Display.vue +1 -1
- package/src/fields/DynamicField.vue +2 -2
- package/src/fields/Hidden.vue +1 -1
- package/src/fields/Link.vue +2 -2
- package/src/fields/Number.vue +2 -2
- package/src/fields/RadioGroup.vue +9 -5
- package/src/fields/Select.vue +63 -24
- package/src/fields/SelectOptionGroups.vue +1 -1
- package/src/fields/SelectOptions.vue +1 -1
- package/src/fields/Switch.vue +2 -2
- package/src/fields/Text.vue +2 -2
- package/src/fields/Textarea.vue +2 -2
- package/src/fields/Time.vue +4 -2
- package/src/schema.ts +18 -4
- package/src/theme/form.scss +1 -1
- package/src/utils/form.ts +5 -5
- package/types/Form.vue.d.ts +32 -170
- package/types/FormDialog.vue.d.ts +4 -0
- package/types/containers/Col.vue.d.ts +12 -74
- package/types/containers/Container.vue.d.ts +17 -95
- package/types/containers/Fieldset.vue.d.ts +15 -87
- package/types/containers/GroupList.vue.d.ts +11 -71
- package/types/containers/GroupListItem.vue.d.ts +12 -80
- package/types/containers/Panel.vue.d.ts +4 -0
- package/types/containers/Row.vue.d.ts +12 -74
- package/types/containers/Step.vue.d.ts +13 -79
- package/types/containers/Table.vue.d.ts +4 -0
- package/types/containers/Tabs.vue.d.ts +12 -74
- package/types/fields/Cascader.vue.d.ts +12 -78
- package/types/fields/Checkbox.vue.d.ts +12 -78
- package/types/fields/CheckboxGroup.vue.d.ts +12 -78
- package/types/fields/ColorPicker.vue.d.ts +12 -78
- package/types/fields/Date.vue.d.ts +12 -78
- package/types/fields/DateTime.vue.d.ts +12 -78
- package/types/fields/Daterange.vue.d.ts +12 -78
- package/types/fields/Display.vue.d.ts +9 -65
- package/types/fields/DynamicField.vue.d.ts +12 -78
- package/types/fields/Hidden.vue.d.ts +9 -65
- package/types/fields/Link.vue.d.ts +12 -78
- package/types/fields/Number.vue.d.ts +12 -81
- package/types/fields/RadioGroup.vue.d.ts +12 -78
- package/types/fields/Select.vue.d.ts +12 -79
- package/types/fields/SelectOptionGroups.vue.d.ts +4 -50
- package/types/fields/SelectOptions.vue.d.ts +5 -53
- package/types/fields/Switch.vue.d.ts +12 -78
- package/types/fields/Text.vue.d.ts +12 -81
- package/types/fields/Textarea.vue.d.ts +12 -81
- package/types/fields/Time.vue.d.ts +12 -78
- package/types/schema.d.ts +17 -4
- package/types/utils/form.d.ts +2 -1
- package/dist/tmagic-form.mjs.map +0 -1
- package/dist/tmagic-form.umd.js.map +0 -1
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
const isMultipleValue = (type) => typeof type === "string" && ["checkbox-group", "checkboxGroup", "table", "cascader", "group-list", "groupList"].includes(type);
|
|
21
21
|
const initItemsValue = (mForm, value, initValue2, { items, name, extensible }) => {
|
|
22
22
|
if (Array.isArray(initValue2[name])) {
|
|
23
|
-
value[name] = initValue2[name].map((v, index) =>
|
|
23
|
+
value[name] = initValue2[name].map((v, index) => createValues(mForm, items, v, value[name]?.[index]));
|
|
24
24
|
} else {
|
|
25
|
-
value[name] =
|
|
25
|
+
value[name] = createValues(mForm, items, initValue2[name], value[name]);
|
|
26
26
|
if (extensible) {
|
|
27
27
|
value[name] = Object.assign({}, initValue2[name], value[name]);
|
|
28
28
|
}
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
return names.forEach((n) => value[n] = initValue2[n] || "");
|
|
68
68
|
}
|
|
69
69
|
if (!name) {
|
|
70
|
-
return
|
|
70
|
+
return createValues(mForm, items, initValue2, value);
|
|
71
71
|
}
|
|
72
72
|
setValue(mForm, value, initValue2, item);
|
|
73
73
|
return value;
|
|
74
74
|
};
|
|
75
|
-
const
|
|
75
|
+
const createValues = function(mForm, config = [], initValue2 = {}, value = {}) {
|
|
76
76
|
if (Array.isArray(config)) {
|
|
77
77
|
config.forEach((item) => {
|
|
78
78
|
initValueItem(mForm, item, initValue2, value);
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
const initValue = async (mForm, { initValues, config }) => {
|
|
160
160
|
if (!Array.isArray(config))
|
|
161
161
|
throw new Error("config\u5E94\u8BE5\u4E3A\u6570\u7EC4");
|
|
162
|
-
let valuesTmp =
|
|
162
|
+
let valuesTmp = createValues(mForm, config, vue.toRaw(initValues), {});
|
|
163
163
|
const [firstForm] = config;
|
|
164
164
|
if (firstForm && typeof firstForm.onInitValue === "function") {
|
|
165
165
|
valuesTmp = await firstForm.onInitValue(mForm, {
|
|
@@ -178,12 +178,16 @@
|
|
|
178
178
|
key: 4,
|
|
179
179
|
style: { "text-align": "center" }
|
|
180
180
|
};
|
|
181
|
+
const __default__$v = vue.defineComponent({
|
|
182
|
+
name: "MFormContainer"
|
|
183
|
+
});
|
|
181
184
|
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
182
|
-
|
|
185
|
+
...__default__$v,
|
|
183
186
|
props: {
|
|
184
187
|
model: null,
|
|
185
188
|
config: null,
|
|
186
189
|
prop: { default: "" },
|
|
190
|
+
disabled: { type: Boolean },
|
|
187
191
|
labelWidth: null,
|
|
188
192
|
expandMore: { type: Boolean, default: false },
|
|
189
193
|
stepActive: null,
|
|
@@ -214,7 +218,7 @@
|
|
|
214
218
|
return component;
|
|
215
219
|
return "m-fields-text";
|
|
216
220
|
});
|
|
217
|
-
const disabled = vue.computed(() => filterFunction(mForm, props.config.disabled, props));
|
|
221
|
+
const disabled = vue.computed(() => props.disabled || filterFunction(mForm, props.config.disabled, props));
|
|
218
222
|
const tooltip = vue.computed(() => filterFunction(mForm, props.config.tooltip, props));
|
|
219
223
|
const extra = vue.computed(() => filterFunction(mForm, props.config.extra, props));
|
|
220
224
|
const rule = vue.computed(() => getRules(mForm, props.config.rules, props));
|
|
@@ -311,13 +315,14 @@
|
|
|
311
315
|
size: __props.size,
|
|
312
316
|
model: __props.model,
|
|
313
317
|
config: __props.config,
|
|
318
|
+
disabled: vue.unref(disabled),
|
|
314
319
|
name: vue.unref(name),
|
|
315
320
|
prop: vue.unref(itemProp),
|
|
316
321
|
"step-active": __props.stepActive,
|
|
317
322
|
"expand-more": expand.value,
|
|
318
323
|
"label-width": vue.unref(itemLabelWidth),
|
|
319
324
|
onChange: onChangeHandler
|
|
320
|
-
}, null, 40, ["size", "model", "config", "name", "prop", "step-active", "expand-more", "label-width"])) : vue.unref(type) && vue.unref(display$1) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
325
|
+
}, null, 40, ["size", "model", "config", "disabled", "name", "prop", "step-active", "expand-more", "label-width"])) : vue.unref(type) && vue.unref(display$1) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
321
326
|
vue.createVNode(vue.unref(design.TMagicFormItem), {
|
|
322
327
|
style: vue.normalizeStyle(__props.config.tip ? "flex: 1" : ""),
|
|
323
328
|
class: vue.normalizeClass({ hidden: `${vue.unref(itemLabelWidth)}` === "0" || !__props.config.text }),
|
|
@@ -392,18 +397,20 @@
|
|
|
392
397
|
model: vue.unref(name) || vue.unref(name) === 0 ? __props.model[vue.unref(name)] : __props.model,
|
|
393
398
|
config: item,
|
|
394
399
|
size: __props.size,
|
|
400
|
+
disabled: vue.unref(disabled),
|
|
395
401
|
"step-active": __props.stepActive,
|
|
396
402
|
"expand-more": expand.value,
|
|
397
403
|
"label-width": vue.unref(itemLabelWidth),
|
|
398
404
|
prop: vue.unref(itemProp),
|
|
399
405
|
onChange: onChangeHandler
|
|
400
|
-
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop"]);
|
|
406
|
+
}, null, 8, ["model", "config", "size", "disabled", "step-active", "expand-more", "label-width", "prop"]);
|
|
401
407
|
}), 128)) : vue.createCommentVNode("", true)
|
|
402
408
|
], 64)) : vue.createCommentVNode("", true),
|
|
403
409
|
__props.config.expand && vue.unref(type) !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
|
|
404
410
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
405
411
|
type: "primary",
|
|
406
412
|
size: "small",
|
|
413
|
+
disabled: false,
|
|
407
414
|
text: "",
|
|
408
415
|
onClick: expandHandler
|
|
409
416
|
}, {
|
|
@@ -429,15 +436,19 @@
|
|
|
429
436
|
};
|
|
430
437
|
const _hoisted_7$2 = { style: { "flex": "1" } };
|
|
431
438
|
const _hoisted_8$1 = ["src"];
|
|
439
|
+
const __default__$u = vue.defineComponent({
|
|
440
|
+
name: "MFormFieldset"
|
|
441
|
+
});
|
|
432
442
|
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
433
|
-
|
|
443
|
+
...__default__$u,
|
|
434
444
|
props: {
|
|
435
445
|
labelWidth: null,
|
|
436
446
|
prop: { default: "" },
|
|
437
447
|
size: null,
|
|
438
448
|
model: null,
|
|
439
449
|
config: null,
|
|
440
|
-
rules: { default: {} }
|
|
450
|
+
rules: { default: {} },
|
|
451
|
+
disabled: { type: Boolean }
|
|
441
452
|
},
|
|
442
453
|
emits: ["change"],
|
|
443
454
|
setup(__props, { emit }) {
|
|
@@ -516,10 +527,11 @@
|
|
|
516
527
|
rules: vue.unref(name) ? __props.rules[vue.unref(name)] : [],
|
|
517
528
|
config: item,
|
|
518
529
|
prop: __props.prop,
|
|
530
|
+
disabled: __props.disabled,
|
|
519
531
|
labelWidth: vue.unref(lWidth),
|
|
520
532
|
size: __props.size,
|
|
521
533
|
onChange: change
|
|
522
|
-
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size"]);
|
|
534
|
+
}, null, 8, ["model", "rules", "config", "prop", "disabled", "labelWidth", "size"]);
|
|
523
535
|
}), 128))
|
|
524
536
|
]),
|
|
525
537
|
vue.createElementVNode("img", {
|
|
@@ -535,8 +547,9 @@
|
|
|
535
547
|
prop: __props.prop,
|
|
536
548
|
labelWidth: vue.unref(lWidth),
|
|
537
549
|
size: __props.size,
|
|
550
|
+
disabled: __props.disabled,
|
|
538
551
|
onChange: change
|
|
539
|
-
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size"]);
|
|
552
|
+
}, null, 8, ["model", "rules", "config", "prop", "labelWidth", "size", "disabled"]);
|
|
540
553
|
}), 128)) : vue.createCommentVNode("", true)
|
|
541
554
|
], 4)) : vue.createCommentVNode("", true);
|
|
542
555
|
};
|
|
@@ -547,8 +560,11 @@
|
|
|
547
560
|
const _hoisted_2$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u79FB");
|
|
548
561
|
const _hoisted_3$5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u79FB");
|
|
549
562
|
const _hoisted_4$4 = ["innerHTML"];
|
|
563
|
+
const __default__$t = vue.defineComponent({
|
|
564
|
+
name: "MFormGroupListItem"
|
|
565
|
+
});
|
|
550
566
|
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
551
|
-
|
|
567
|
+
...__default__$t,
|
|
552
568
|
props: {
|
|
553
569
|
model: null,
|
|
554
570
|
groupModel: null,
|
|
@@ -556,7 +572,8 @@
|
|
|
556
572
|
labelWidth: null,
|
|
557
573
|
prop: null,
|
|
558
574
|
size: null,
|
|
559
|
-
index: null
|
|
575
|
+
index: null,
|
|
576
|
+
disabled: { type: Boolean }
|
|
560
577
|
},
|
|
561
578
|
emits: ["swap-item", "remove-item", "change"],
|
|
562
579
|
setup(__props, { emit }) {
|
|
@@ -617,24 +634,27 @@
|
|
|
617
634
|
}),
|
|
618
635
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
619
636
|
text: "",
|
|
637
|
+
disabled: __props.disabled,
|
|
620
638
|
onClick: expandHandler
|
|
621
639
|
}, {
|
|
622
640
|
default: vue.withCtx(() => [
|
|
623
641
|
vue.createTextVNode(vue.toDisplayString(vue.unref(title)), 1)
|
|
624
642
|
]),
|
|
625
643
|
_: 1
|
|
626
|
-
}),
|
|
644
|
+
}, 8, ["disabled"]),
|
|
627
645
|
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
|
|
646
|
+
style: { "color": "#f56c6c" },
|
|
628
647
|
text: "",
|
|
629
648
|
icon: vue.unref(iconsVue.Delete),
|
|
630
|
-
|
|
649
|
+
disabled: __props.disabled,
|
|
631
650
|
onClick: removeHandler
|
|
632
|
-
}, null, 8, ["icon"]), [
|
|
651
|
+
}, null, 8, ["icon", "disabled"]), [
|
|
633
652
|
[vue.vShow, showDelete(parseInt(String(__props.index)))]
|
|
634
653
|
]),
|
|
635
654
|
movable() ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
636
655
|
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
|
|
637
656
|
text: "",
|
|
657
|
+
disabled: __props.disabled,
|
|
638
658
|
size: "small",
|
|
639
659
|
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
640
660
|
}, {
|
|
@@ -648,10 +668,11 @@
|
|
|
648
668
|
})
|
|
649
669
|
]),
|
|
650
670
|
_: 1
|
|
651
|
-
},
|
|
671
|
+
}, 8, ["disabled"]), [
|
|
652
672
|
[vue.vShow, __props.index !== 0]
|
|
653
673
|
]),
|
|
654
674
|
vue.withDirectives(vue.createVNode(vue.unref(design.TMagicButton), {
|
|
675
|
+
disabled: __props.disabled,
|
|
655
676
|
text: "",
|
|
656
677
|
size: "small",
|
|
657
678
|
onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
|
|
@@ -666,7 +687,7 @@
|
|
|
666
687
|
})
|
|
667
688
|
]),
|
|
668
689
|
_: 1
|
|
669
|
-
},
|
|
690
|
+
}, 8, ["disabled"]), [
|
|
670
691
|
[vue.vShow, __props.index !== vue.unref(length) - 1]
|
|
671
692
|
])
|
|
672
693
|
], 64)) : vue.createCommentVNode("", true),
|
|
@@ -683,8 +704,9 @@
|
|
|
683
704
|
labelWidth: __props.labelWidth,
|
|
684
705
|
prop: `${__props.prop}${__props.prop ? "." : ""}${String(__props.index)}`,
|
|
685
706
|
size: __props.size,
|
|
707
|
+
disabled: __props.disabled,
|
|
686
708
|
onChange: changeHandler
|
|
687
|
-
}, null, 8, ["config", "model", "labelWidth", "prop", "size"])) : vue.createCommentVNode("", true)
|
|
709
|
+
}, null, 8, ["config", "model", "labelWidth", "prop", "size", "disabled"])) : vue.createCommentVNode("", true)
|
|
688
710
|
]);
|
|
689
711
|
};
|
|
690
712
|
}
|
|
@@ -702,15 +724,19 @@
|
|
|
702
724
|
];
|
|
703
725
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
704
726
|
const _hoisted_7$1 = /* @__PURE__ */ vue.createTextVNode("\u5207\u6362\u4E3A\u8868\u683C");
|
|
727
|
+
const __default__$s = vue.defineComponent({
|
|
728
|
+
name: "MFormGroupList"
|
|
729
|
+
});
|
|
705
730
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
706
|
-
|
|
731
|
+
...__default__$s,
|
|
707
732
|
props: {
|
|
708
733
|
model: null,
|
|
709
734
|
config: null,
|
|
710
735
|
name: null,
|
|
711
736
|
labelWidth: null,
|
|
712
737
|
prop: null,
|
|
713
|
-
size: null
|
|
738
|
+
size: null,
|
|
739
|
+
disabled: { type: Boolean }
|
|
714
740
|
},
|
|
715
741
|
emits: ["change"],
|
|
716
742
|
setup(__props, { emit }) {
|
|
@@ -792,22 +818,24 @@
|
|
|
792
818
|
index,
|
|
793
819
|
"label-width": __props.labelWidth,
|
|
794
820
|
size: __props.size,
|
|
821
|
+
disabled: __props.disabled,
|
|
795
822
|
"group-model": __props.model[__props.name],
|
|
796
823
|
onRemoveItem: removeHandler,
|
|
797
824
|
onSwapItem: swapHandler,
|
|
798
825
|
onChange: changeHandler
|
|
799
|
-
}, null, 8, ["model", "config", "prop", "index", "label-width", "size", "group-model"]);
|
|
826
|
+
}, null, 8, ["model", "config", "prop", "index", "label-width", "size", "disabled", "group-model"]);
|
|
800
827
|
}), 128)),
|
|
801
828
|
vue.unref(addable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
802
829
|
key: 3,
|
|
803
830
|
onClick: addHandler,
|
|
804
|
-
size: "small"
|
|
831
|
+
size: "small",
|
|
832
|
+
disabled: __props.disabled
|
|
805
833
|
}, {
|
|
806
834
|
default: vue.withCtx(() => [
|
|
807
835
|
_hoisted_6$1
|
|
808
836
|
]),
|
|
809
837
|
_: 1
|
|
810
|
-
})) : vue.createCommentVNode("", true),
|
|
838
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
811
839
|
__props.config.enableToggleMode ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
812
840
|
key: 4,
|
|
813
841
|
icon: vue.unref(iconsVue.Grid),
|
|
@@ -832,15 +860,19 @@
|
|
|
832
860
|
};
|
|
833
861
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
834
862
|
const _hoisted_5$1 = ["src"];
|
|
863
|
+
const __default__$r = vue.defineComponent({
|
|
864
|
+
name: "MFormPanel"
|
|
865
|
+
});
|
|
835
866
|
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
836
|
-
|
|
867
|
+
...__default__$r,
|
|
837
868
|
props: {
|
|
838
869
|
model: null,
|
|
839
870
|
config: null,
|
|
840
871
|
name: null,
|
|
841
872
|
labelWidth: null,
|
|
842
873
|
prop: null,
|
|
843
|
-
size: null
|
|
874
|
+
size: null,
|
|
875
|
+
disabled: { type: Boolean }
|
|
844
876
|
},
|
|
845
877
|
emits: ["change"],
|
|
846
878
|
setup(__props, { emit }) {
|
|
@@ -890,9 +922,10 @@
|
|
|
890
922
|
model: __props.name ? __props.model[__props.name] : __props.model,
|
|
891
923
|
prop: __props.prop,
|
|
892
924
|
size: __props.size,
|
|
925
|
+
disabled: __props.disabled,
|
|
893
926
|
"label-width": __props.config.labelWidth || __props.labelWidth,
|
|
894
927
|
onChange: changeHandler
|
|
895
|
-
}, null, 8, ["config", "model", "prop", "size", "label-width"]);
|
|
928
|
+
}, null, 8, ["config", "model", "prop", "size", "disabled", "label-width"]);
|
|
896
929
|
}), 128))
|
|
897
930
|
]),
|
|
898
931
|
vue.createElementVNode("img", {
|
|
@@ -906,9 +939,10 @@
|
|
|
906
939
|
model: __props.name ? __props.model[__props.name] : __props.model,
|
|
907
940
|
prop: __props.prop,
|
|
908
941
|
size: __props.size,
|
|
942
|
+
disabled: __props.disabled,
|
|
909
943
|
"label-width": __props.config.labelWidth || __props.labelWidth,
|
|
910
944
|
onChange: changeHandler
|
|
911
|
-
}, null, 8, ["config", "model", "prop", "size", "label-width"]);
|
|
945
|
+
}, null, 8, ["config", "model", "prop", "size", "disabled", "label-width"]);
|
|
912
946
|
}), 128))
|
|
913
947
|
])
|
|
914
948
|
]),
|
|
@@ -918,8 +952,11 @@
|
|
|
918
952
|
}
|
|
919
953
|
});
|
|
920
954
|
|
|
955
|
+
const __default__$q = vue.defineComponent({
|
|
956
|
+
name: "MFormCol"
|
|
957
|
+
});
|
|
921
958
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
922
|
-
|
|
959
|
+
...__default__$q,
|
|
923
960
|
props: {
|
|
924
961
|
model: null,
|
|
925
962
|
config: null,
|
|
@@ -927,7 +964,8 @@
|
|
|
927
964
|
expandMore: { type: Boolean },
|
|
928
965
|
span: null,
|
|
929
966
|
size: null,
|
|
930
|
-
prop: null
|
|
967
|
+
prop: null,
|
|
968
|
+
disabled: { type: Boolean }
|
|
931
969
|
},
|
|
932
970
|
emits: ["change"],
|
|
933
971
|
setup(__props, { emit }) {
|
|
@@ -945,8 +983,9 @@
|
|
|
945
983
|
"label-width": __props.config.labelWidth || __props.labelWidth,
|
|
946
984
|
"expand-more": __props.expandMore,
|
|
947
985
|
size: __props.size,
|
|
986
|
+
disabled: __props.disabled,
|
|
948
987
|
onChange: changeHandler
|
|
949
|
-
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size"])
|
|
988
|
+
}, null, 8, ["model", "config", "prop", "label-width", "expand-more", "size", "disabled"])
|
|
950
989
|
]),
|
|
951
990
|
_: 1
|
|
952
991
|
}, 8, ["span"])), [
|
|
@@ -956,8 +995,11 @@
|
|
|
956
995
|
}
|
|
957
996
|
});
|
|
958
997
|
|
|
998
|
+
const __default__$p = vue.defineComponent({
|
|
999
|
+
name: "MFormRow"
|
|
1000
|
+
});
|
|
959
1001
|
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
960
|
-
|
|
1002
|
+
...__default__$p,
|
|
961
1003
|
props: {
|
|
962
1004
|
model: null,
|
|
963
1005
|
config: null,
|
|
@@ -965,7 +1007,8 @@
|
|
|
965
1007
|
labelWidth: null,
|
|
966
1008
|
prop: null,
|
|
967
1009
|
size: null,
|
|
968
|
-
expandMore: { type: Boolean }
|
|
1010
|
+
expandMore: { type: Boolean },
|
|
1011
|
+
disabled: { type: Boolean }
|
|
969
1012
|
},
|
|
970
1013
|
emits: ["change"],
|
|
971
1014
|
setup(__props, { emit }) {
|
|
@@ -985,8 +1028,9 @@
|
|
|
985
1028
|
model: __props.name ? __props.model[__props.name] : __props.model,
|
|
986
1029
|
prop: __props.prop,
|
|
987
1030
|
size: __props.size,
|
|
1031
|
+
disabled: __props.disabled,
|
|
988
1032
|
onChange: changeHandler
|
|
989
|
-
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "prop", "size"]);
|
|
1033
|
+
}, null, 8, ["span", "config", "labelWidth", "expandMore", "model", "prop", "size", "disabled"]);
|
|
990
1034
|
}), 128))
|
|
991
1035
|
]),
|
|
992
1036
|
_: 1
|
|
@@ -995,14 +1039,18 @@
|
|
|
995
1039
|
}
|
|
996
1040
|
});
|
|
997
1041
|
|
|
1042
|
+
const __default__$o = vue.defineComponent({
|
|
1043
|
+
name: "MFormStep"
|
|
1044
|
+
});
|
|
998
1045
|
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
999
|
-
|
|
1046
|
+
...__default__$o,
|
|
1000
1047
|
props: {
|
|
1001
1048
|
model: null,
|
|
1002
1049
|
config: null,
|
|
1003
1050
|
stepActive: { default: 1 },
|
|
1004
1051
|
labelWidth: null,
|
|
1005
|
-
size: null
|
|
1052
|
+
size: null,
|
|
1053
|
+
disabled: { type: Boolean }
|
|
1006
1054
|
},
|
|
1007
1055
|
emits: ["change"],
|
|
1008
1056
|
setup(__props, { emit }) {
|
|
@@ -1048,9 +1096,10 @@
|
|
|
1048
1096
|
model: step.name ? __props.model[step.name] : __props.model,
|
|
1049
1097
|
prop: `${step.name}`,
|
|
1050
1098
|
size: __props.size,
|
|
1099
|
+
disabled: __props.disabled,
|
|
1051
1100
|
"label-width": __props.config.labelWidth || __props.labelWidth,
|
|
1052
1101
|
onChange: changeHandler
|
|
1053
|
-
}, null, 8, ["config", "model", "prop", "size", "label-width"])), [
|
|
1102
|
+
}, null, 8, ["config", "model", "prop", "size", "disabled", "label-width"])), [
|
|
1054
1103
|
[vue.vShow, active.value - 1 === index]
|
|
1055
1104
|
]) : vue.createCommentVNode("", true)
|
|
1056
1105
|
], 64);
|
|
@@ -1072,11 +1121,15 @@
|
|
|
1072
1121
|
const _hoisted_8 = /* @__PURE__ */ vue.createTextVNode("\xA0 ");
|
|
1073
1122
|
const _hoisted_9 = /* @__PURE__ */ vue.createTextVNode("\u6E05\u7A7A");
|
|
1074
1123
|
const _hoisted_10 = {
|
|
1124
|
+
key: 1,
|
|
1075
1125
|
class: "bottom",
|
|
1076
1126
|
style: { "text-align": "right" }
|
|
1077
1127
|
};
|
|
1128
|
+
const __default__$n = vue.defineComponent({
|
|
1129
|
+
name: "MFormTable"
|
|
1130
|
+
});
|
|
1078
1131
|
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
1079
|
-
|
|
1132
|
+
...__default__$n,
|
|
1080
1133
|
props: {
|
|
1081
1134
|
model: null,
|
|
1082
1135
|
config: null,
|
|
@@ -1084,6 +1137,7 @@
|
|
|
1084
1137
|
prop: { default: "" },
|
|
1085
1138
|
labelWidth: null,
|
|
1086
1139
|
sort: { type: Boolean },
|
|
1140
|
+
disabled: { type: Boolean },
|
|
1087
1141
|
sortKey: { default: "" },
|
|
1088
1142
|
text: null,
|
|
1089
1143
|
size: null,
|
|
@@ -1103,6 +1157,11 @@
|
|
|
1103
1157
|
const updateKey = vue.ref(1);
|
|
1104
1158
|
const isFullscreen = vue.ref(false);
|
|
1105
1159
|
const modelName = vue.computed(() => props.name || props.config.name || "");
|
|
1160
|
+
const data = vue.computed(
|
|
1161
|
+
() => props.config.pagination ? props.model[modelName.value].filter(
|
|
1162
|
+
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
1163
|
+
) : props.model[modelName.value]
|
|
1164
|
+
);
|
|
1106
1165
|
const sortChange = ({ prop, order }) => {
|
|
1107
1166
|
if (order === "ascending") {
|
|
1108
1167
|
props.model[modelName.value] = props.model[modelName.value].sort((a, b) => a[prop] - b[prop]);
|
|
@@ -1128,10 +1187,10 @@
|
|
|
1128
1187
|
mForm?.$emit("field-change", props.prop, props.model[modelName.value]);
|
|
1129
1188
|
};
|
|
1130
1189
|
const rowDrop = () => {
|
|
1131
|
-
const tableEl = tMagicTable.value
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
const sortable = Sortable__default.default.create(
|
|
1190
|
+
const tableEl = tMagicTable.value?.instance.$el;
|
|
1191
|
+
const tBodyEl = tableEl?.querySelector(".el-table__body > tbody");
|
|
1192
|
+
if (tBodyEl) {
|
|
1193
|
+
const sortable = Sortable__default.default.create(tBodyEl, {
|
|
1135
1194
|
onEnd: ({ newIndex, oldIndex }) => {
|
|
1136
1195
|
if (typeof newIndex === "undefined")
|
|
1137
1196
|
return;
|
|
@@ -1143,11 +1202,11 @@
|
|
|
1143
1202
|
sortable.destroy();
|
|
1144
1203
|
mForm?.$emit("field-change", props.prop, props.model[modelName.value]);
|
|
1145
1204
|
utils.sleep(1e3).then(() => {
|
|
1146
|
-
const
|
|
1147
|
-
if (
|
|
1148
|
-
|
|
1205
|
+
const elTrs = tableEl.querySelectorAll(".el-table__body > tbody > tr");
|
|
1206
|
+
if (elTrs?.[newIndex]) {
|
|
1207
|
+
elTrs[newIndex].style.backgroundColor = "rgba(243, 89, 59, 0.2)";
|
|
1149
1208
|
utils.sleep(1e3).then(() => {
|
|
1150
|
-
|
|
1209
|
+
elTrs[newIndex].style.backgroundColor = "";
|
|
1151
1210
|
});
|
|
1152
1211
|
}
|
|
1153
1212
|
});
|
|
@@ -1218,6 +1277,8 @@
|
|
|
1218
1277
|
if (props.sort && props.sortKey) {
|
|
1219
1278
|
props.model[modelName.value].sort((a, b) => b[props.sortKey] - a[props.sortKey]);
|
|
1220
1279
|
}
|
|
1280
|
+
});
|
|
1281
|
+
vue.watchEffect(() => {
|
|
1221
1282
|
if (props.config.dropSort) {
|
|
1222
1283
|
rowDrop();
|
|
1223
1284
|
}
|
|
@@ -1264,6 +1325,8 @@
|
|
|
1264
1325
|
return fuc;
|
|
1265
1326
|
};
|
|
1266
1327
|
const removeHandler = (index) => {
|
|
1328
|
+
if (props.disabled)
|
|
1329
|
+
return;
|
|
1267
1330
|
props.model[modelName.value].splice(index, 1);
|
|
1268
1331
|
emit("change", props.model[modelName.value]);
|
|
1269
1332
|
};
|
|
@@ -1280,8 +1343,11 @@
|
|
|
1280
1343
|
const toggleRowSelection = (row, selected) => {
|
|
1281
1344
|
tMagicTable.value?.toggleRowSelection.call(tMagicTable.value, row, selected);
|
|
1282
1345
|
};
|
|
1283
|
-
const makeConfig = (config) => {
|
|
1346
|
+
const makeConfig = (config, row) => {
|
|
1284
1347
|
const newConfig = lodashEs.cloneDeep(config);
|
|
1348
|
+
if (typeof config.itemsFunction === "function") {
|
|
1349
|
+
newConfig.items = config.itemsFunction(row);
|
|
1350
|
+
}
|
|
1285
1351
|
delete newConfig.display;
|
|
1286
1352
|
return newConfig;
|
|
1287
1353
|
};
|
|
@@ -1339,8 +1405,8 @@
|
|
|
1339
1405
|
}
|
|
1340
1406
|
const reader = new FileReader();
|
|
1341
1407
|
reader.onload = () => {
|
|
1342
|
-
const
|
|
1343
|
-
const pdata = globalThis.XLSX.read(
|
|
1408
|
+
const data2 = reader.result;
|
|
1409
|
+
const pdata = globalThis.XLSX.read(data2, { type: "array" });
|
|
1344
1410
|
pdata.SheetNames.forEach((sheetName) => {
|
|
1345
1411
|
const arr = globalThis.XLSX.utils.sheet_to_json(pdata.Sheets[sheetName], { header: 1 });
|
|
1346
1412
|
if (arr?.[0]) {
|
|
@@ -1422,7 +1488,8 @@
|
|
|
1422
1488
|
ref_key: "tMagicTable",
|
|
1423
1489
|
ref: tMagicTable,
|
|
1424
1490
|
style: { "width": "100%" },
|
|
1425
|
-
|
|
1491
|
+
"row-key": __props.config.rowKey || "id",
|
|
1492
|
+
data: vue.unref(data),
|
|
1426
1493
|
border: __props.config.border,
|
|
1427
1494
|
"max-height": __props.config.maxHeight,
|
|
1428
1495
|
"default-expand-all": true,
|
|
@@ -1483,10 +1550,11 @@
|
|
|
1483
1550
|
size: "small",
|
|
1484
1551
|
type: "primary",
|
|
1485
1552
|
icon: vue.unref(iconsVue.ArrowUp),
|
|
1553
|
+
disabled: __props.disabled,
|
|
1486
1554
|
text: "",
|
|
1487
1555
|
onClick: ($event) => upHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1488
1556
|
onDblclick: ($event) => topHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1489
|
-
}, null, 8, ["icon", "onClick", "onDblclick"])
|
|
1557
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1490
1558
|
]),
|
|
1491
1559
|
_: 2
|
|
1492
1560
|
}, 1024)) : vue.createCommentVNode("", true),
|
|
@@ -1501,10 +1569,11 @@
|
|
|
1501
1569
|
size: "small",
|
|
1502
1570
|
type: "primary",
|
|
1503
1571
|
icon: vue.unref(iconsVue.ArrowDown),
|
|
1572
|
+
disabled: __props.disabled,
|
|
1504
1573
|
text: "",
|
|
1505
1574
|
onClick: ($event) => downHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1),
|
|
1506
1575
|
onDblclick: ($event) => bottomHandler(scope.$index + 1 + pagecontext.value * pagesize.value - 1)
|
|
1507
|
-
}, null, 8, ["icon", "onClick", "onDblclick"])
|
|
1576
|
+
}, null, 8, ["icon", "disabled", "onClick", "onDblclick"])
|
|
1508
1577
|
]),
|
|
1509
1578
|
_: 2
|
|
1510
1579
|
}, 1024)) : vue.createCommentVNode("", true)
|
|
@@ -1543,13 +1612,14 @@
|
|
|
1543
1612
|
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
1544
1613
|
key: 0,
|
|
1545
1614
|
labelWidth: "0",
|
|
1615
|
+
disabled: __props.disabled,
|
|
1546
1616
|
prop: getProp(scope.$index),
|
|
1547
1617
|
rules: column.rules,
|
|
1548
|
-
config: makeConfig(column),
|
|
1618
|
+
config: makeConfig(column, scope.row),
|
|
1549
1619
|
model: scope.row,
|
|
1550
1620
|
size: __props.size,
|
|
1551
1621
|
onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", __props.model[vue.unref(modelName)]))
|
|
1552
|
-
}, null, 8, ["prop", "rules", "config", "model", "size"])) : vue.createCommentVNode("", true)
|
|
1622
|
+
}, null, 8, ["disabled", "prop", "rules", "config", "model", "size"])) : vue.createCommentVNode("", true)
|
|
1553
1623
|
]),
|
|
1554
1624
|
_: 2
|
|
1555
1625
|
}, 1032, ["prop", "width", "label", "sortable", "class-name"])) : vue.createCommentVNode("", true)
|
|
@@ -1557,7 +1627,7 @@
|
|
|
1557
1627
|
}), 256))
|
|
1558
1628
|
]),
|
|
1559
1629
|
_: 1
|
|
1560
|
-
}, 8, ["data", "border", "max-height"])) : vue.createCommentVNode("", true)
|
|
1630
|
+
}, 8, ["row-key", "data", "border", "max-height"])) : vue.createCommentVNode("", true)
|
|
1561
1631
|
]),
|
|
1562
1632
|
_: 1
|
|
1563
1633
|
}, 8, ["disabled"]),
|
|
@@ -1566,6 +1636,7 @@
|
|
|
1566
1636
|
key: 0,
|
|
1567
1637
|
size: "small",
|
|
1568
1638
|
type: "primary",
|
|
1639
|
+
disabled: __props.disabled,
|
|
1569
1640
|
plain: "",
|
|
1570
1641
|
onClick: _cache[1] || (_cache[1] = ($event) => newHandler())
|
|
1571
1642
|
}, {
|
|
@@ -1573,7 +1644,7 @@
|
|
|
1573
1644
|
_hoisted_4$1
|
|
1574
1645
|
]),
|
|
1575
1646
|
_: 1
|
|
1576
|
-
})) : vue.createCommentVNode("", true),
|
|
1647
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
1577
1648
|
_hoisted_5,
|
|
1578
1649
|
__props.enableToggleMode && !isFullscreen.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1579
1650
|
key: 1,
|
|
@@ -1601,32 +1672,35 @@
|
|
|
1601
1672
|
}, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
1602
1673
|
vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicUpload), {
|
|
1603
1674
|
key: 3,
|
|
1675
|
+
style: { "display": "inline-block" },
|
|
1604
1676
|
ref_key: "excelBtn",
|
|
1605
1677
|
ref: excelBtn,
|
|
1606
1678
|
action: "/noop",
|
|
1679
|
+
disabled: __props.disabled,
|
|
1607
1680
|
"on-change": excelHandler,
|
|
1608
|
-
"auto-upload": false
|
|
1609
|
-
style: { "display": "inline-block" }
|
|
1681
|
+
"auto-upload": false
|
|
1610
1682
|
}, {
|
|
1611
1683
|
default: vue.withCtx(() => [
|
|
1612
1684
|
vue.createVNode(vue.unref(design.TMagicButton), {
|
|
1613
1685
|
size: "small",
|
|
1614
1686
|
type: "success",
|
|
1687
|
+
disabled: __props.disabled,
|
|
1615
1688
|
plain: ""
|
|
1616
1689
|
}, {
|
|
1617
1690
|
default: vue.withCtx(() => [
|
|
1618
1691
|
_hoisted_7
|
|
1619
1692
|
]),
|
|
1620
1693
|
_: 1
|
|
1621
|
-
})
|
|
1694
|
+
}, 8, ["disabled"])
|
|
1622
1695
|
]),
|
|
1623
1696
|
_: 1
|
|
1624
|
-
},
|
|
1697
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true),
|
|
1625
1698
|
_hoisted_8,
|
|
1626
1699
|
vue.unref(importable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
1627
1700
|
key: 4,
|
|
1628
1701
|
size: "small",
|
|
1629
1702
|
type: "warning",
|
|
1703
|
+
disabled: __props.disabled,
|
|
1630
1704
|
plain: "",
|
|
1631
1705
|
onClick: _cache[2] || (_cache[2] = ($event) => clearHandler())
|
|
1632
1706
|
}, {
|
|
@@ -1634,9 +1708,9 @@
|
|
|
1634
1708
|
_hoisted_9
|
|
1635
1709
|
]),
|
|
1636
1710
|
_: 1
|
|
1637
|
-
})) : vue.createCommentVNode("", true)
|
|
1711
|
+
}, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
1638
1712
|
]),
|
|
1639
|
-
vue.
|
|
1713
|
+
__props.config.pagination ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
|
|
1640
1714
|
vue.createVNode(vue.unref(design.TMagicPagination), {
|
|
1641
1715
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
1642
1716
|
"hide-on-single-page": __props.model[vue.unref(modelName)].length < pagesize.value,
|
|
@@ -1647,14 +1721,17 @@
|
|
|
1647
1721
|
onSizeChange: handleSizeChange,
|
|
1648
1722
|
onCurrentChange: handleCurrentChange
|
|
1649
1723
|
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total"])
|
|
1650
|
-
])
|
|
1724
|
+
])) : vue.createCommentVNode("", true)
|
|
1651
1725
|
], 2);
|
|
1652
1726
|
};
|
|
1653
1727
|
}
|
|
1654
1728
|
});
|
|
1655
1729
|
|
|
1730
|
+
const __default__$m = vue.defineComponent({
|
|
1731
|
+
name: "MFormTabs"
|
|
1732
|
+
});
|
|
1656
1733
|
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
1657
|
-
|
|
1734
|
+
...__default__$m,
|
|
1658
1735
|
props: {
|
|
1659
1736
|
model: null,
|
|
1660
1737
|
config: null,
|
|
@@ -1662,11 +1739,13 @@
|
|
|
1662
1739
|
size: null,
|
|
1663
1740
|
labelWidth: null,
|
|
1664
1741
|
prop: null,
|
|
1665
|
-
expandMore: { type: Boolean }
|
|
1742
|
+
expandMore: { type: Boolean },
|
|
1743
|
+
disabled: { type: Boolean }
|
|
1666
1744
|
},
|
|
1667
1745
|
emits: ["change"],
|
|
1668
1746
|
setup(__props, { emit }) {
|
|
1669
1747
|
const props = __props;
|
|
1748
|
+
const uiComponent = design.getConfig("components").tabPane;
|
|
1670
1749
|
const getActive = (mForm2, props2, activeTabName2) => {
|
|
1671
1750
|
const { config, model, prop } = props2;
|
|
1672
1751
|
const { active } = config;
|
|
@@ -1768,7 +1847,7 @@
|
|
|
1768
1847
|
default: vue.withCtx(() => [
|
|
1769
1848
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tabs), (tab, tabIndex) => {
|
|
1770
1849
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1771
|
-
display$1(tab.display) && tabItems(tab).length ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
1850
|
+
display$1(tab.display) && tabItems(tab).length ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(uiComponent).component), {
|
|
1772
1851
|
key: tab[vue.unref(mForm)?.keyProp || "__key"] ?? tabIndex,
|
|
1773
1852
|
name: filter(tab.status) || tabIndex.toString(),
|
|
1774
1853
|
label: filter(tab.title),
|
|
@@ -1779,13 +1858,14 @@
|
|
|
1779
1858
|
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
1780
1859
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
1781
1860
|
config: item,
|
|
1861
|
+
disabled: __props.disabled,
|
|
1782
1862
|
model: __props.config.dynamic ? (__props.name ? __props.model[__props.name] : __props.model)[tabIndex] : tab.name ? (__props.name ? __props.model[__props.name] : __props.model)[tab.name] : __props.name ? __props.model[__props.name] : __props.model,
|
|
1783
1863
|
prop: __props.config.dynamic ? `${__props.prop}${__props.prop ? "." : ""}${String(tabIndex)}` : __props.prop,
|
|
1784
1864
|
size: __props.size,
|
|
1785
1865
|
"label-width": tab.labelWidth || __props.labelWidth,
|
|
1786
1866
|
"expand-more": __props.expandMore,
|
|
1787
1867
|
onChange: changeHandler
|
|
1788
|
-
}, null, 8, ["config", "model", "prop", "size", "label-width", "expand-more"]);
|
|
1868
|
+
}, null, 8, ["config", "disabled", "model", "prop", "size", "label-width", "expand-more"]);
|
|
1789
1869
|
}), 128))
|
|
1790
1870
|
]),
|
|
1791
1871
|
_: 2
|
|
@@ -1825,8 +1905,11 @@
|
|
|
1825
1905
|
);
|
|
1826
1906
|
};
|
|
1827
1907
|
|
|
1908
|
+
const __default__$l = vue.defineComponent({
|
|
1909
|
+
name: "MFormCascader"
|
|
1910
|
+
});
|
|
1828
1911
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
1829
|
-
|
|
1912
|
+
...__default__$l,
|
|
1830
1913
|
props: {
|
|
1831
1914
|
config: null,
|
|
1832
1915
|
model: null,
|
|
@@ -1909,8 +1992,11 @@
|
|
|
1909
1992
|
}
|
|
1910
1993
|
});
|
|
1911
1994
|
|
|
1995
|
+
const __default__$k = vue.defineComponent({
|
|
1996
|
+
name: "MFormCheckbox"
|
|
1997
|
+
});
|
|
1912
1998
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
1913
|
-
|
|
1999
|
+
...__default__$k,
|
|
1914
2000
|
props: {
|
|
1915
2001
|
config: null,
|
|
1916
2002
|
model: null,
|
|
@@ -1967,8 +2053,11 @@
|
|
|
1967
2053
|
}
|
|
1968
2054
|
});
|
|
1969
2055
|
|
|
2056
|
+
const __default__$j = vue.defineComponent({
|
|
2057
|
+
name: "MFormCheckGroup"
|
|
2058
|
+
});
|
|
1970
2059
|
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
1971
|
-
|
|
2060
|
+
...__default__$j,
|
|
1972
2061
|
props: {
|
|
1973
2062
|
config: null,
|
|
1974
2063
|
model: null,
|
|
@@ -2009,6 +2098,7 @@
|
|
|
2009
2098
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(options), (option) => {
|
|
2010
2099
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCheckbox), {
|
|
2011
2100
|
label: option.value,
|
|
2101
|
+
value: option.value,
|
|
2012
2102
|
key: option.value,
|
|
2013
2103
|
disabled: option.disabled
|
|
2014
2104
|
}, {
|
|
@@ -2016,7 +2106,7 @@
|
|
|
2016
2106
|
vue.createTextVNode(vue.toDisplayString(option.text), 1)
|
|
2017
2107
|
]),
|
|
2018
2108
|
_: 2
|
|
2019
|
-
}, 1032, ["label", "disabled"]);
|
|
2109
|
+
}, 1032, ["label", "value", "disabled"]);
|
|
2020
2110
|
}), 128))
|
|
2021
2111
|
]),
|
|
2022
2112
|
_: 1
|
|
@@ -2025,8 +2115,11 @@
|
|
|
2025
2115
|
}
|
|
2026
2116
|
});
|
|
2027
2117
|
|
|
2118
|
+
const __default__$i = vue.defineComponent({
|
|
2119
|
+
name: "MFormColorPicker"
|
|
2120
|
+
});
|
|
2028
2121
|
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
2029
|
-
|
|
2122
|
+
...__default__$i,
|
|
2030
2123
|
props: {
|
|
2031
2124
|
config: null,
|
|
2032
2125
|
model: null,
|
|
@@ -2055,8 +2148,11 @@
|
|
|
2055
2148
|
}
|
|
2056
2149
|
});
|
|
2057
2150
|
|
|
2151
|
+
const __default__$h = vue.defineComponent({
|
|
2152
|
+
name: "MFormDate"
|
|
2153
|
+
});
|
|
2058
2154
|
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
2059
|
-
|
|
2155
|
+
...__default__$h,
|
|
2060
2156
|
props: {
|
|
2061
2157
|
config: null,
|
|
2062
2158
|
model: null,
|
|
@@ -2084,15 +2180,18 @@
|
|
|
2084
2180
|
placeholder: __props.config.placeholder,
|
|
2085
2181
|
disabled: __props.disabled,
|
|
2086
2182
|
format: __props.config.format,
|
|
2087
|
-
"value-format": __props.config.
|
|
2183
|
+
"value-format": __props.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
2088
2184
|
onChange: changeHandler
|
|
2089
2185
|
}, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format"]);
|
|
2090
2186
|
};
|
|
2091
2187
|
}
|
|
2092
2188
|
});
|
|
2093
2189
|
|
|
2190
|
+
const __default__$g = vue.defineComponent({
|
|
2191
|
+
name: "MFormDateRange"
|
|
2192
|
+
});
|
|
2094
2193
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2095
|
-
|
|
2194
|
+
...__default__$g,
|
|
2096
2195
|
props: {
|
|
2097
2196
|
config: null,
|
|
2098
2197
|
model: null,
|
|
@@ -2189,8 +2288,11 @@
|
|
|
2189
2288
|
}
|
|
2190
2289
|
});
|
|
2191
2290
|
|
|
2291
|
+
const __default__$f = vue.defineComponent({
|
|
2292
|
+
name: "MFormDateTime"
|
|
2293
|
+
});
|
|
2192
2294
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
2193
|
-
|
|
2295
|
+
...__default__$f,
|
|
2194
2296
|
props: {
|
|
2195
2297
|
config: null,
|
|
2196
2298
|
model: null,
|
|
@@ -2235,8 +2337,11 @@
|
|
|
2235
2337
|
});
|
|
2236
2338
|
|
|
2237
2339
|
const _hoisted_1$5 = { key: 0 };
|
|
2340
|
+
const __default__$e = vue.defineComponent({
|
|
2341
|
+
name: "MFormDisplay"
|
|
2342
|
+
});
|
|
2238
2343
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
2239
|
-
|
|
2344
|
+
...__default__$e,
|
|
2240
2345
|
props: {
|
|
2241
2346
|
config: null,
|
|
2242
2347
|
model: null,
|
|
@@ -2258,8 +2363,11 @@
|
|
|
2258
2363
|
});
|
|
2259
2364
|
|
|
2260
2365
|
const _hoisted_1$4 = { class: "m-fields-dynamic-field" };
|
|
2366
|
+
const __default__$d = vue.defineComponent({
|
|
2367
|
+
name: "MFormDynamicField"
|
|
2368
|
+
});
|
|
2261
2369
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
2262
|
-
|
|
2370
|
+
...__default__$d,
|
|
2263
2371
|
props: {
|
|
2264
2372
|
config: null,
|
|
2265
2373
|
model: null,
|
|
@@ -2346,8 +2454,11 @@
|
|
|
2346
2454
|
}
|
|
2347
2455
|
});
|
|
2348
2456
|
|
|
2457
|
+
const __default__$c = vue.defineComponent({
|
|
2458
|
+
name: "MFormHidden"
|
|
2459
|
+
});
|
|
2349
2460
|
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
2350
|
-
|
|
2461
|
+
...__default__$c,
|
|
2351
2462
|
props: {
|
|
2352
2463
|
config: null,
|
|
2353
2464
|
model: null,
|
|
@@ -2371,8 +2482,11 @@
|
|
|
2371
2482
|
}
|
|
2372
2483
|
});
|
|
2373
2484
|
|
|
2485
|
+
const __default__$b = vue.defineComponent({
|
|
2486
|
+
name: "MForm"
|
|
2487
|
+
});
|
|
2374
2488
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
2375
|
-
|
|
2489
|
+
...__default__$b,
|
|
2376
2490
|
props: {
|
|
2377
2491
|
config: { default: () => [] },
|
|
2378
2492
|
initValues: { default: () => ({}) },
|
|
@@ -2476,7 +2590,6 @@
|
|
|
2476
2590
|
ref: tMagicForm,
|
|
2477
2591
|
model: values.value,
|
|
2478
2592
|
"label-width": __props.labelWidth,
|
|
2479
|
-
disabled: __props.disabled,
|
|
2480
2593
|
style: vue.normalizeStyle(`height: ${__props.height}`),
|
|
2481
2594
|
inline: __props.inline,
|
|
2482
2595
|
"label-position": __props.labelPosition
|
|
@@ -2484,6 +2597,7 @@
|
|
|
2484
2597
|
default: vue.withCtx(() => [
|
|
2485
2598
|
initialized.value && Array.isArray(__props.config) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(__props.config, (item, index) => {
|
|
2486
2599
|
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
2600
|
+
disabled: __props.disabled,
|
|
2487
2601
|
key: item[__props.keyProp] ?? index,
|
|
2488
2602
|
config: item,
|
|
2489
2603
|
model: values.value,
|
|
@@ -2491,11 +2605,11 @@
|
|
|
2491
2605
|
"step-active": __props.stepActive,
|
|
2492
2606
|
size: __props.size,
|
|
2493
2607
|
onChange: changeHandler
|
|
2494
|
-
}, null, 8, ["config", "model", "label-width", "step-active", "size"]);
|
|
2608
|
+
}, null, 8, ["disabled", "config", "model", "label-width", "step-active", "size"]);
|
|
2495
2609
|
}), 128)) : vue.createCommentVNode("", true)
|
|
2496
2610
|
]),
|
|
2497
2611
|
_: 1
|
|
2498
|
-
}, 8, ["model", "label-width", "
|
|
2612
|
+
}, 8, ["model", "label-width", "style", "inline", "label-position"]);
|
|
2499
2613
|
};
|
|
2500
2614
|
}
|
|
2501
2615
|
});
|
|
@@ -2504,8 +2618,11 @@
|
|
|
2504
2618
|
const _hoisted_2$1 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
|
|
2505
2619
|
const _hoisted_3$1 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u4E00\u6B65");
|
|
2506
2620
|
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u4E00\u6B65");
|
|
2621
|
+
const __default__$a = vue.defineComponent({
|
|
2622
|
+
name: "MFormDialog"
|
|
2623
|
+
});
|
|
2507
2624
|
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
2508
|
-
|
|
2625
|
+
...__default__$a,
|
|
2509
2626
|
props: {
|
|
2510
2627
|
config: { default: () => [] },
|
|
2511
2628
|
values: { default: () => ({}) },
|
|
@@ -2513,6 +2630,7 @@
|
|
|
2513
2630
|
width: null,
|
|
2514
2631
|
labelWidth: null,
|
|
2515
2632
|
fullscreen: { type: Boolean },
|
|
2633
|
+
disabled: { type: Boolean },
|
|
2516
2634
|
title: null,
|
|
2517
2635
|
zIndex: null,
|
|
2518
2636
|
size: null,
|
|
@@ -2668,12 +2786,13 @@
|
|
|
2668
2786
|
ref_key: "form",
|
|
2669
2787
|
ref: form,
|
|
2670
2788
|
size: __props.size,
|
|
2789
|
+
disabled: __props.disabled,
|
|
2671
2790
|
config: __props.config,
|
|
2672
2791
|
"init-values": __props.values,
|
|
2673
2792
|
"parent-values": __props.parentValues,
|
|
2674
2793
|
"label-width": __props.labelWidth,
|
|
2675
2794
|
onChange: changeHandler
|
|
2676
|
-
}, null, 8, ["modelValue", "size", "config", "init-values", "parent-values", "label-width"]),
|
|
2795
|
+
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
|
|
2677
2796
|
vue.renderSlot(_ctx.$slots, "default")
|
|
2678
2797
|
], 4)) : vue.createCommentVNode("", true)
|
|
2679
2798
|
]),
|
|
@@ -2689,8 +2808,11 @@
|
|
|
2689
2808
|
class: "m-fields-link"
|
|
2690
2809
|
};
|
|
2691
2810
|
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u70B9\u51FB\u7F16\u8F91");
|
|
2811
|
+
const __default__$9 = vue.defineComponent({
|
|
2812
|
+
name: "MFormLink"
|
|
2813
|
+
});
|
|
2692
2814
|
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
2693
|
-
|
|
2815
|
+
...__default__$9,
|
|
2694
2816
|
props: {
|
|
2695
2817
|
config: null,
|
|
2696
2818
|
model: null,
|
|
@@ -2783,8 +2905,11 @@
|
|
|
2783
2905
|
}
|
|
2784
2906
|
});
|
|
2785
2907
|
|
|
2908
|
+
const __default__$8 = vue.defineComponent({
|
|
2909
|
+
name: "MFormNumber"
|
|
2910
|
+
});
|
|
2786
2911
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
2787
|
-
|
|
2912
|
+
...__default__$8,
|
|
2788
2913
|
props: {
|
|
2789
2914
|
config: null,
|
|
2790
2915
|
model: null,
|
|
@@ -2827,8 +2952,11 @@
|
|
|
2827
2952
|
}
|
|
2828
2953
|
});
|
|
2829
2954
|
|
|
2955
|
+
const __default__$7 = vue.defineComponent({
|
|
2956
|
+
name: "MFormRadioGroup"
|
|
2957
|
+
});
|
|
2830
2958
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
2831
|
-
|
|
2959
|
+
...__default__$7,
|
|
2832
2960
|
props: {
|
|
2833
2961
|
config: null,
|
|
2834
2962
|
model: null,
|
|
@@ -2859,13 +2987,14 @@
|
|
|
2859
2987
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.config.options, (option) => {
|
|
2860
2988
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicRadio), {
|
|
2861
2989
|
label: option.value,
|
|
2990
|
+
value: option.value,
|
|
2862
2991
|
key: `${option.value}`
|
|
2863
2992
|
}, {
|
|
2864
2993
|
default: vue.withCtx(() => [
|
|
2865
2994
|
vue.createTextVNode(vue.toDisplayString(option.text), 1)
|
|
2866
2995
|
]),
|
|
2867
2996
|
_: 2
|
|
2868
|
-
}, 1032, ["label"]);
|
|
2997
|
+
}, 1032, ["label", "value"]);
|
|
2869
2998
|
}), 128))
|
|
2870
2999
|
]),
|
|
2871
3000
|
_: 1
|
|
@@ -2874,8 +3003,11 @@
|
|
|
2874
3003
|
}
|
|
2875
3004
|
});
|
|
2876
3005
|
|
|
3006
|
+
const __default__$6 = vue.defineComponent({
|
|
3007
|
+
name: "MFormSelectOptionGroups"
|
|
3008
|
+
});
|
|
2877
3009
|
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
2878
|
-
|
|
3010
|
+
...__default__$6,
|
|
2879
3011
|
props: {
|
|
2880
3012
|
options: null
|
|
2881
3013
|
},
|
|
@@ -2905,8 +3037,11 @@
|
|
|
2905
3037
|
}
|
|
2906
3038
|
});
|
|
2907
3039
|
|
|
3040
|
+
const __default__$5 = vue.defineComponent({
|
|
3041
|
+
name: "MFormSelectOptions"
|
|
3042
|
+
});
|
|
2908
3043
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
2909
|
-
|
|
3044
|
+
...__default__$5,
|
|
2910
3045
|
props: {
|
|
2911
3046
|
options: null,
|
|
2912
3047
|
valueKey: null
|
|
@@ -2926,8 +3061,11 @@
|
|
|
2926
3061
|
});
|
|
2927
3062
|
|
|
2928
3063
|
const _hoisted_1$1 = { key: 2 };
|
|
3064
|
+
const __default__$4 = vue.defineComponent({
|
|
3065
|
+
name: "MFormSelect"
|
|
3066
|
+
});
|
|
2929
3067
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
2930
|
-
|
|
3068
|
+
...__default__$4,
|
|
2931
3069
|
props: {
|
|
2932
3070
|
config: null,
|
|
2933
3071
|
model: null,
|
|
@@ -2982,30 +3120,32 @@
|
|
|
2982
3120
|
let items = [];
|
|
2983
3121
|
const { config } = props;
|
|
2984
3122
|
const { option } = config;
|
|
2985
|
-
|
|
3123
|
+
const { root = "", totalKey = "total" } = option;
|
|
3124
|
+
let { body = {}, url } = option;
|
|
3125
|
+
if (typeof url === "function") {
|
|
3126
|
+
url = await url(mForm, { model: props.model, formValue: mForm?.values });
|
|
3127
|
+
}
|
|
2986
3128
|
let postOptions = {
|
|
2987
3129
|
method: option.method || "POST",
|
|
2988
|
-
url
|
|
3130
|
+
url,
|
|
2989
3131
|
cache: option.cache,
|
|
2990
3132
|
timeout: option.timeout,
|
|
2991
3133
|
mode: option.mode,
|
|
2992
3134
|
headers: option.headers || {},
|
|
2993
3135
|
json: option.json || false
|
|
2994
3136
|
};
|
|
2995
|
-
if (body) {
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
});
|
|
3003
|
-
}
|
|
3004
|
-
body.query = query.value;
|
|
3005
|
-
body.pgSize = pgSize.value;
|
|
3006
|
-
body.pgIndex = pgIndex.value;
|
|
3007
|
-
postOptions.data = body;
|
|
3137
|
+
if (typeof body === "function") {
|
|
3138
|
+
body = body(mForm, {
|
|
3139
|
+
model: props.model,
|
|
3140
|
+
formValue: mForm?.values,
|
|
3141
|
+
formValues: mForm?.values,
|
|
3142
|
+
config: props.config
|
|
3143
|
+
});
|
|
3008
3144
|
}
|
|
3145
|
+
body.query = query.value;
|
|
3146
|
+
body.pgSize = pgSize.value;
|
|
3147
|
+
body.pgIndex = pgIndex.value;
|
|
3148
|
+
postOptions.data = body;
|
|
3009
3149
|
const requestFuc = getConfig("request");
|
|
3010
3150
|
if (typeof option.beforeRequest === "function") {
|
|
3011
3151
|
postOptions = option.beforeRequest(mForm, postOptions, {
|
|
@@ -3025,9 +3165,13 @@
|
|
|
3025
3165
|
config: props.config
|
|
3026
3166
|
});
|
|
3027
3167
|
}
|
|
3028
|
-
const optionsData =
|
|
3029
|
-
|
|
3030
|
-
|
|
3168
|
+
const optionsData = root.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res);
|
|
3169
|
+
const resTotal = globalThis.parseInt(
|
|
3170
|
+
totalKey.split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res),
|
|
3171
|
+
10
|
|
3172
|
+
);
|
|
3173
|
+
if (resTotal > 0) {
|
|
3174
|
+
total.value = resTotal;
|
|
3031
3175
|
}
|
|
3032
3176
|
remoteData.value = remoteData.value.concat(optionsData);
|
|
3033
3177
|
if (optionsData) {
|
|
@@ -3076,6 +3220,8 @@
|
|
|
3076
3220
|
return [];
|
|
3077
3221
|
const { config } = props;
|
|
3078
3222
|
const { option } = config;
|
|
3223
|
+
const { root = "", initRoot = "" } = option;
|
|
3224
|
+
let { initBody = {} } = option;
|
|
3079
3225
|
let options2 = [];
|
|
3080
3226
|
let url = option.initUrl;
|
|
3081
3227
|
if (!url) {
|
|
@@ -3084,22 +3230,45 @@
|
|
|
3084
3230
|
if (typeof url === "function") {
|
|
3085
3231
|
url = await url(mForm, { model: props.model, formValue: mForm?.values });
|
|
3086
3232
|
}
|
|
3087
|
-
|
|
3233
|
+
if (typeof initBody === "function") {
|
|
3234
|
+
initBody = initBody(mForm, {
|
|
3235
|
+
model: props.model,
|
|
3236
|
+
formValue: mForm?.values,
|
|
3237
|
+
formValues: mForm?.values,
|
|
3238
|
+
config: props.config
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
let postOptions = {
|
|
3088
3242
|
method: option.method || "POST",
|
|
3089
3243
|
url,
|
|
3090
3244
|
data: {
|
|
3091
|
-
id: props.model[props.name]
|
|
3245
|
+
id: props.model[props.name],
|
|
3246
|
+
...initBody
|
|
3092
3247
|
},
|
|
3093
3248
|
mode: option.mode,
|
|
3094
3249
|
headers: option.headers || {},
|
|
3095
3250
|
json: option.json || false
|
|
3096
3251
|
};
|
|
3252
|
+
if (typeof option.beforeInitRequest === "function") {
|
|
3253
|
+
postOptions = option.beforeInitRequest(mForm, postOptions, {
|
|
3254
|
+
model: props.model,
|
|
3255
|
+
formValue: mForm?.values
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3097
3258
|
if (option.method?.toLocaleLowerCase() === "jsonp") {
|
|
3098
3259
|
postOptions.jsonpCallback = option.jsonpCallback || "callback";
|
|
3099
3260
|
}
|
|
3100
3261
|
const requestFuc = getConfig("request");
|
|
3101
|
-
|
|
3102
|
-
|
|
3262
|
+
let res = await requestFuc(postOptions);
|
|
3263
|
+
if (typeof option.afterRequest === "function") {
|
|
3264
|
+
res = option.afterRequest(mForm, res, {
|
|
3265
|
+
model: props.model,
|
|
3266
|
+
formValue: mForm?.values,
|
|
3267
|
+
formValues: mForm?.values,
|
|
3268
|
+
config: props.config
|
|
3269
|
+
});
|
|
3270
|
+
}
|
|
3271
|
+
let initData = (initRoot || root).split(".").reduce((accumulator, currentValue) => accumulator[currentValue], res);
|
|
3103
3272
|
if (initData) {
|
|
3104
3273
|
if (!Array.isArray(initData)) {
|
|
3105
3274
|
initData = [initData];
|
|
@@ -3234,8 +3403,11 @@
|
|
|
3234
3403
|
}
|
|
3235
3404
|
});
|
|
3236
3405
|
|
|
3406
|
+
const __default__$3 = vue.defineComponent({
|
|
3407
|
+
name: "MFormSwitch"
|
|
3408
|
+
});
|
|
3237
3409
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
3238
|
-
|
|
3410
|
+
...__default__$3,
|
|
3239
3411
|
props: {
|
|
3240
3412
|
config: null,
|
|
3241
3413
|
model: null,
|
|
@@ -3288,8 +3460,11 @@
|
|
|
3288
3460
|
});
|
|
3289
3461
|
|
|
3290
3462
|
const _hoisted_1 = { key: 0 };
|
|
3463
|
+
const __default__$2 = vue.defineComponent({
|
|
3464
|
+
name: "MFormText"
|
|
3465
|
+
});
|
|
3291
3466
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
3292
|
-
|
|
3467
|
+
...__default__$2,
|
|
3293
3468
|
props: {
|
|
3294
3469
|
config: null,
|
|
3295
3470
|
model: null,
|
|
@@ -3408,8 +3583,11 @@
|
|
|
3408
3583
|
}
|
|
3409
3584
|
});
|
|
3410
3585
|
|
|
3586
|
+
const __default__$1 = vue.defineComponent({
|
|
3587
|
+
name: "MFormTextarea"
|
|
3588
|
+
});
|
|
3411
3589
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3412
|
-
|
|
3590
|
+
...__default__$1,
|
|
3413
3591
|
props: {
|
|
3414
3592
|
config: null,
|
|
3415
3593
|
model: null,
|
|
@@ -3448,8 +3626,11 @@
|
|
|
3448
3626
|
}
|
|
3449
3627
|
});
|
|
3450
3628
|
|
|
3629
|
+
const __default__ = vue.defineComponent({
|
|
3630
|
+
name: "MFormTime"
|
|
3631
|
+
});
|
|
3451
3632
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
3452
|
-
|
|
3633
|
+
...__default__,
|
|
3453
3634
|
props: {
|
|
3454
3635
|
config: null,
|
|
3455
3636
|
model: null,
|
|
@@ -3471,11 +3652,13 @@
|
|
|
3471
3652
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTimePicker), {
|
|
3472
3653
|
modelValue: __props.model[__props.name],
|
|
3473
3654
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
|
|
3655
|
+
"value-format": __props.config.valueFormat || "HH:mm:ss",
|
|
3656
|
+
format: __props.config.format || "HH:mm:ss",
|
|
3474
3657
|
size: __props.size,
|
|
3475
3658
|
placeholder: __props.config.placeholder,
|
|
3476
3659
|
disabled: __props.disabled,
|
|
3477
3660
|
onChange: changeHandler
|
|
3478
|
-
}, null, 8, ["modelValue", "size", "placeholder", "disabled"]);
|
|
3661
|
+
}, null, 8, ["modelValue", "value-format", "format", "size", "placeholder", "disabled"]);
|
|
3479
3662
|
};
|
|
3480
3663
|
}
|
|
3481
3664
|
});
|
|
@@ -3547,6 +3730,7 @@
|
|
|
3547
3730
|
exports.MText = _sfc_main$2;
|
|
3548
3731
|
exports.MTextarea = _sfc_main$1;
|
|
3549
3732
|
exports.MTime = _sfc_main;
|
|
3733
|
+
exports.createValues = createValues;
|
|
3550
3734
|
exports.default = index;
|
|
3551
3735
|
exports.display = display;
|
|
3552
3736
|
exports.filterFunction = filterFunction;
|
|
@@ -3557,4 +3741,4 @@
|
|
|
3557
3741
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
3558
3742
|
|
|
3559
3743
|
}));
|
|
3560
|
-
//# sourceMappingURL=tmagic-form.umd.
|
|
3744
|
+
//# sourceMappingURL=tmagic-form.umd.cjs.map
|