@tmagic/form 1.0.0-beta.1 → 1.0.0-beta.12
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/LICENSE +5432 -0
- package/README.md +1 -0
- package/dist/style.css +0 -1
- package/dist/tmagic-form.es.js +71 -47
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +71 -47
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Container.vue.d.ts +1 -1
- package/dist/types/src/containers/Fieldset.vue.d.ts +1 -1
- package/dist/types/src/containers/GroupList.vue.d.ts +1 -1
- package/dist/types/src/containers/GroupListItem.vue.d.ts +1 -1
- package/dist/types/src/containers/Panel.vue.d.ts +1 -1
- package/dist/types/src/containers/Row.vue.d.ts +1 -1
- package/dist/types/src/containers/Step.vue.d.ts +1 -1
- package/dist/types/src/containers/Tabs.vue.d.ts +2 -2
- package/dist/types/src/fields/Checkbox.vue.d.ts +2 -2
- package/dist/types/src/fields/CheckboxGroup.vue.d.ts +2 -2
- package/dist/types/src/fields/Date.vue.d.ts +2 -2
- package/dist/types/src/fields/DateTime.vue.d.ts +2 -2
- package/dist/types/src/fields/Daterange.vue.d.ts +2 -2
- package/dist/types/src/fields/DynamicField.vue.d.ts +2 -2
- package/dist/types/src/fields/Number.vue.d.ts +2 -2
- package/dist/types/src/fields/RadioGroup.vue.d.ts +2 -2
- package/dist/types/src/fields/Switch.vue.d.ts +2 -2
- package/dist/types/src/fields/Text.vue.d.ts +2 -2
- package/dist/types/src/fields/Textarea.vue.d.ts +2 -2
- package/dist/types/src/fields/Time.vue.d.ts +2 -2
- package/dist/types/src/schema.d.ts +2 -0
- package/package.json +10 -8
- package/src/Form.vue +39 -30
- package/src/FormDialog.vue +3 -0
- package/src/containers/Container.vue +20 -7
- package/src/containers/Table.vue +8 -6
- package/src/containers/Tabs.vue +4 -0
- package/src/fields/Select.vue +4 -3
- package/src/fields/Text.vue +4 -4
- package/src/schema.ts +2 -0
- package/src/theme/table.scss +0 -1
- package/src/utils/form.ts +5 -1
- package/dist/types/src/Form.vue.d.ts +0 -304
- package/dist/types/src/FormDialog.vue.d.ts +0 -641
- package/dist/types/src/containers/Table.vue.d.ts +0 -1401
- package/dist/types/src/fields/Cascader.vue.d.ts +0 -1748
- package/dist/types/src/fields/Link.vue.d.ts +0 -1365
- package/dist/types/src/fields/Select.vue.d.ts +0 -975
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.vue, global.
|
|
5
|
-
})(this, (function (exports, vue,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons'), require('lodash-es'), require('element-plus'), require('sortablejs'), require('@tmagic/utils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons', 'lodash-es', 'element-plus', 'sortablejs', '@tmagic/utils'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicForm = {}, global.vue, global.icons, global.lodashEs, global.elementPlus, global.Sortable, global.utils));
|
|
5
|
+
})(this, (function (exports, vue, icons, lodashEs, elementPlus, Sortable, utils) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -62,7 +62,11 @@
|
|
|
62
62
|
asyncLoadConfig(value, initValue2, item);
|
|
63
63
|
if (name && !items && typeof initValue2[name] !== "undefined") {
|
|
64
64
|
if (typeof value[name] === "undefined") {
|
|
65
|
-
|
|
65
|
+
if (type === "number") {
|
|
66
|
+
value[name] = Number(initValue2[name]);
|
|
67
|
+
} else {
|
|
68
|
+
value[name] = typeof initValue2[name] === "object" ? lodashEs.cloneDeep(initValue2[name]) : initValue2[name];
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
return value;
|
|
68
72
|
}
|
|
@@ -174,6 +178,7 @@
|
|
|
174
178
|
|
|
175
179
|
const _sfc_main$s = vue.defineComponent({
|
|
176
180
|
name: "m-form-container",
|
|
181
|
+
components: { WarningFilled: icons.WarningFilled },
|
|
177
182
|
props: {
|
|
178
183
|
labelWidth: String,
|
|
179
184
|
expandMore: Boolean,
|
|
@@ -267,9 +272,14 @@
|
|
|
267
272
|
};
|
|
268
273
|
const onChangeHandler = async function(v, key2) {
|
|
269
274
|
const { filter, onChange, trim, name: name2, dynamicKey } = props.config;
|
|
270
|
-
let value =
|
|
271
|
-
|
|
272
|
-
|
|
275
|
+
let value = v;
|
|
276
|
+
try {
|
|
277
|
+
value = filterHandler(filter, v);
|
|
278
|
+
value = await changeHandler(onChange, value) ?? value;
|
|
279
|
+
value = trimHandler(trim, value) ?? value;
|
|
280
|
+
} catch (e) {
|
|
281
|
+
console.error(e);
|
|
282
|
+
}
|
|
273
283
|
if ((name2 || name2 === 0) && props.model !== value && (v !== value || props.model[name2] !== value)) {
|
|
274
284
|
props.model[name2] = value;
|
|
275
285
|
}
|
|
@@ -299,9 +309,8 @@
|
|
|
299
309
|
const _hoisted_1$g = ["innerHTML"];
|
|
300
310
|
const _hoisted_2$7 = ["innerHTML"];
|
|
301
311
|
const _hoisted_3$7 = ["innerHTML"];
|
|
302
|
-
const _hoisted_4$6 =
|
|
303
|
-
const _hoisted_5$4 =
|
|
304
|
-
const _hoisted_6$3 = {
|
|
312
|
+
const _hoisted_4$6 = ["innerHTML"];
|
|
313
|
+
const _hoisted_5$4 = {
|
|
305
314
|
key: 4,
|
|
306
315
|
style: { "text-align": "center" }
|
|
307
316
|
};
|
|
@@ -309,11 +318,13 @@
|
|
|
309
318
|
const _component_m_fields_hidden = vue.resolveComponent("m-fields-hidden");
|
|
310
319
|
const _component_el_tooltip = vue.resolveComponent("el-tooltip");
|
|
311
320
|
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
321
|
+
const _component_warning_filled = vue.resolveComponent("warning-filled");
|
|
322
|
+
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
312
323
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
313
324
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
314
325
|
return _ctx.config ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
315
326
|
key: 0,
|
|
316
|
-
style: vue.normalizeStyle(_ctx.config.tip ? "display: flex" : ""),
|
|
327
|
+
style: vue.normalizeStyle(_ctx.config.tip ? "display: flex;align-items: baseline;" : ""),
|
|
317
328
|
class: vue.normalizeClass([_ctx.config.className, "m-form-container"])
|
|
318
329
|
}, [
|
|
319
330
|
_ctx.type === "hidden" ? (vue.openBlock(), vue.createBlock(_component_m_fields_hidden, {
|
|
@@ -384,16 +395,20 @@
|
|
|
384
395
|
}, 8, ["style", "prop", "label-width", "rules"]),
|
|
385
396
|
_ctx.config.tip ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
|
|
386
397
|
key: 0,
|
|
387
|
-
placement: "top"
|
|
388
|
-
style: { "line-height": "40px", "margin-left": "5px" }
|
|
398
|
+
placement: "top"
|
|
389
399
|
}, {
|
|
390
400
|
content: vue.withCtx(() => [
|
|
391
401
|
vue.createElementVNode("div", {
|
|
392
402
|
innerHTML: _ctx.config.tip
|
|
393
|
-
}, null, 8,
|
|
403
|
+
}, null, 8, _hoisted_4$6)
|
|
394
404
|
]),
|
|
395
405
|
default: vue.withCtx(() => [
|
|
396
|
-
|
|
406
|
+
vue.createVNode(_component_el_icon, { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
407
|
+
default: vue.withCtx(() => [
|
|
408
|
+
vue.createVNode(_component_warning_filled)
|
|
409
|
+
]),
|
|
410
|
+
_: 1
|
|
411
|
+
})
|
|
397
412
|
]),
|
|
398
413
|
_: 1
|
|
399
414
|
})) : vue.createCommentVNode("", true)
|
|
@@ -412,7 +427,7 @@
|
|
|
412
427
|
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
|
|
413
428
|
}), 128)) : vue.createCommentVNode("", true)
|
|
414
429
|
], 64)) : vue.createCommentVNode("", true),
|
|
415
|
-
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div",
|
|
430
|
+
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$4, [
|
|
416
431
|
vue.createVNode(_component_el_button, {
|
|
417
432
|
type: "text",
|
|
418
433
|
onClick: _ctx.expandHandler
|
|
@@ -1362,6 +1377,8 @@
|
|
|
1362
1377
|
ArrowDown: icons.ArrowDown,
|
|
1363
1378
|
ArrowUp: icons.ArrowUp,
|
|
1364
1379
|
Delete: icons.Delete,
|
|
1380
|
+
FullScreen: icons.FullScreen,
|
|
1381
|
+
Grid: icons.Grid,
|
|
1365
1382
|
data: vue.computed(() => props.model[modelName.value].filter((item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value)),
|
|
1366
1383
|
addable: vue.computed(() => {
|
|
1367
1384
|
if (!props.model[modelName.value].length) {
|
|
@@ -1610,7 +1627,7 @@
|
|
|
1610
1627
|
})) : vue.createCommentVNode("", true),
|
|
1611
1628
|
vue.createVNode(_component_el_table_column, {
|
|
1612
1629
|
label: "\u64CD\u4F5C",
|
|
1613
|
-
width: "
|
|
1630
|
+
width: "60",
|
|
1614
1631
|
fixed: _ctx.config.fixed === false ? void 0 : "left"
|
|
1615
1632
|
}, {
|
|
1616
1633
|
default: vue.withCtx((scope) => [
|
|
@@ -1628,7 +1645,7 @@
|
|
|
1628
1645
|
_ctx.sort && _ctx.model[_ctx.modelName] && _ctx.model[_ctx.modelName].length > 1 ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
|
|
1629
1646
|
key: 1,
|
|
1630
1647
|
label: "\u6392\u5E8F",
|
|
1631
|
-
width: "
|
|
1648
|
+
width: "60"
|
|
1632
1649
|
}, {
|
|
1633
1650
|
default: vue.withCtx((scope) => [
|
|
1634
1651
|
scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1 !== 0 ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
|
|
@@ -1676,7 +1693,7 @@
|
|
|
1676
1693
|
width: "45"
|
|
1677
1694
|
})) : vue.createCommentVNode("", true),
|
|
1678
1695
|
vue.createVNode(_component_el_table_column, {
|
|
1679
|
-
width: "
|
|
1696
|
+
width: "60",
|
|
1680
1697
|
label: "\u5E8F\u53F7"
|
|
1681
1698
|
}, {
|
|
1682
1699
|
default: vue.withCtx((scope) => [
|
|
@@ -1733,7 +1750,7 @@
|
|
|
1733
1750
|
_hoisted_5,
|
|
1734
1751
|
_ctx.enableToggleMode && !_ctx.isFullscreen ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
1735
1752
|
key: 1,
|
|
1736
|
-
icon:
|
|
1753
|
+
icon: _ctx.Grid,
|
|
1737
1754
|
size: "small",
|
|
1738
1755
|
onClick: _ctx.toggleMode
|
|
1739
1756
|
}, {
|
|
@@ -1741,10 +1758,10 @@
|
|
|
1741
1758
|
_hoisted_6
|
|
1742
1759
|
]),
|
|
1743
1760
|
_: 1
|
|
1744
|
-
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
1761
|
+
}, 8, ["icon", "onClick"])) : vue.createCommentVNode("", true),
|
|
1745
1762
|
_ctx.config.enableFullscreen !== false ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
1746
1763
|
key: 2,
|
|
1747
|
-
icon:
|
|
1764
|
+
icon: _ctx.FullScreen,
|
|
1748
1765
|
size: "small",
|
|
1749
1766
|
onClick: _ctx.toggleFullscreen
|
|
1750
1767
|
}, {
|
|
@@ -1752,7 +1769,7 @@
|
|
|
1752
1769
|
vue.createTextVNode(vue.toDisplayString(_ctx.isFullscreen ? "\u9000\u51FA\u5168\u5C4F" : "\u5168\u5C4F\u7F16\u8F91"), 1)
|
|
1753
1770
|
]),
|
|
1754
1771
|
_: 1
|
|
1755
|
-
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
1772
|
+
}, 8, ["icon", "onClick"])) : vue.createCommentVNode("", true),
|
|
1756
1773
|
_ctx.importable ? (vue.openBlock(), vue.createBlock(_component_el_upload, {
|
|
1757
1774
|
key: 3,
|
|
1758
1775
|
ref: "excelBtn",
|
|
@@ -1818,6 +1835,7 @@
|
|
|
1818
1835
|
};
|
|
1819
1836
|
const tabClickHandler = (mForm, tab, props) => {
|
|
1820
1837
|
const { config, model, prop } = props;
|
|
1838
|
+
tab.name = tab.paneName;
|
|
1821
1839
|
if (typeof config.onTabClick === "function") {
|
|
1822
1840
|
config.onTabClick(mForm, tab, { model, formValue: mForm?.values, prop });
|
|
1823
1841
|
}
|
|
@@ -2937,6 +2955,7 @@
|
|
|
2937
2955
|
vue.watch(() => mForm?.values, () => {
|
|
2938
2956
|
typeof props.config.options === "function" && Promise.resolve(props.config.options(mForm, {
|
|
2939
2957
|
model: props.model,
|
|
2958
|
+
prop: props.prop,
|
|
2940
2959
|
formValues: mForm?.values,
|
|
2941
2960
|
formValue: mForm?.values
|
|
2942
2961
|
})).then((data) => {
|
|
@@ -2986,11 +3005,10 @@
|
|
|
2986
3005
|
remote,
|
|
2987
3006
|
options,
|
|
2988
3007
|
moreLoadingVisible,
|
|
3008
|
+
popperClass: mForm?.popperClass,
|
|
2989
3009
|
getRequestFuc() {
|
|
2990
3010
|
return getConfig("request");
|
|
2991
3011
|
},
|
|
2992
|
-
async getInitOption() {
|
|
2993
|
-
},
|
|
2994
3012
|
changeHandler(value) {
|
|
2995
3013
|
emit("change", value);
|
|
2996
3014
|
},
|
|
@@ -3039,6 +3057,7 @@
|
|
|
3039
3057
|
ref: "select",
|
|
3040
3058
|
clearable: "",
|
|
3041
3059
|
filterable: "",
|
|
3060
|
+
"popper-class": `m-select-popper ${_ctx.popperClass}`,
|
|
3042
3061
|
size: _ctx.size,
|
|
3043
3062
|
remote: _ctx.remote,
|
|
3044
3063
|
placeholder: _ctx.config.placeholder,
|
|
@@ -3046,7 +3065,7 @@
|
|
|
3046
3065
|
"value-key": _ctx.config.valueKey || "value",
|
|
3047
3066
|
"allow-create": _ctx.config.allowCreate,
|
|
3048
3067
|
disabled: _ctx.disabled,
|
|
3049
|
-
"remote-method": _ctx.remoteMethod,
|
|
3068
|
+
"remote-method": _ctx.config.remote && _ctx.remoteMethod,
|
|
3050
3069
|
onChange: _ctx.changeHandler,
|
|
3051
3070
|
onVisibleChange: _ctx.visibleHandler
|
|
3052
3071
|
}, {
|
|
@@ -3082,7 +3101,7 @@
|
|
|
3082
3101
|
]) : vue.createCommentVNode("", true)
|
|
3083
3102
|
]),
|
|
3084
3103
|
_: 1
|
|
3085
|
-
}, 8, ["modelValue", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
|
|
3104
|
+
}, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
|
|
3086
3105
|
[_directive_loading, _ctx.loading]
|
|
3087
3106
|
]) : vue.createCommentVNode("", true);
|
|
3088
3107
|
}
|
|
@@ -3154,6 +3173,7 @@
|
|
|
3154
3173
|
},
|
|
3155
3174
|
emits: ["change", "input"],
|
|
3156
3175
|
setup(props, { emit }) {
|
|
3176
|
+
const mForm = vue.inject("mForm");
|
|
3157
3177
|
useAddField(props.prop);
|
|
3158
3178
|
const modelName = vue.computed(() => props.name || props.config.name || "");
|
|
3159
3179
|
return {
|
|
@@ -3162,12 +3182,10 @@
|
|
|
3162
3182
|
emit("change", v);
|
|
3163
3183
|
},
|
|
3164
3184
|
inputHandler(v) {
|
|
3165
|
-
const mForm = vue.inject("mForm");
|
|
3166
3185
|
emit("input", v);
|
|
3167
3186
|
mForm?.$emit("field-input", props.prop, v);
|
|
3168
3187
|
},
|
|
3169
3188
|
buttonClickHandler() {
|
|
3170
|
-
const mForm = vue.inject("mForm");
|
|
3171
3189
|
if (typeof props.config.append === "string")
|
|
3172
3190
|
return;
|
|
3173
3191
|
if (props.config.append?.handler) {
|
|
@@ -3253,13 +3271,14 @@
|
|
|
3253
3271
|
typeof _ctx.config.append === "object" && _ctx.config.append.type === "button" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3254
3272
|
key: 1,
|
|
3255
3273
|
style: { "color": "#409eff" },
|
|
3256
|
-
|
|
3274
|
+
size: _ctx.size,
|
|
3275
|
+
onClick: vue.withModifiers(_ctx.buttonClickHandler, ["prevent"])
|
|
3257
3276
|
}, {
|
|
3258
3277
|
default: vue.withCtx(() => [
|
|
3259
3278
|
vue.createTextVNode(vue.toDisplayString(_ctx.config.append.text), 1)
|
|
3260
3279
|
]),
|
|
3261
3280
|
_: 1
|
|
3262
|
-
}, 8, ["onClick"])) : vue.createCommentVNode("", true)
|
|
3281
|
+
}, 8, ["size", "onClick"])) : vue.createCommentVNode("", true)
|
|
3263
3282
|
])
|
|
3264
3283
|
} : void 0
|
|
3265
3284
|
]), 1032, ["modelValue", "size", "placeholder", "disabled", "onChange", "onInput"]);
|
|
@@ -3358,7 +3377,6 @@
|
|
|
3358
3377
|
|
|
3359
3378
|
const _sfc_main$1 = vue.defineComponent({
|
|
3360
3379
|
name: "m-form",
|
|
3361
|
-
components: { ElForm: elementPlus.ElForm, MContainer: Container },
|
|
3362
3380
|
props: {
|
|
3363
3381
|
initValues: {
|
|
3364
3382
|
type: Object,
|
|
@@ -3391,8 +3409,7 @@
|
|
|
3391
3409
|
default: () => 1
|
|
3392
3410
|
},
|
|
3393
3411
|
size: {
|
|
3394
|
-
type: String
|
|
3395
|
-
default: "small"
|
|
3412
|
+
type: String
|
|
3396
3413
|
},
|
|
3397
3414
|
inline: {
|
|
3398
3415
|
type: Boolean,
|
|
@@ -3405,6 +3422,9 @@
|
|
|
3405
3422
|
keyProp: {
|
|
3406
3423
|
type: String,
|
|
3407
3424
|
default: "__key"
|
|
3425
|
+
},
|
|
3426
|
+
popperClass: {
|
|
3427
|
+
type: String
|
|
3408
3428
|
}
|
|
3409
3429
|
},
|
|
3410
3430
|
emits: ["change", "field-input", "field-change"],
|
|
@@ -3416,6 +3436,7 @@
|
|
|
3416
3436
|
const requestFuc = getConfig("request");
|
|
3417
3437
|
const formState = vue.reactive({
|
|
3418
3438
|
keyProp: props.keyProp,
|
|
3439
|
+
popperClass: props.popperClass,
|
|
3419
3440
|
config: props.config,
|
|
3420
3441
|
initValues: props.initValues,
|
|
3421
3442
|
parentValues: props.parentValues,
|
|
@@ -3435,8 +3456,10 @@
|
|
|
3435
3456
|
}
|
|
3436
3457
|
});
|
|
3437
3458
|
vue.provide("mForm", formState);
|
|
3438
|
-
vue.
|
|
3439
|
-
|
|
3459
|
+
vue.watch([() => props.config, () => props.initValues], ([config], [preConfig]) => {
|
|
3460
|
+
if (!lodashEs.isEqual(vue.toRaw(config), vue.toRaw(preConfig))) {
|
|
3461
|
+
initialized.value = false;
|
|
3462
|
+
}
|
|
3440
3463
|
initValue(formState, {
|
|
3441
3464
|
initValues: props.initValues,
|
|
3442
3465
|
config: props.config
|
|
@@ -3444,7 +3467,7 @@
|
|
|
3444
3467
|
values.value = value;
|
|
3445
3468
|
initialized.value = true;
|
|
3446
3469
|
});
|
|
3447
|
-
});
|
|
3470
|
+
}, { immediate: true });
|
|
3448
3471
|
return {
|
|
3449
3472
|
initialized,
|
|
3450
3473
|
values,
|
|
@@ -3477,10 +3500,9 @@
|
|
|
3477
3500
|
}
|
|
3478
3501
|
});
|
|
3479
3502
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3480
|
-
const
|
|
3481
|
-
const
|
|
3482
|
-
return
|
|
3483
|
-
key: 0,
|
|
3503
|
+
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
3504
|
+
const _component_el_form = vue.resolveComponent("el-form");
|
|
3505
|
+
return vue.openBlock(), vue.createBlock(_component_el_form, {
|
|
3484
3506
|
class: "m-form",
|
|
3485
3507
|
ref: "elForm",
|
|
3486
3508
|
model: _ctx.values,
|
|
@@ -3491,8 +3513,8 @@
|
|
|
3491
3513
|
"label-position": _ctx.labelPosition
|
|
3492
3514
|
}, {
|
|
3493
3515
|
default: vue.withCtx(() => [
|
|
3494
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment,
|
|
3495
|
-
return vue.openBlock(), vue.createBlock(
|
|
3516
|
+
_ctx.initialized && Array.isArray(_ctx.config) ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.config, (item, index) => {
|
|
3517
|
+
return vue.openBlock(), vue.createBlock(_component_m_form_container, {
|
|
3496
3518
|
key: item[_ctx.keyProp] ?? index,
|
|
3497
3519
|
config: item,
|
|
3498
3520
|
model: _ctx.values,
|
|
@@ -3501,10 +3523,10 @@
|
|
|
3501
3523
|
size: _ctx.size,
|
|
3502
3524
|
onChange: _ctx.changeHandler
|
|
3503
3525
|
}, null, 8, ["config", "model", "label-width", "step-active", "size", "onChange"]);
|
|
3504
|
-
}), 128))
|
|
3526
|
+
}), 128)) : vue.createCommentVNode("", true)
|
|
3505
3527
|
]),
|
|
3506
3528
|
_: 1
|
|
3507
|
-
}, 8, ["model", "label-width", "disabled", "style", "inline", "label-position"])
|
|
3529
|
+
}, 8, ["model", "label-width", "disabled", "style", "inline", "label-position"]);
|
|
3508
3530
|
}
|
|
3509
3531
|
var Form = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
3510
3532
|
|
|
@@ -3524,6 +3546,7 @@
|
|
|
3524
3546
|
default: () => []
|
|
3525
3547
|
},
|
|
3526
3548
|
labelWidth: [Number, String],
|
|
3549
|
+
size: String,
|
|
3527
3550
|
confirmText: {
|
|
3528
3551
|
type: String,
|
|
3529
3552
|
default: "\u786E\u5B9A"
|
|
@@ -3694,11 +3717,12 @@
|
|
|
3694
3717
|
modelValue: _ctx.stepActive,
|
|
3695
3718
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.stepActive = $event),
|
|
3696
3719
|
ref: "form",
|
|
3720
|
+
size: _ctx.size,
|
|
3697
3721
|
config: _ctx.config,
|
|
3698
3722
|
"init-values": _ctx.values,
|
|
3699
3723
|
"label-width": _ctx.labelWidth,
|
|
3700
3724
|
onChange: _ctx.changeHandler
|
|
3701
|
-
}, null, 8, ["modelValue", "config", "init-values", "label-width", "onChange"]),
|
|
3725
|
+
}, null, 8, ["modelValue", "size", "config", "init-values", "label-width", "onChange"]),
|
|
3702
3726
|
vue.renderSlot(_ctx.$slots, "default")
|
|
3703
3727
|
], 4)
|
|
3704
3728
|
]),
|