@tmagic/form 1.4.1 → 1.4.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/tmagic-form.js +105 -134
- package/dist/tmagic-form.umd.cjs +126 -155
- package/package.json +3 -3
- package/src/fields/Select.vue +48 -10
- package/src/fields/SelectOptionGroups.vue +0 -29
- package/src/fields/SelectOptions.vue +0 -24
- package/types/fields/SelectOptionGroups.vue.d.ts +0 -16
- package/types/fields/SelectOptions.vue.d.ts +0 -18
package/dist/tmagic-form.umd.cjs
CHANGED
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
key: 5,
|
|
183
183
|
style: { "text-align": "center" }
|
|
184
184
|
};
|
|
185
|
-
const _sfc_main$
|
|
185
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
186
186
|
...{
|
|
187
187
|
name: "MFormContainer"
|
|
188
188
|
},
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
};
|
|
620
620
|
const _hoisted_7 = { style: { "flex": "1" } };
|
|
621
621
|
const _hoisted_8 = ["src"];
|
|
622
|
-
const _sfc_main$
|
|
622
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
623
623
|
...{
|
|
624
624
|
name: "MFormFieldset"
|
|
625
625
|
},
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
_ctx.config.schematic && show.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
|
|
704
704
|
vue.createElementVNode("div", _hoisted_7, [
|
|
705
705
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (item, index) => {
|
|
706
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
706
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
707
707
|
key: key(item, index),
|
|
708
708
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
709
709
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -724,7 +724,7 @@
|
|
|
724
724
|
src: _ctx.config.schematic
|
|
725
725
|
}, null, 8, _hoisted_8)
|
|
726
726
|
])) : show.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 3 }, vue.renderList(_ctx.config.items, (item, index) => {
|
|
727
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
727
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
728
728
|
key: key(item, index),
|
|
729
729
|
model: name.value ? _ctx.model[name.value] : _ctx.model,
|
|
730
730
|
lastValues: name.value ? _ctx.lastValues[name.value] : _ctx.lastValues,
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
|
|
747
747
|
const _hoisted_1$b = { class: "m-fields-group-list-item" };
|
|
748
748
|
const _hoisted_2$6 = ["innerHTML"];
|
|
749
|
-
const _sfc_main$
|
|
749
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
750
750
|
...{
|
|
751
751
|
name: "MFormGroupListItem"
|
|
752
752
|
},
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
class: "m-form-tip"
|
|
886
886
|
}, null, 8, _hoisted_2$6)) : vue.createCommentVNode("", true)
|
|
887
887
|
]),
|
|
888
|
-
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
888
|
+
expand.value ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
889
889
|
key: 0,
|
|
890
890
|
config: rowConfig.value,
|
|
891
891
|
model: _ctx.model,
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
const _hoisted_5$2 = [
|
|
914
914
|
_hoisted_4$2
|
|
915
915
|
];
|
|
916
|
-
const _sfc_main$
|
|
916
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
917
917
|
...{
|
|
918
918
|
name: "MFormGroupList"
|
|
919
919
|
},
|
|
@@ -1004,7 +1004,7 @@
|
|
|
1004
1004
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
1005
1005
|
}, null, 8, _hoisted_2$5)) : vue.createCommentVNode("", true),
|
|
1006
1006
|
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, _hoisted_5$2)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
1007
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1007
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
1008
1008
|
key: index,
|
|
1009
1009
|
model: item,
|
|
1010
1010
|
lastValues: getLastValues(_ctx.lastValues[_ctx.name], index),
|
|
@@ -1057,7 +1057,7 @@
|
|
|
1057
1057
|
};
|
|
1058
1058
|
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1059
1059
|
const _hoisted_5$1 = ["src"];
|
|
1060
|
-
const _sfc_main$
|
|
1060
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
1061
1061
|
...{
|
|
1062
1062
|
name: "MFormPanel"
|
|
1063
1063
|
},
|
|
@@ -1113,7 +1113,7 @@
|
|
|
1113
1113
|
_ctx.config.schematic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
|
|
1114
1114
|
vue.createElementVNode("div", _hoisted_4$1, [
|
|
1115
1115
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items.value, (item, index) => {
|
|
1116
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1116
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1117
1117
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1118
1118
|
config: item,
|
|
1119
1119
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1133,7 +1133,7 @@
|
|
|
1133
1133
|
src: _ctx.config.schematic
|
|
1134
1134
|
}, null, 8, _hoisted_5$1)
|
|
1135
1135
|
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(items.value, (item, index) => {
|
|
1136
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1136
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1137
1137
|
key: item[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1138
1138
|
config: item,
|
|
1139
1139
|
model: _ctx.name ? _ctx.model[_ctx.name] : _ctx.model,
|
|
@@ -1155,7 +1155,7 @@
|
|
|
1155
1155
|
}
|
|
1156
1156
|
});
|
|
1157
1157
|
|
|
1158
|
-
const _sfc_main$
|
|
1158
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
1159
1159
|
...{
|
|
1160
1160
|
name: "MFormCol"
|
|
1161
1161
|
},
|
|
@@ -1183,7 +1183,7 @@
|
|
|
1183
1183
|
return (_ctx, _cache) => {
|
|
1184
1184
|
return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCol), { span: _ctx.span }, {
|
|
1185
1185
|
default: vue.withCtx(() => [
|
|
1186
|
-
vue.createVNode(_sfc_main$
|
|
1186
|
+
vue.createVNode(_sfc_main$x, {
|
|
1187
1187
|
model: _ctx.model,
|
|
1188
1188
|
lastValues: _ctx.lastValues,
|
|
1189
1189
|
"is-compare": _ctx.isCompare,
|
|
@@ -1205,7 +1205,7 @@
|
|
|
1205
1205
|
}
|
|
1206
1206
|
});
|
|
1207
1207
|
|
|
1208
|
-
const _sfc_main$
|
|
1208
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
1209
1209
|
...{
|
|
1210
1210
|
name: "MFormRow"
|
|
1211
1211
|
},
|
|
@@ -1233,7 +1233,7 @@
|
|
|
1233
1233
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicRow), { gutter: 10 }, {
|
|
1234
1234
|
default: vue.withCtx(() => [
|
|
1235
1235
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.config.items, (col, index) => {
|
|
1236
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1236
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
1237
1237
|
key: col[vue.unref(mForm)?.keyProp || "__key"] ?? index,
|
|
1238
1238
|
span: col.span || _ctx.config.span || 24 / _ctx.config.items.length,
|
|
1239
1239
|
config: col,
|
|
@@ -1256,7 +1256,7 @@
|
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
|
|
1259
|
-
const _sfc_main$
|
|
1259
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
1260
1260
|
...{
|
|
1261
1261
|
name: "MFormStep"
|
|
1262
1262
|
},
|
|
@@ -1311,7 +1311,7 @@
|
|
|
1311
1311
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1312
1312
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(step.items, (item) => {
|
|
1313
1313
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1314
|
-
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1314
|
+
item ? vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1315
1315
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
1316
1316
|
config: item,
|
|
1317
1317
|
model: step.name ? _ctx.model[step.name] : _ctx.model,
|
|
@@ -1345,7 +1345,7 @@
|
|
|
1345
1345
|
class: "bottom",
|
|
1346
1346
|
style: { "text-align": "right" }
|
|
1347
1347
|
};
|
|
1348
|
-
const _sfc_main$
|
|
1348
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
1349
1349
|
...{
|
|
1350
1350
|
name: "MFormTable"
|
|
1351
1351
|
},
|
|
@@ -1853,7 +1853,7 @@
|
|
|
1853
1853
|
"class-name": _ctx.config.dropSort === true ? "el-table__column--dropable" : ""
|
|
1854
1854
|
}, {
|
|
1855
1855
|
default: vue.withCtx((scope) => [
|
|
1856
|
-
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1856
|
+
scope.$index > -1 ? (vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
1857
1857
|
key: 0,
|
|
1858
1858
|
labelWidth: "0",
|
|
1859
1859
|
disabled: _ctx.disabled,
|
|
@@ -1977,7 +1977,7 @@
|
|
|
1977
1977
|
}
|
|
1978
1978
|
});
|
|
1979
1979
|
|
|
1980
|
-
const _sfc_main$
|
|
1980
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
1981
1981
|
...{
|
|
1982
1982
|
name: "MFormTabs"
|
|
1983
1983
|
},
|
|
@@ -2132,7 +2132,7 @@
|
|
|
2132
2132
|
]),
|
|
2133
2133
|
default: vue.withCtx(() => [
|
|
2134
2134
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabItems(tab), (item) => {
|
|
2135
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2135
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
2136
2136
|
key: item[vue.unref(mForm)?.keyProp || "__key"],
|
|
2137
2137
|
config: item,
|
|
2138
2138
|
disabled: _ctx.disabled,
|
|
@@ -2184,7 +2184,7 @@
|
|
|
2184
2184
|
);
|
|
2185
2185
|
};
|
|
2186
2186
|
|
|
2187
|
-
const _sfc_main$
|
|
2187
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
2188
2188
|
...{
|
|
2189
2189
|
name: "MFormCascader"
|
|
2190
2190
|
},
|
|
@@ -2282,7 +2282,7 @@
|
|
|
2282
2282
|
}
|
|
2283
2283
|
});
|
|
2284
2284
|
|
|
2285
|
-
const _sfc_main$
|
|
2285
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
2286
2286
|
...{
|
|
2287
2287
|
name: "MFormCheckbox"
|
|
2288
2288
|
},
|
|
@@ -2345,7 +2345,7 @@
|
|
|
2345
2345
|
}
|
|
2346
2346
|
});
|
|
2347
2347
|
|
|
2348
|
-
const _sfc_main$
|
|
2348
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
2349
2349
|
...{
|
|
2350
2350
|
name: "MFormCheckGroup"
|
|
2351
2351
|
},
|
|
@@ -2408,7 +2408,7 @@
|
|
|
2408
2408
|
}
|
|
2409
2409
|
});
|
|
2410
2410
|
|
|
2411
|
-
const _sfc_main$
|
|
2411
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
2412
2412
|
...{
|
|
2413
2413
|
name: "MFormColorPicker"
|
|
2414
2414
|
},
|
|
@@ -2443,7 +2443,7 @@
|
|
|
2443
2443
|
}
|
|
2444
2444
|
});
|
|
2445
2445
|
|
|
2446
|
-
const _sfc_main$
|
|
2446
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
2447
2447
|
...{
|
|
2448
2448
|
name: "MFormDate"
|
|
2449
2449
|
},
|
|
@@ -2484,7 +2484,7 @@
|
|
|
2484
2484
|
}
|
|
2485
2485
|
});
|
|
2486
2486
|
|
|
2487
|
-
const _sfc_main$
|
|
2487
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
2488
2488
|
...{
|
|
2489
2489
|
name: "MFormDateRange"
|
|
2490
2490
|
},
|
|
@@ -2587,7 +2587,7 @@
|
|
|
2587
2587
|
}
|
|
2588
2588
|
});
|
|
2589
2589
|
|
|
2590
|
-
const _sfc_main$
|
|
2590
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
2591
2591
|
...{
|
|
2592
2592
|
name: "MFormDateTime"
|
|
2593
2593
|
},
|
|
@@ -2638,7 +2638,7 @@
|
|
|
2638
2638
|
});
|
|
2639
2639
|
|
|
2640
2640
|
const _hoisted_1$7 = { key: 0 };
|
|
2641
|
-
const _sfc_main$
|
|
2641
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
2642
2642
|
...{
|
|
2643
2643
|
name: "MFormDisplay"
|
|
2644
2644
|
},
|
|
@@ -2667,7 +2667,7 @@
|
|
|
2667
2667
|
});
|
|
2668
2668
|
|
|
2669
2669
|
const _hoisted_1$6 = { class: "m-fields-dynamic-field" };
|
|
2670
|
-
const _sfc_main$
|
|
2670
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
2671
2671
|
...{
|
|
2672
2672
|
name: "MFormDynamicField"
|
|
2673
2673
|
},
|
|
@@ -2760,7 +2760,7 @@
|
|
|
2760
2760
|
}
|
|
2761
2761
|
});
|
|
2762
2762
|
|
|
2763
|
-
const _sfc_main$
|
|
2763
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
2764
2764
|
...{
|
|
2765
2765
|
name: "MFormHidden"
|
|
2766
2766
|
},
|
|
@@ -2791,7 +2791,7 @@
|
|
|
2791
2791
|
}
|
|
2792
2792
|
});
|
|
2793
2793
|
|
|
2794
|
-
const _sfc_main$
|
|
2794
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
2795
2795
|
...{
|
|
2796
2796
|
name: "MForm"
|
|
2797
2797
|
},
|
|
@@ -2932,7 +2932,7 @@
|
|
|
2932
2932
|
}, {
|
|
2933
2933
|
default: vue.withCtx(() => [
|
|
2934
2934
|
initialized.value && Array.isArray(_ctx.config) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.config, (item, index) => {
|
|
2935
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2935
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, {
|
|
2936
2936
|
disabled: _ctx.disabled,
|
|
2937
2937
|
key: item[_ctx.keyProp] ?? index,
|
|
2938
2938
|
config: item,
|
|
@@ -2953,7 +2953,7 @@
|
|
|
2953
2953
|
});
|
|
2954
2954
|
|
|
2955
2955
|
const _hoisted_1$5 = { style: { "min-height": "1px" } };
|
|
2956
|
-
const _sfc_main$
|
|
2956
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
2957
2957
|
...{
|
|
2958
2958
|
name: "MFormDialog"
|
|
2959
2959
|
},
|
|
@@ -3127,7 +3127,7 @@
|
|
|
3127
3127
|
class: "m-dialog-body",
|
|
3128
3128
|
style: vue.normalizeStyle(`max-height: ${bodyHeight.value}; overflow-y: auto; overflow-x: hidden;`)
|
|
3129
3129
|
}, [
|
|
3130
|
-
vue.createVNode(_sfc_main$
|
|
3130
|
+
vue.createVNode(_sfc_main$d, {
|
|
3131
3131
|
modelValue: stepActive.value,
|
|
3132
3132
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => stepActive.value = $event),
|
|
3133
3133
|
ref_key: "form",
|
|
@@ -3156,7 +3156,7 @@
|
|
|
3156
3156
|
key: 2,
|
|
3157
3157
|
class: "m-fields-link"
|
|
3158
3158
|
};
|
|
3159
|
-
const _sfc_main$
|
|
3159
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
3160
3160
|
...{
|
|
3161
3161
|
name: "MFormLink"
|
|
3162
3162
|
},
|
|
@@ -3239,7 +3239,7 @@
|
|
|
3239
3239
|
]),
|
|
3240
3240
|
_: 1
|
|
3241
3241
|
}),
|
|
3242
|
-
vue.createVNode(_sfc_main$
|
|
3242
|
+
vue.createVNode(_sfc_main$c, {
|
|
3243
3243
|
ref_key: "editor",
|
|
3244
3244
|
ref: editor,
|
|
3245
3245
|
title: _ctx.config.formTitle || "编辑扩展配置",
|
|
@@ -3255,7 +3255,7 @@
|
|
|
3255
3255
|
}
|
|
3256
3256
|
});
|
|
3257
3257
|
|
|
3258
|
-
const _sfc_main$
|
|
3258
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
3259
3259
|
...{
|
|
3260
3260
|
name: "MFormNumber"
|
|
3261
3261
|
},
|
|
@@ -3306,7 +3306,7 @@
|
|
|
3306
3306
|
|
|
3307
3307
|
const _hoisted_1$3 = { class: "m-fields-number-range" };
|
|
3308
3308
|
const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("span", { class: "split-tag" }, "-", -1);
|
|
3309
|
-
const _sfc_main$
|
|
3309
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
3310
3310
|
...{
|
|
3311
3311
|
name: "MFormNumberRange"
|
|
3312
3312
|
},
|
|
@@ -3360,7 +3360,7 @@
|
|
|
3360
3360
|
}
|
|
3361
3361
|
});
|
|
3362
3362
|
|
|
3363
|
-
const _sfc_main$
|
|
3363
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
3364
3364
|
...{
|
|
3365
3365
|
name: "MFormRadioGroup"
|
|
3366
3366
|
},
|
|
@@ -3412,63 +3412,6 @@
|
|
|
3412
3412
|
}
|
|
3413
3413
|
});
|
|
3414
3414
|
|
|
3415
|
-
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
3416
|
-
...{
|
|
3417
|
-
name: "MFormSelectOptionGroups"
|
|
3418
|
-
},
|
|
3419
|
-
__name: "SelectOptionGroups",
|
|
3420
|
-
props: {
|
|
3421
|
-
options: {}
|
|
3422
|
-
},
|
|
3423
|
-
setup(__props) {
|
|
3424
|
-
const uiComponent = design.getConfig("components")?.option.component || "el-option";
|
|
3425
|
-
return (_ctx, _cache) => {
|
|
3426
|
-
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (group, index) => {
|
|
3427
|
-
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicOptionGroup), {
|
|
3428
|
-
key: index,
|
|
3429
|
-
label: group.label,
|
|
3430
|
-
disabled: group.disabled
|
|
3431
|
-
}, {
|
|
3432
|
-
default: vue.withCtx(() => [
|
|
3433
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.options, (item, index2) => {
|
|
3434
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(uiComponent)), {
|
|
3435
|
-
key: index2,
|
|
3436
|
-
label: item.label || item.text,
|
|
3437
|
-
value: item.value,
|
|
3438
|
-
disabled: item.disabled
|
|
3439
|
-
}, null, 8, ["label", "value", "disabled"]);
|
|
3440
|
-
}), 128))
|
|
3441
|
-
]),
|
|
3442
|
-
_: 2
|
|
3443
|
-
}, 1032, ["label", "disabled"]);
|
|
3444
|
-
}), 128);
|
|
3445
|
-
};
|
|
3446
|
-
}
|
|
3447
|
-
});
|
|
3448
|
-
|
|
3449
|
-
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
3450
|
-
...{
|
|
3451
|
-
name: "MFormSelectOptions"
|
|
3452
|
-
},
|
|
3453
|
-
__name: "SelectOptions",
|
|
3454
|
-
props: {
|
|
3455
|
-
options: {},
|
|
3456
|
-
valueKey: {}
|
|
3457
|
-
},
|
|
3458
|
-
setup(__props) {
|
|
3459
|
-
return (_ctx, _cache) => {
|
|
3460
|
-
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (option) => {
|
|
3461
|
-
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicOption), {
|
|
3462
|
-
label: option.text,
|
|
3463
|
-
value: option.value,
|
|
3464
|
-
key: _ctx.valueKey ? option.value[_ctx.valueKey] : option.value,
|
|
3465
|
-
disabled: option.disabled
|
|
3466
|
-
}, null, 8, ["label", "value", "disabled"]);
|
|
3467
|
-
}), 128);
|
|
3468
|
-
};
|
|
3469
|
-
}
|
|
3470
|
-
});
|
|
3471
|
-
|
|
3472
3415
|
const _hoisted_1$2 = { key: 2 };
|
|
3473
3416
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
3474
3417
|
...{
|
|
@@ -3490,6 +3433,8 @@
|
|
|
3490
3433
|
setup(__props, { emit: __emit }) {
|
|
3491
3434
|
const props = __props;
|
|
3492
3435
|
const emit = __emit;
|
|
3436
|
+
const optionComponent = design.getConfig("components")?.option;
|
|
3437
|
+
const optionGroupComponent = design.getConfig("components")?.optionGroup;
|
|
3493
3438
|
if (!props.model)
|
|
3494
3439
|
throw new Error("不能没有model");
|
|
3495
3440
|
useAddField(props.prop);
|
|
@@ -3785,8 +3730,6 @@
|
|
|
3785
3730
|
}, 0);
|
|
3786
3731
|
}
|
|
3787
3732
|
};
|
|
3788
|
-
const itemOptions = options;
|
|
3789
|
-
const groupOptions = options;
|
|
3790
3733
|
return (_ctx, _cache) => {
|
|
3791
3734
|
const _directive_loading = vue.resolveDirective("loading");
|
|
3792
3735
|
return _ctx.model ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(design.TMagicSelect), {
|
|
@@ -3811,13 +3754,41 @@
|
|
|
3811
3754
|
onVisibleChange: visibleHandler
|
|
3812
3755
|
}, {
|
|
3813
3756
|
default: vue.withCtx(() => [
|
|
3814
|
-
_ctx.config.group ? (vue.openBlock(), vue.
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3757
|
+
_ctx.config.group ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(options.value, (group, index) => {
|
|
3758
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(optionGroupComponent)?.component), vue.mergeProps(
|
|
3759
|
+
{ key: index },
|
|
3760
|
+
vue.unref(optionGroupComponent)?.props({
|
|
3761
|
+
label: group.label,
|
|
3762
|
+
disabled: group.disabled
|
|
3763
|
+
})
|
|
3764
|
+
), {
|
|
3765
|
+
default: vue.withCtx(() => [
|
|
3766
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.options, (item, index2) => {
|
|
3767
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(optionComponent)?.component), vue.mergeProps(
|
|
3768
|
+
{ key: index2 },
|
|
3769
|
+
vue.unref(optionComponent)?.props({
|
|
3770
|
+
label: item.label || item.text,
|
|
3771
|
+
value: item.value,
|
|
3772
|
+
disabled: item.disabled
|
|
3773
|
+
})
|
|
3774
|
+
), null, 16);
|
|
3775
|
+
}), 128))
|
|
3776
|
+
]),
|
|
3777
|
+
_: 2
|
|
3778
|
+
}, 1040);
|
|
3779
|
+
}), 128)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(options.value, (option) => {
|
|
3780
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(optionComponent)?.component), vue.mergeProps(
|
|
3781
|
+
{
|
|
3782
|
+
class: "tmagic-design-option",
|
|
3783
|
+
key: _ctx.config.valueKey ? option.value[_ctx.config.valueKey] : option.value
|
|
3784
|
+
},
|
|
3785
|
+
vue.unref(optionComponent)?.props({
|
|
3786
|
+
label: option.text,
|
|
3787
|
+
value: option.value,
|
|
3788
|
+
disabled: option.disabled
|
|
3789
|
+
})
|
|
3790
|
+
), null, 16);
|
|
3791
|
+
}), 128)),
|
|
3821
3792
|
moreLoadingVisible.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, null, 512)), [
|
|
3822
3793
|
[_directive_loading, true]
|
|
3823
3794
|
]) : vue.createCommentVNode("", true)
|
|
@@ -4385,7 +4356,7 @@
|
|
|
4385
4356
|
ref: drawerBody,
|
|
4386
4357
|
class: "m-drawer-body"
|
|
4387
4358
|
}, [
|
|
4388
|
-
vue.createVNode(_sfc_main$
|
|
4359
|
+
vue.createVNode(_sfc_main$d, {
|
|
4389
4360
|
ref_key: "form",
|
|
4390
4361
|
ref: form,
|
|
4391
4362
|
size: _ctx.size,
|
|
@@ -4481,7 +4452,7 @@
|
|
|
4481
4452
|
}, [
|
|
4482
4453
|
vue.createVNode(vue.unref(design.TMagicScrollbar), null, {
|
|
4483
4454
|
default: vue.withCtx(() => [
|
|
4484
|
-
vue.createVNode(_sfc_main$
|
|
4455
|
+
vue.createVNode(_sfc_main$d, {
|
|
4485
4456
|
ref_key: "form",
|
|
4486
4457
|
ref: form,
|
|
4487
4458
|
size: _ctx.size,
|
|
@@ -4535,66 +4506,66 @@
|
|
|
4535
4506
|
const option = Object.assign(defaultInstallOpt, opt);
|
|
4536
4507
|
app.config.globalProperties.$MAGIC_FORM = option;
|
|
4537
4508
|
setConfig(option);
|
|
4538
|
-
app.component("m-form", _sfc_main$
|
|
4539
|
-
app.component("m-form-dialog", _sfc_main$
|
|
4540
|
-
app.component("m-form-container", _sfc_main$
|
|
4541
|
-
app.component("m-form-fieldset", _sfc_main$
|
|
4542
|
-
app.component("m-form-group-list", _sfc_main$
|
|
4543
|
-
app.component("m-form-panel", _sfc_main$
|
|
4544
|
-
app.component("m-form-row", _sfc_main$
|
|
4545
|
-
app.component("m-form-step", _sfc_main$
|
|
4546
|
-
app.component("m-form-table", _sfc_main$
|
|
4547
|
-
app.component("m-form-tab", _sfc_main$
|
|
4509
|
+
app.component("m-form", _sfc_main$d);
|
|
4510
|
+
app.component("m-form-dialog", _sfc_main$c);
|
|
4511
|
+
app.component("m-form-container", _sfc_main$x);
|
|
4512
|
+
app.component("m-form-fieldset", _sfc_main$w);
|
|
4513
|
+
app.component("m-form-group-list", _sfc_main$u);
|
|
4514
|
+
app.component("m-form-panel", _sfc_main$t);
|
|
4515
|
+
app.component("m-form-row", _sfc_main$r);
|
|
4516
|
+
app.component("m-form-step", _sfc_main$q);
|
|
4517
|
+
app.component("m-form-table", _sfc_main$p);
|
|
4518
|
+
app.component("m-form-tab", _sfc_main$o);
|
|
4548
4519
|
app.component("m-fields-text", _sfc_main$5);
|
|
4549
|
-
app.component("m-fields-number", _sfc_main$
|
|
4550
|
-
app.component("m-fields-number-range", _sfc_main$
|
|
4520
|
+
app.component("m-fields-number", _sfc_main$a);
|
|
4521
|
+
app.component("m-fields-number-range", _sfc_main$9);
|
|
4551
4522
|
app.component("m-fields-textarea", _sfc_main$4);
|
|
4552
|
-
app.component("m-fields-hidden", _sfc_main$
|
|
4553
|
-
app.component("m-fields-date", _sfc_main$
|
|
4554
|
-
app.component("m-fields-datetime", _sfc_main$
|
|
4555
|
-
app.component("m-fields-daterange", _sfc_main$
|
|
4523
|
+
app.component("m-fields-hidden", _sfc_main$e);
|
|
4524
|
+
app.component("m-fields-date", _sfc_main$j);
|
|
4525
|
+
app.component("m-fields-datetime", _sfc_main$h);
|
|
4526
|
+
app.component("m-fields-daterange", _sfc_main$i);
|
|
4556
4527
|
app.component("m-fields-timerange", _sfc_main$2);
|
|
4557
4528
|
app.component("m-fields-time", _sfc_main$3);
|
|
4558
|
-
app.component("m-fields-checkbox", _sfc_main$
|
|
4529
|
+
app.component("m-fields-checkbox", _sfc_main$m);
|
|
4559
4530
|
app.component("m-fields-switch", _sfc_main$6);
|
|
4560
|
-
app.component("m-fields-color-picker", _sfc_main$
|
|
4561
|
-
app.component("m-fields-checkbox-group", _sfc_main$
|
|
4562
|
-
app.component("m-fields-radio-group", _sfc_main$
|
|
4563
|
-
app.component("m-fields-display", _sfc_main$
|
|
4564
|
-
app.component("m-fields-link", _sfc_main$
|
|
4531
|
+
app.component("m-fields-color-picker", _sfc_main$k);
|
|
4532
|
+
app.component("m-fields-checkbox-group", _sfc_main$l);
|
|
4533
|
+
app.component("m-fields-radio-group", _sfc_main$8);
|
|
4534
|
+
app.component("m-fields-display", _sfc_main$g);
|
|
4535
|
+
app.component("m-fields-link", _sfc_main$b);
|
|
4565
4536
|
app.component("m-fields-select", _sfc_main$7);
|
|
4566
|
-
app.component("m-fields-cascader", _sfc_main$
|
|
4567
|
-
app.component("m-fields-dynamic-field", _sfc_main$
|
|
4537
|
+
app.component("m-fields-cascader", _sfc_main$n);
|
|
4538
|
+
app.component("m-fields-dynamic-field", _sfc_main$f);
|
|
4568
4539
|
}
|
|
4569
4540
|
};
|
|
4570
4541
|
|
|
4571
|
-
exports.MCascader = _sfc_main$
|
|
4572
|
-
exports.MCheckbox = _sfc_main$
|
|
4573
|
-
exports.MCheckboxGroup = _sfc_main$
|
|
4574
|
-
exports.MColorPicker = _sfc_main$
|
|
4575
|
-
exports.MContainer = _sfc_main$
|
|
4576
|
-
exports.MDate = _sfc_main$
|
|
4577
|
-
exports.MDateTime = _sfc_main$
|
|
4578
|
-
exports.MDaterange = _sfc_main$
|
|
4579
|
-
exports.MDisplay = _sfc_main$
|
|
4580
|
-
exports.MDynamicField = _sfc_main$
|
|
4581
|
-
exports.MFieldset = _sfc_main$
|
|
4582
|
-
exports.MForm = _sfc_main$
|
|
4542
|
+
exports.MCascader = _sfc_main$n;
|
|
4543
|
+
exports.MCheckbox = _sfc_main$m;
|
|
4544
|
+
exports.MCheckboxGroup = _sfc_main$l;
|
|
4545
|
+
exports.MColorPicker = _sfc_main$k;
|
|
4546
|
+
exports.MContainer = _sfc_main$x;
|
|
4547
|
+
exports.MDate = _sfc_main$j;
|
|
4548
|
+
exports.MDateTime = _sfc_main$h;
|
|
4549
|
+
exports.MDaterange = _sfc_main$i;
|
|
4550
|
+
exports.MDisplay = _sfc_main$g;
|
|
4551
|
+
exports.MDynamicField = _sfc_main$f;
|
|
4552
|
+
exports.MFieldset = _sfc_main$w;
|
|
4553
|
+
exports.MForm = _sfc_main$d;
|
|
4583
4554
|
exports.MFormBox = _sfc_main;
|
|
4584
|
-
exports.MFormDialog = _sfc_main$
|
|
4555
|
+
exports.MFormDialog = _sfc_main$c;
|
|
4585
4556
|
exports.MFormDrawer = _sfc_main$1;
|
|
4586
|
-
exports.MGroupList = _sfc_main$
|
|
4587
|
-
exports.MHidden = _sfc_main$
|
|
4588
|
-
exports.MLink = _sfc_main$
|
|
4589
|
-
exports.MNumber = _sfc_main$
|
|
4590
|
-
exports.MNumberRange = _sfc_main$
|
|
4591
|
-
exports.MPanel = _sfc_main$
|
|
4592
|
-
exports.MRadioGroup = _sfc_main$
|
|
4593
|
-
exports.MRow = _sfc_main$
|
|
4557
|
+
exports.MGroupList = _sfc_main$u;
|
|
4558
|
+
exports.MHidden = _sfc_main$e;
|
|
4559
|
+
exports.MLink = _sfc_main$b;
|
|
4560
|
+
exports.MNumber = _sfc_main$a;
|
|
4561
|
+
exports.MNumberRange = _sfc_main$9;
|
|
4562
|
+
exports.MPanel = _sfc_main$t;
|
|
4563
|
+
exports.MRadioGroup = _sfc_main$8;
|
|
4564
|
+
exports.MRow = _sfc_main$r;
|
|
4594
4565
|
exports.MSelect = _sfc_main$7;
|
|
4595
4566
|
exports.MSwitch = _sfc_main$6;
|
|
4596
|
-
exports.MTable = _sfc_main$
|
|
4597
|
-
exports.MTabs = _sfc_main$
|
|
4567
|
+
exports.MTable = _sfc_main$p;
|
|
4568
|
+
exports.MTabs = _sfc_main$o;
|
|
4598
4569
|
exports.MText = _sfc_main$5;
|
|
4599
4570
|
exports.MTextarea = _sfc_main$4;
|
|
4600
4571
|
exports.MTime = _sfc_main$3;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.
|
|
2
|
+
"version": "1.4.3",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@element-plus/icons-vue": "^2.3.1",
|
|
35
|
-
"@tmagic/design": "1.4.
|
|
36
|
-
"@tmagic/utils": "1.4.
|
|
35
|
+
"@tmagic/design": "1.4.3",
|
|
36
|
+
"@tmagic/utils": "1.4.3",
|
|
37
37
|
"lodash-es": "^4.17.21",
|
|
38
38
|
"sortablejs": "^1.14.0",
|
|
39
39
|
"vue": "^3.4.21"
|