@tmagic/form 1.3.0-alpha.23 → 1.3.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tmagic-form.js +170 -83
- package/dist/tmagic-form.js.map +1 -1
- package/dist/tmagic-form.umd.cjs +198 -110
- package/dist/tmagic-form.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/FormDialog.vue +4 -0
- package/src/FormDrawer.vue +4 -0
- package/src/fields/Timerange.vue +76 -0
- package/src/index.ts +3 -0
- package/types/FormDialog.vue.d.ts +4 -0
- package/types/FormDrawer.vue.d.ts +4 -0
- package/types/fields/Timerange.vue.d.ts +14 -0
- package/types/index.d.ts +1 -0
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
key: 5,
|
|
182
182
|
style: { "text-align": "center" }
|
|
183
183
|
};
|
|
184
|
-
const _sfc_main$
|
|
184
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
185
185
|
...{
|
|
186
186
|
name: "MFormContainer"
|
|
187
187
|
},
|
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
};
|
|
611
611
|
const _hoisted_7 = { style: { "flex": "1" } };
|
|
612
612
|
const _hoisted_8 = ["src"];
|
|
613
|
-
const _sfc_main$
|
|
613
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
614
614
|
...{
|
|
615
615
|
name: "MFormFieldset"
|
|
616
616
|
},
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
_ctx.config.schematic && show.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
694
694
|
vue.createElementVNode("div", _hoisted_7, [
|
|
695
695
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (item, index) => {
|
|
696
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
696
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
697
697
|
key: key(item, index),
|
|
698
698
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
699
699
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -714,7 +714,7 @@
|
|
|
714
714
|
src: _ctx.config.schematic
|
|
715
715
|
}, null, 8, _hoisted_8)
|
|
716
716
|
])) : show.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.config.items, (item, index) => {
|
|
717
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
717
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
718
718
|
key: key(item, index),
|
|
719
719
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
720
720
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -736,7 +736,7 @@
|
|
|
736
736
|
|
|
737
737
|
const _hoisted_1$b = { class: "m-fields-group-list-item" };
|
|
738
738
|
const _hoisted_2$5 = ["innerHTML"];
|
|
739
|
-
const _sfc_main$
|
|
739
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
740
740
|
...{
|
|
741
741
|
name: "MFormGroupListItem"
|
|
742
742
|
},
|
|
@@ -869,7 +869,7 @@
|
|
|
869
869
|
class: "m-form-tip"
|
|
870
870
|
}, null, 8, _hoisted_2$5)) : vue.createCommentVNode("", true)
|
|
871
871
|
]),
|
|
872
|
-
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
872
|
+
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
873
873
|
key: 0,
|
|
874
874
|
config: rowConfig.value,
|
|
875
875
|
model: _ctx.model,
|
|
@@ -897,7 +897,7 @@
|
|
|
897
897
|
const _hoisted_5$1 = [
|
|
898
898
|
_hoisted_4$1
|
|
899
899
|
];
|
|
900
|
-
const _sfc_main$
|
|
900
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
901
901
|
...{
|
|
902
902
|
name: "MFormGroupList"
|
|
903
903
|
},
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
988
988
|
}, null, 8, _hoisted_2$4)) : vue.createCommentVNode("", true),
|
|
989
989
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, _hoisted_5$1)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
990
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
990
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$w, {
|
|
991
991
|
key: index,
|
|
992
992
|
model: item,
|
|
993
993
|
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
@@ -1040,7 +1040,7 @@
|
|
|
1040
1040
|
};
|
|
1041
1041
|
const _hoisted_4 = { style: { "flex": "1" } };
|
|
1042
1042
|
const _hoisted_5 = ["src"];
|
|
1043
|
-
const _sfc_main$
|
|
1043
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
1044
1044
|
...{
|
|
1045
1045
|
name: "MFormPanel"
|
|
1046
1046
|
},
|
|
@@ -1095,7 +1095,7 @@
|
|
|
1095
1095
|
_ctx.config.schematic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
|
|
1096
1096
|
vue.createElementVNode("div", _hoisted_4, [
|
|
1097
1097
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items.value, (item, index) => {
|
|
1098
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1098
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
1099
1099
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1100
1100
|
config: item,
|
|
1101
1101
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
src: _ctx.config.schematic
|
|
1116
1116
|
}, null, 8, _hoisted_5)
|
|
1117
1117
|
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(items.value, (item, index) => {
|
|
1118
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1118
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
1119
1119
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1120
1120
|
config: item,
|
|
1121
1121
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1137,7 +1137,7 @@
|
|
|
1137
1137
|
}
|
|
1138
1138
|
});
|
|
1139
1139
|
|
|
1140
|
-
const _sfc_main$
|
|
1140
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
1141
1141
|
...{
|
|
1142
1142
|
name: "MFormCol"
|
|
1143
1143
|
},
|
|
@@ -1164,7 +1164,7 @@
|
|
|
1164
1164
|
return (_ctx, _cache) => {
|
|
1165
1165
|
return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCol), { span: _ctx.span }, {
|
|
1166
1166
|
default: vue.withCtx(() => [
|
|
1167
|
-
vue.createVNode(_sfc_main$
|
|
1167
|
+
vue.createVNode(_sfc_main$y, {
|
|
1168
1168
|
model: _ctx.model,
|
|
1169
1169
|
lastValues: _ctx.lastValues,
|
|
1170
1170
|
"is-compare": _ctx.isCompare,
|
|
@@ -1186,7 +1186,7 @@
|
|
|
1186
1186
|
}
|
|
1187
1187
|
});
|
|
1188
1188
|
|
|
1189
|
-
const _sfc_main$
|
|
1189
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
1190
1190
|
...{
|
|
1191
1191
|
name: "MFormRow"
|
|
1192
1192
|
},
|
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicRow), { gutter: 10 }, {
|
|
1214
1214
|
default: vue.withCtx(() => [
|
|
1215
1215
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (col, index) => {
|
|
1216
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1216
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
1217
1217
|
key: col[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1218
1218
|
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1219
1219
|
config: col,
|
|
@@ -1236,7 +1236,7 @@
|
|
|
1236
1236
|
}
|
|
1237
1237
|
});
|
|
1238
1238
|
|
|
1239
|
-
const _sfc_main$
|
|
1239
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
1240
1240
|
...{
|
|
1241
1241
|
name: "MFormStep"
|
|
1242
1242
|
},
|
|
@@ -1290,7 +1290,7 @@
|
|
|
1290
1290
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1291
1291
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(step.items, (item) => {
|
|
1292
1292
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1293
|
-
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1293
|
+
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
1294
1294
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
1295
1295
|
config: item,
|
|
1296
1296
|
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
@@ -1321,7 +1321,7 @@
|
|
|
1321
1321
|
class: "bottom",
|
|
1322
1322
|
style: { "text-align": "right" }
|
|
1323
1323
|
};
|
|
1324
|
-
const _sfc_main$
|
|
1324
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
1325
1325
|
...{
|
|
1326
1326
|
name: "MFormTable"
|
|
1327
1327
|
},
|
|
@@ -1810,7 +1810,7 @@
|
|
|
1810
1810
|
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1811
1811
|
}, {
|
|
1812
1812
|
default: vue.withCtx((scope) => [
|
|
1813
|
-
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1813
|
+
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
1814
1814
|
key: 0,
|
|
1815
1815
|
labelWidth: "0",
|
|
1816
1816
|
disabled: _ctx.disabled,
|
|
@@ -1930,7 +1930,7 @@
|
|
|
1930
1930
|
}
|
|
1931
1931
|
});
|
|
1932
1932
|
|
|
1933
|
-
const _sfc_main$
|
|
1933
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
1934
1934
|
...{
|
|
1935
1935
|
name: "MFormTabs"
|
|
1936
1936
|
},
|
|
@@ -2084,7 +2084,7 @@
|
|
|
2084
2084
|
]),
|
|
2085
2085
|
default: vue.withCtx(() => [
|
|
2086
2086
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabItems(tab), (item) => {
|
|
2087
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2087
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
2088
2088
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
2089
2089
|
config: item,
|
|
2090
2090
|
disabled: _ctx.disabled,
|
|
@@ -2136,7 +2136,7 @@
|
|
|
2136
2136
|
);
|
|
2137
2137
|
};
|
|
2138
2138
|
|
|
2139
|
-
const _sfc_main$
|
|
2139
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
2140
2140
|
...{
|
|
2141
2141
|
name: "MFormCascader"
|
|
2142
2142
|
},
|
|
@@ -2224,7 +2224,7 @@
|
|
|
2224
2224
|
}
|
|
2225
2225
|
});
|
|
2226
2226
|
|
|
2227
|
-
const _sfc_main$
|
|
2227
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
2228
2228
|
...{
|
|
2229
2229
|
name: "MFormCheckbox"
|
|
2230
2230
|
},
|
|
@@ -2286,7 +2286,7 @@
|
|
|
2286
2286
|
}
|
|
2287
2287
|
});
|
|
2288
2288
|
|
|
2289
|
-
const _sfc_main$
|
|
2289
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
2290
2290
|
...{
|
|
2291
2291
|
name: "MFormCheckGroup"
|
|
2292
2292
|
},
|
|
@@ -2349,7 +2349,7 @@
|
|
|
2349
2349
|
}
|
|
2350
2350
|
});
|
|
2351
2351
|
|
|
2352
|
-
const _sfc_main$
|
|
2352
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
2353
2353
|
...{
|
|
2354
2354
|
name: "MFormColorPicker"
|
|
2355
2355
|
},
|
|
@@ -2383,7 +2383,7 @@
|
|
|
2383
2383
|
}
|
|
2384
2384
|
});
|
|
2385
2385
|
|
|
2386
|
-
const _sfc_main$
|
|
2386
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
2387
2387
|
...{
|
|
2388
2388
|
name: "MFormDate"
|
|
2389
2389
|
},
|
|
@@ -2423,7 +2423,7 @@
|
|
|
2423
2423
|
}
|
|
2424
2424
|
});
|
|
2425
2425
|
|
|
2426
|
-
const _sfc_main$
|
|
2426
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
2427
2427
|
...{
|
|
2428
2428
|
name: "MFormDateRange"
|
|
2429
2429
|
},
|
|
@@ -2525,7 +2525,7 @@
|
|
|
2525
2525
|
}
|
|
2526
2526
|
});
|
|
2527
2527
|
|
|
2528
|
-
const _sfc_main$
|
|
2528
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
2529
2529
|
...{
|
|
2530
2530
|
name: "MFormDateTime"
|
|
2531
2531
|
},
|
|
@@ -2575,7 +2575,7 @@
|
|
|
2575
2575
|
});
|
|
2576
2576
|
|
|
2577
2577
|
const _hoisted_1$7 = { key: 0 };
|
|
2578
|
-
const _sfc_main$
|
|
2578
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
2579
2579
|
...{
|
|
2580
2580
|
name: "MFormDisplay"
|
|
2581
2581
|
},
|
|
@@ -2604,7 +2604,7 @@
|
|
|
2604
2604
|
});
|
|
2605
2605
|
|
|
2606
2606
|
const _hoisted_1$6 = { class: "m-fields-dynamic-field" };
|
|
2607
|
-
const _sfc_main$
|
|
2607
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2608
2608
|
...{
|
|
2609
2609
|
name: "MFormDynamicField"
|
|
2610
2610
|
},
|
|
@@ -2696,7 +2696,7 @@
|
|
|
2696
2696
|
}
|
|
2697
2697
|
});
|
|
2698
2698
|
|
|
2699
|
-
const _sfc_main$
|
|
2699
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
2700
2700
|
...{
|
|
2701
2701
|
name: "MFormHidden"
|
|
2702
2702
|
},
|
|
@@ -2727,7 +2727,7 @@
|
|
|
2727
2727
|
}
|
|
2728
2728
|
});
|
|
2729
2729
|
|
|
2730
|
-
const _sfc_main$
|
|
2730
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
2731
2731
|
...{
|
|
2732
2732
|
name: "MForm"
|
|
2733
2733
|
},
|
|
@@ -2866,7 +2866,7 @@
|
|
|
2866
2866
|
}, {
|
|
2867
2867
|
default: vue.withCtx(() => [
|
|
2868
2868
|
initialized.value && Array.isArray(_ctx.config) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.config, (item, index) => {
|
|
2869
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2869
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
2870
2870
|
disabled: _ctx.disabled,
|
|
2871
2871
|
key: item[_ctx.keyProp] ?? index,
|
|
2872
2872
|
config: item,
|
|
@@ -2887,7 +2887,7 @@
|
|
|
2887
2887
|
});
|
|
2888
2888
|
|
|
2889
2889
|
const _hoisted_1$5 = { style: { "min-height": "1px" } };
|
|
2890
|
-
const _sfc_main$
|
|
2890
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
2891
2891
|
...{
|
|
2892
2892
|
name: "MFormDialog"
|
|
2893
2893
|
},
|
|
@@ -2901,6 +2901,8 @@
|
|
|
2901
2901
|
fullscreen: { type: Boolean },
|
|
2902
2902
|
disabled: { type: Boolean },
|
|
2903
2903
|
title: {},
|
|
2904
|
+
inline: { type: Boolean },
|
|
2905
|
+
labelPosition: {},
|
|
2904
2906
|
zIndex: {},
|
|
2905
2907
|
size: {},
|
|
2906
2908
|
confirmText: { default: "确定" }
|
|
@@ -3058,7 +3060,7 @@
|
|
|
3058
3060
|
class: "m-dialog-body",
|
|
3059
3061
|
style: vue.normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3060
3062
|
}, [
|
|
3061
|
-
vue.createVNode(_sfc_main$
|
|
3063
|
+
vue.createVNode(_sfc_main$e, {
|
|
3062
3064
|
modelValue: stepActive.value,
|
|
3063
3065
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3064
3066
|
ref_key: "form",
|
|
@@ -3069,8 +3071,10 @@
|
|
|
3069
3071
|
"init-values": _ctx.values,
|
|
3070
3072
|
"parent-values": _ctx.parentValues,
|
|
3071
3073
|
"label-width": _ctx.labelWidth,
|
|
3074
|
+
"label-position": _ctx.labelPosition,
|
|
3075
|
+
inline: _ctx.inline,
|
|
3072
3076
|
onChange: changeHandler
|
|
3073
|
-
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width"]),
|
|
3077
|
+
}, null, 8, ["modelValue", "size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline"]),
|
|
3074
3078
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3075
3079
|
], 4)) : vue.createCommentVNode("", true)
|
|
3076
3080
|
]),
|
|
@@ -3085,7 +3089,7 @@
|
|
|
3085
3089
|
key: 2,
|
|
3086
3090
|
class: "m-fields-link"
|
|
3087
3091
|
};
|
|
3088
|
-
const _sfc_main$
|
|
3092
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
3089
3093
|
...{
|
|
3090
3094
|
name: "MFormLink"
|
|
3091
3095
|
},
|
|
@@ -3167,7 +3171,7 @@
|
|
|
3167
3171
|
]),
|
|
3168
3172
|
_: 1
|
|
3169
3173
|
}),
|
|
3170
|
-
vue.createVNode(_sfc_main$
|
|
3174
|
+
vue.createVNode(_sfc_main$d, {
|
|
3171
3175
|
ref_key: "editor",
|
|
3172
3176
|
ref: editor,
|
|
3173
3177
|
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
@@ -3183,7 +3187,7 @@
|
|
|
3183
3187
|
}
|
|
3184
3188
|
});
|
|
3185
3189
|
|
|
3186
|
-
const _sfc_main$
|
|
3190
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
3187
3191
|
...{
|
|
3188
3192
|
name: "MFormNumber"
|
|
3189
3193
|
},
|
|
@@ -3233,7 +3237,7 @@
|
|
|
3233
3237
|
|
|
3234
3238
|
const _hoisted_1$3 = { class: "m-fields-number-range" };
|
|
3235
3239
|
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3236
|
-
const _sfc_main$
|
|
3240
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
3237
3241
|
...{
|
|
3238
3242
|
name: "MFormNumberRange"
|
|
3239
3243
|
},
|
|
@@ -3286,7 +3290,7 @@
|
|
|
3286
3290
|
}
|
|
3287
3291
|
});
|
|
3288
3292
|
|
|
3289
|
-
const _sfc_main$
|
|
3293
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
3290
3294
|
...{
|
|
3291
3295
|
name: "MFormRadioGroup"
|
|
3292
3296
|
},
|
|
@@ -3338,7 +3342,7 @@
|
|
|
3338
3342
|
}
|
|
3339
3343
|
});
|
|
3340
3344
|
|
|
3341
|
-
const _sfc_main$
|
|
3345
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
3342
3346
|
...{
|
|
3343
3347
|
name: "MFormSelectOptionGroups"
|
|
3344
3348
|
},
|
|
@@ -3372,7 +3376,7 @@
|
|
|
3372
3376
|
}
|
|
3373
3377
|
});
|
|
3374
3378
|
|
|
3375
|
-
const _sfc_main$
|
|
3379
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
3376
3380
|
...{
|
|
3377
3381
|
name: "MFormSelectOptions"
|
|
3378
3382
|
},
|
|
@@ -3396,7 +3400,7 @@
|
|
|
3396
3400
|
});
|
|
3397
3401
|
|
|
3398
3402
|
const _hoisted_1$2 = { key: 2 };
|
|
3399
|
-
const _sfc_main$
|
|
3403
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
3400
3404
|
...{
|
|
3401
3405
|
name: "MFormSelect"
|
|
3402
3406
|
},
|
|
@@ -3736,10 +3740,10 @@
|
|
|
3736
3740
|
onVisibleChange: visibleHandler
|
|
3737
3741
|
}, {
|
|
3738
3742
|
default: vue.withCtx(() => [
|
|
3739
|
-
_ctx.config.group ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3743
|
+
_ctx.config.group ? (vue.openBlock(), vue.createBlock(_sfc_main$8, {
|
|
3740
3744
|
key: 0,
|
|
3741
3745
|
options: vue.unref(groupOptions)
|
|
3742
|
-
}, null, 8, ["options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3746
|
+
}, null, 8, ["options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$7, {
|
|
3743
3747
|
key: 1,
|
|
3744
3748
|
options: vue.unref(itemOptions)
|
|
3745
3749
|
}, null, 8, ["options"])),
|
|
@@ -3755,7 +3759,7 @@
|
|
|
3755
3759
|
}
|
|
3756
3760
|
});
|
|
3757
3761
|
|
|
3758
|
-
const _sfc_main$
|
|
3762
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
3759
3763
|
...{
|
|
3760
3764
|
name: "MFormSwitch"
|
|
3761
3765
|
},
|
|
@@ -3813,7 +3817,7 @@
|
|
|
3813
3817
|
});
|
|
3814
3818
|
|
|
3815
3819
|
const _hoisted_1$1 = { key: 0 };
|
|
3816
|
-
const _sfc_main$
|
|
3820
|
+
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
3817
3821
|
...{
|
|
3818
3822
|
name: "MFormText"
|
|
3819
3823
|
},
|
|
@@ -3937,7 +3941,7 @@
|
|
|
3937
3941
|
}
|
|
3938
3942
|
});
|
|
3939
3943
|
|
|
3940
|
-
const _sfc_main$
|
|
3944
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
3941
3945
|
...{
|
|
3942
3946
|
name: "MFormTextarea"
|
|
3943
3947
|
},
|
|
@@ -3981,7 +3985,7 @@
|
|
|
3981
3985
|
}
|
|
3982
3986
|
});
|
|
3983
3987
|
|
|
3984
|
-
const _sfc_main$
|
|
3988
|
+
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
3985
3989
|
...{
|
|
3986
3990
|
name: "MFormTime"
|
|
3987
3991
|
},
|
|
@@ -4019,6 +4023,84 @@
|
|
|
4019
4023
|
}
|
|
4020
4024
|
});
|
|
4021
4025
|
|
|
4026
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
4027
|
+
...{
|
|
4028
|
+
name: "MFormTimeRange"
|
|
4029
|
+
},
|
|
4030
|
+
__name: "Timerange",
|
|
4031
|
+
props: {
|
|
4032
|
+
config: {},
|
|
4033
|
+
model: {},
|
|
4034
|
+
initValues: {},
|
|
4035
|
+
values: {},
|
|
4036
|
+
name: {},
|
|
4037
|
+
prop: {},
|
|
4038
|
+
disabled: { type: Boolean },
|
|
4039
|
+
size: {},
|
|
4040
|
+
lastValues: {}
|
|
4041
|
+
},
|
|
4042
|
+
emits: ["change"],
|
|
4043
|
+
setup(__props, { emit }) {
|
|
4044
|
+
const props = __props;
|
|
4045
|
+
useAddField(props.prop);
|
|
4046
|
+
const { names } = props.config;
|
|
4047
|
+
const value = vue.ref([]);
|
|
4048
|
+
if (props.model !== void 0 && names?.length) {
|
|
4049
|
+
vue.watch(
|
|
4050
|
+
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
4051
|
+
([start, end], [preStart, preEnd]) => {
|
|
4052
|
+
if (!value.value) {
|
|
4053
|
+
value.value = [];
|
|
4054
|
+
}
|
|
4055
|
+
if (!start || !end)
|
|
4056
|
+
value.value = [];
|
|
4057
|
+
if (start !== preStart)
|
|
4058
|
+
value.value[0] = start;
|
|
4059
|
+
if (end !== preEnd)
|
|
4060
|
+
value.value[1] = end;
|
|
4061
|
+
},
|
|
4062
|
+
{
|
|
4063
|
+
immediate: true
|
|
4064
|
+
}
|
|
4065
|
+
);
|
|
4066
|
+
}
|
|
4067
|
+
const setValue = (v) => {
|
|
4068
|
+
names?.forEach((item, index) => {
|
|
4069
|
+
if (!props.model) {
|
|
4070
|
+
return;
|
|
4071
|
+
}
|
|
4072
|
+
if (Array.isArray(v)) {
|
|
4073
|
+
props.model[item] = utils.datetimeFormatter(v[index]?.toString(), "");
|
|
4074
|
+
} else {
|
|
4075
|
+
props.model[item] = void 0;
|
|
4076
|
+
}
|
|
4077
|
+
});
|
|
4078
|
+
};
|
|
4079
|
+
const changeHandler = (v) => {
|
|
4080
|
+
const value2 = v || [];
|
|
4081
|
+
if (names?.length) {
|
|
4082
|
+
setValue(value2);
|
|
4083
|
+
}
|
|
4084
|
+
emit("change", value2);
|
|
4085
|
+
};
|
|
4086
|
+
return (_ctx, _cache) => {
|
|
4087
|
+
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTimePicker), {
|
|
4088
|
+
modelValue: value.value,
|
|
4089
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
4090
|
+
"is-range": "",
|
|
4091
|
+
"range-separator": "-",
|
|
4092
|
+
"start-placeholder": "开始时间",
|
|
4093
|
+
"end-placeholder": "结束时间",
|
|
4094
|
+
size: _ctx.size,
|
|
4095
|
+
"unlink-panels": true,
|
|
4096
|
+
disabled: _ctx.disabled,
|
|
4097
|
+
"default-time": _ctx.config.defaultTime,
|
|
4098
|
+
onChange: changeHandler
|
|
4099
|
+
}, null, 8, ["modelValue", "size", "disabled", "default-time"]);
|
|
4100
|
+
};
|
|
4101
|
+
}
|
|
4102
|
+
});
|
|
4103
|
+
|
|
4022
4104
|
const index$1 = '';
|
|
4023
4105
|
|
|
4024
4106
|
const _hoisted_1 = { style: { "min-height": "1px" } };
|
|
@@ -4038,7 +4120,9 @@
|
|
|
4038
4120
|
title: {},
|
|
4039
4121
|
zIndex: {},
|
|
4040
4122
|
size: {},
|
|
4041
|
-
confirmText: { default: "确定" }
|
|
4123
|
+
confirmText: { default: "确定" },
|
|
4124
|
+
inline: { type: Boolean },
|
|
4125
|
+
labelPosition: {}
|
|
4042
4126
|
},
|
|
4043
4127
|
emits: ["close", "submit", "error", "change", "open", "opened"],
|
|
4044
4128
|
setup(__props, { expose: __expose, emit }) {
|
|
@@ -4146,7 +4230,7 @@
|
|
|
4146
4230
|
ref: drawerBody,
|
|
4147
4231
|
class: "m-drawer-body"
|
|
4148
4232
|
}, [
|
|
4149
|
-
vue.createVNode(_sfc_main$
|
|
4233
|
+
vue.createVNode(_sfc_main$e, {
|
|
4150
4234
|
ref_key: "form",
|
|
4151
4235
|
ref: form,
|
|
4152
4236
|
size: _ctx.size,
|
|
@@ -4155,8 +4239,10 @@
|
|
|
4155
4239
|
"init-values": _ctx.values,
|
|
4156
4240
|
"parent-values": _ctx.parentValues,
|
|
4157
4241
|
"label-width": _ctx.labelWidth,
|
|
4242
|
+
"label-position": _ctx.labelPosition,
|
|
4243
|
+
inline: _ctx.inline,
|
|
4158
4244
|
onChange: changeHandler
|
|
4159
|
-
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width"]),
|
|
4245
|
+
}, null, 8, ["size", "disabled", "config", "init-values", "parent-values", "label-width", "label-position", "inline"]),
|
|
4160
4246
|
vue.renderSlot(_ctx.$slots, "default")
|
|
4161
4247
|
], 512)) : vue.createCommentVNode("", true)
|
|
4162
4248
|
]),
|
|
@@ -4172,67 +4258,69 @@
|
|
|
4172
4258
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
4173
4259
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
4174
4260
|
setConfig(option);
|
|
4175
|
-
app.component("m-form", _sfc_main$
|
|
4176
|
-
app.component("m-form-dialog", _sfc_main$
|
|
4177
|
-
app.component("m-form-container", _sfc_main$
|
|
4178
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
4179
|
-
app.component("m-form-group-list", _sfc_main$
|
|
4180
|
-
app.component("m-form-panel", _sfc_main$
|
|
4181
|
-
app.component("m-form-row", _sfc_main$
|
|
4182
|
-
app.component("m-form-step", _sfc_main$
|
|
4183
|
-
app.component("m-form-table", _sfc_main$
|
|
4184
|
-
app.component("m-form-tab", _sfc_main$
|
|
4185
|
-
app.component("m-fields-text", _sfc_main$
|
|
4186
|
-
app.component("m-fields-number", _sfc_main$
|
|
4187
|
-
app.component("m-fields-number-range", _sfc_main$
|
|
4188
|
-
app.component("m-fields-textarea", _sfc_main$
|
|
4189
|
-
app.component("m-fields-hidden", _sfc_main$
|
|
4190
|
-
app.component("m-fields-date", _sfc_main$
|
|
4191
|
-
app.component("m-fields-datetime", _sfc_main$
|
|
4192
|
-
app.component("m-fields-daterange", _sfc_main$
|
|
4193
|
-
app.component("m-fields-
|
|
4194
|
-
app.component("m-fields-
|
|
4195
|
-
app.component("m-fields-
|
|
4196
|
-
app.component("m-fields-
|
|
4197
|
-
app.component("m-fields-
|
|
4198
|
-
app.component("m-fields-
|
|
4199
|
-
app.component("m-fields-
|
|
4200
|
-
app.component("m-fields-
|
|
4201
|
-
app.component("m-fields-
|
|
4202
|
-
app.component("m-fields-
|
|
4203
|
-
app.component("m-fields-
|
|
4261
|
+
app.component("m-form", _sfc_main$e);
|
|
4262
|
+
app.component("m-form-dialog", _sfc_main$d);
|
|
4263
|
+
app.component("m-form-container", _sfc_main$y);
|
|
4264
|
+
app.component("m-form-fieldset", _sfc_main$x);
|
|
4265
|
+
app.component("m-form-group-list", _sfc_main$v);
|
|
4266
|
+
app.component("m-form-panel", _sfc_main$u);
|
|
4267
|
+
app.component("m-form-row", _sfc_main$s);
|
|
4268
|
+
app.component("m-form-step", _sfc_main$r);
|
|
4269
|
+
app.component("m-form-table", _sfc_main$q);
|
|
4270
|
+
app.component("m-form-tab", _sfc_main$p);
|
|
4271
|
+
app.component("m-fields-text", _sfc_main$4);
|
|
4272
|
+
app.component("m-fields-number", _sfc_main$b);
|
|
4273
|
+
app.component("m-fields-number-range", _sfc_main$a);
|
|
4274
|
+
app.component("m-fields-textarea", _sfc_main$3);
|
|
4275
|
+
app.component("m-fields-hidden", _sfc_main$f);
|
|
4276
|
+
app.component("m-fields-date", _sfc_main$k);
|
|
4277
|
+
app.component("m-fields-datetime", _sfc_main$i);
|
|
4278
|
+
app.component("m-fields-daterange", _sfc_main$j);
|
|
4279
|
+
app.component("m-fields-timerange", _sfc_main$1);
|
|
4280
|
+
app.component("m-fields-time", _sfc_main$2);
|
|
4281
|
+
app.component("m-fields-checkbox", _sfc_main$n);
|
|
4282
|
+
app.component("m-fields-switch", _sfc_main$5);
|
|
4283
|
+
app.component("m-fields-color-picker", _sfc_main$l);
|
|
4284
|
+
app.component("m-fields-checkbox-group", _sfc_main$m);
|
|
4285
|
+
app.component("m-fields-radio-group", _sfc_main$9);
|
|
4286
|
+
app.component("m-fields-display", _sfc_main$h);
|
|
4287
|
+
app.component("m-fields-link", _sfc_main$c);
|
|
4288
|
+
app.component("m-fields-select", _sfc_main$6);
|
|
4289
|
+
app.component("m-fields-cascader", _sfc_main$o);
|
|
4290
|
+
app.component("m-fields-dynamic-field", _sfc_main$g);
|
|
4204
4291
|
}
|
|
4205
4292
|
};
|
|
4206
4293
|
|
|
4207
|
-
exports.MCascader = _sfc_main$
|
|
4208
|
-
exports.MCheckbox = _sfc_main$
|
|
4209
|
-
exports.MCheckboxGroup = _sfc_main$
|
|
4210
|
-
exports.MColorPicker = _sfc_main$
|
|
4211
|
-
exports.MContainer = _sfc_main$
|
|
4212
|
-
exports.MDate = _sfc_main$
|
|
4213
|
-
exports.MDateTime = _sfc_main$
|
|
4214
|
-
exports.MDaterange = _sfc_main$
|
|
4215
|
-
exports.MDisplay = _sfc_main$
|
|
4216
|
-
exports.MDynamicField = _sfc_main$
|
|
4217
|
-
exports.MFieldset = _sfc_main$
|
|
4218
|
-
exports.MForm = _sfc_main$
|
|
4219
|
-
exports.MFormDialog = _sfc_main$
|
|
4294
|
+
exports.MCascader = _sfc_main$o;
|
|
4295
|
+
exports.MCheckbox = _sfc_main$n;
|
|
4296
|
+
exports.MCheckboxGroup = _sfc_main$m;
|
|
4297
|
+
exports.MColorPicker = _sfc_main$l;
|
|
4298
|
+
exports.MContainer = _sfc_main$y;
|
|
4299
|
+
exports.MDate = _sfc_main$k;
|
|
4300
|
+
exports.MDateTime = _sfc_main$i;
|
|
4301
|
+
exports.MDaterange = _sfc_main$j;
|
|
4302
|
+
exports.MDisplay = _sfc_main$h;
|
|
4303
|
+
exports.MDynamicField = _sfc_main$g;
|
|
4304
|
+
exports.MFieldset = _sfc_main$x;
|
|
4305
|
+
exports.MForm = _sfc_main$e;
|
|
4306
|
+
exports.MFormDialog = _sfc_main$d;
|
|
4220
4307
|
exports.MFormDrawer = _sfc_main;
|
|
4221
|
-
exports.MGroupList = _sfc_main$
|
|
4222
|
-
exports.MHidden = _sfc_main$
|
|
4223
|
-
exports.MLink = _sfc_main$
|
|
4224
|
-
exports.MNumber = _sfc_main$
|
|
4225
|
-
exports.MNumberRange = _sfc_main$
|
|
4226
|
-
exports.MPanel = _sfc_main$
|
|
4227
|
-
exports.MRadioGroup = _sfc_main$
|
|
4228
|
-
exports.MRow = _sfc_main$
|
|
4229
|
-
exports.MSelect = _sfc_main$
|
|
4230
|
-
exports.MSwitch = _sfc_main$
|
|
4231
|
-
exports.MTable = _sfc_main$
|
|
4232
|
-
exports.MTabs = _sfc_main$
|
|
4233
|
-
exports.MText = _sfc_main$
|
|
4234
|
-
exports.MTextarea = _sfc_main$
|
|
4235
|
-
exports.MTime = _sfc_main$
|
|
4308
|
+
exports.MGroupList = _sfc_main$v;
|
|
4309
|
+
exports.MHidden = _sfc_main$f;
|
|
4310
|
+
exports.MLink = _sfc_main$c;
|
|
4311
|
+
exports.MNumber = _sfc_main$b;
|
|
4312
|
+
exports.MNumberRange = _sfc_main$a;
|
|
4313
|
+
exports.MPanel = _sfc_main$u;
|
|
4314
|
+
exports.MRadioGroup = _sfc_main$9;
|
|
4315
|
+
exports.MRow = _sfc_main$s;
|
|
4316
|
+
exports.MSelect = _sfc_main$6;
|
|
4317
|
+
exports.MSwitch = _sfc_main$5;
|
|
4318
|
+
exports.MTable = _sfc_main$q;
|
|
4319
|
+
exports.MTabs = _sfc_main$p;
|
|
4320
|
+
exports.MText = _sfc_main$4;
|
|
4321
|
+
exports.MTextarea = _sfc_main$3;
|
|
4322
|
+
exports.MTime = _sfc_main$2;
|
|
4323
|
+
exports.MTimerange = _sfc_main$1;
|
|
4236
4324
|
exports.createValues = createValues;
|
|
4237
4325
|
exports.default = index;
|
|
4238
4326
|
exports.display = display;
|