@tmagic/form 1.1.4 → 1.1.5
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.mjs +267 -204
- package/dist/tmagic-form.mjs.map +1 -1
- package/dist/tmagic-form.umd.js +266 -203
- package/dist/tmagic-form.umd.js.map +1 -1
- package/package.json +4 -4
- package/src/FormDialog.vue +53 -48
- package/src/schema.ts +1 -1
- package/types/FormDialog.vue.d.ts +6 -0
- package/types/fields/Link.vue.d.ts +9 -0
- package/types/schema.d.ts +1 -1
package/dist/tmagic-form.umd.js
CHANGED
|
@@ -129,20 +129,24 @@
|
|
|
129
129
|
return rules.map((item) => {
|
|
130
130
|
if (typeof item.validator === "function") {
|
|
131
131
|
const fnc = item.validator;
|
|
132
|
-
item.validator = (rule, value, callback, source, options) => fnc(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
132
|
+
item.validator = (rule, value, callback, source, options) => fnc(
|
|
133
|
+
{
|
|
134
|
+
rule,
|
|
135
|
+
value: props.config.names ? props.model : value,
|
|
136
|
+
callback,
|
|
137
|
+
source,
|
|
138
|
+
options
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
values: mForm?.initValues || {},
|
|
142
|
+
model: props.model,
|
|
143
|
+
parent: mForm?.parentValues || {},
|
|
144
|
+
formValue: mForm?.values || props.model,
|
|
145
|
+
prop: props.prop,
|
|
146
|
+
config: props.config
|
|
147
|
+
},
|
|
148
|
+
mForm
|
|
149
|
+
);
|
|
146
150
|
}
|
|
147
151
|
return item;
|
|
148
152
|
});
|
|
@@ -319,7 +323,7 @@
|
|
|
319
323
|
const _hoisted_2$7 = ["innerHTML"];
|
|
320
324
|
const _hoisted_3$7 = ["innerHTML"];
|
|
321
325
|
const _hoisted_4$6 = ["innerHTML"];
|
|
322
|
-
const _hoisted_5$
|
|
326
|
+
const _hoisted_5$5 = {
|
|
323
327
|
key: 4,
|
|
324
328
|
style: { "text-align": "center" }
|
|
325
329
|
};
|
|
@@ -437,7 +441,7 @@
|
|
|
437
441
|
}, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
|
|
438
442
|
}), 128)) : vue.createCommentVNode("", true)
|
|
439
443
|
], 64)) : vue.createCommentVNode("", true),
|
|
440
|
-
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
444
|
+
_ctx.config.expand && _ctx.type !== "fieldset" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$5, [
|
|
441
445
|
vue.createVNode(_component_el_button, {
|
|
442
446
|
text: "",
|
|
443
447
|
onClick: _ctx.expandHandler
|
|
@@ -456,7 +460,7 @@
|
|
|
456
460
|
const _hoisted_2$6 = ["innerHTML"];
|
|
457
461
|
const _hoisted_3$6 = { key: 1 };
|
|
458
462
|
const _hoisted_4$5 = ["innerHTML"];
|
|
459
|
-
const _hoisted_5$
|
|
463
|
+
const _hoisted_5$4 = ["innerHTML"];
|
|
460
464
|
const _hoisted_6$2 = {
|
|
461
465
|
key: 2,
|
|
462
466
|
style: { "display": "flex" }
|
|
@@ -495,9 +499,12 @@
|
|
|
495
499
|
};
|
|
496
500
|
const key = (item, index) => item[mForm?.keyProp || "__key"] ?? index;
|
|
497
501
|
if (props.config.checkbox && name.value) {
|
|
498
|
-
vue.watch(
|
|
499
|
-
|
|
500
|
-
|
|
502
|
+
vue.watch(
|
|
503
|
+
() => props.model[name.value]?.value,
|
|
504
|
+
() => {
|
|
505
|
+
emit("change", props.model);
|
|
506
|
+
}
|
|
507
|
+
);
|
|
501
508
|
}
|
|
502
509
|
return (_ctx, _cache) => {
|
|
503
510
|
const _component_el_checkbox = vue.resolveComponent("el-checkbox");
|
|
@@ -538,7 +545,7 @@
|
|
|
538
545
|
key: 0,
|
|
539
546
|
innerHTML: __props.config.extra,
|
|
540
547
|
class: "m-form-tip"
|
|
541
|
-
}, null, 8, _hoisted_5$
|
|
548
|
+
}, null, 8, _hoisted_5$4)) : vue.createCommentVNode("", true)
|
|
542
549
|
])),
|
|
543
550
|
__props.config.schematic && vue.unref(show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
544
551
|
vue.createElementVNode("div", _hoisted_7$2, [
|
|
@@ -861,7 +868,7 @@
|
|
|
861
868
|
class: "el-table__empty-block"
|
|
862
869
|
};
|
|
863
870
|
const _hoisted_4$3 = /* @__PURE__ */ vue.createElementVNode("span", { class: "el-table__empty-text" }, "\u6682\u65E0\u6570\u636E", -1);
|
|
864
|
-
const _hoisted_5$
|
|
871
|
+
const _hoisted_5$3 = [
|
|
865
872
|
_hoisted_4$3
|
|
866
873
|
];
|
|
867
874
|
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0\u7EC4");
|
|
@@ -875,7 +882,7 @@
|
|
|
875
882
|
innerHTML: _ctx.config.extra,
|
|
876
883
|
style: { "color": "rgba(0, 0, 0, 0.45)" }
|
|
877
884
|
}, null, 8, _hoisted_2$4)) : vue.createCommentVNode("", true),
|
|
878
|
-
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, _hoisted_5$
|
|
885
|
+
!_ctx.model[_ctx.name] || !_ctx.model[_ctx.name].length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, _hoisted_5$3)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 2 }, vue.renderList(_ctx.model[_ctx.name], (item, index) => {
|
|
879
886
|
return vue.openBlock(), vue.createBlock(_component_m_fields_group_list_item, {
|
|
880
887
|
key: index,
|
|
881
888
|
model: item,
|
|
@@ -956,7 +963,7 @@
|
|
|
956
963
|
style: { "display": "flex" }
|
|
957
964
|
};
|
|
958
965
|
const _hoisted_4$2 = { style: { "flex": "1" } };
|
|
959
|
-
const _hoisted_5$
|
|
966
|
+
const _hoisted_5$2 = ["src"];
|
|
960
967
|
function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
961
968
|
const _component_caret_bottom = vue.resolveComponent("caret-bottom");
|
|
962
969
|
const _component_caret_right = vue.resolveComponent("caret-right");
|
|
@@ -1010,7 +1017,7 @@
|
|
|
1010
1017
|
vue.createElementVNode("img", {
|
|
1011
1018
|
class: "m-form-schematic",
|
|
1012
1019
|
src: _ctx.config.schematic
|
|
1013
|
-
}, null, 8, _hoisted_5$
|
|
1020
|
+
}, null, 8, _hoisted_5$2)
|
|
1014
1021
|
])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.items, (item, index) => {
|
|
1015
1022
|
return vue.openBlock(), vue.createBlock(_component_m_form_container, {
|
|
1016
1023
|
key: item[_ctx.mForm?.keyProp || "__key"] ?? index,
|
|
@@ -1279,7 +1286,11 @@
|
|
|
1279
1286
|
setTimeout(() => rowDrop());
|
|
1280
1287
|
};
|
|
1281
1288
|
const swapArray = (index1, index2) => {
|
|
1282
|
-
[props.model[modelName.value][index1]] = props.model[modelName.value].splice(
|
|
1289
|
+
[props.model[modelName.value][index1]] = props.model[modelName.value].splice(
|
|
1290
|
+
index2,
|
|
1291
|
+
1,
|
|
1292
|
+
props.model[modelName.value][index1]
|
|
1293
|
+
);
|
|
1283
1294
|
if (props.sortKey) {
|
|
1284
1295
|
for (let i = props.model[modelName.value].length - 1, v = 0; i >= 0; i--, v++) {
|
|
1285
1296
|
props.model[modelName.value][v][props.sortKey] = i;
|
|
@@ -1401,7 +1412,11 @@
|
|
|
1401
1412
|
Delete: iconsVue.Delete,
|
|
1402
1413
|
FullScreen: iconsVue.FullScreen,
|
|
1403
1414
|
Grid: iconsVue.Grid,
|
|
1404
|
-
data: vue.computed(
|
|
1415
|
+
data: vue.computed(
|
|
1416
|
+
() => props.model[modelName.value].filter(
|
|
1417
|
+
(item, index) => index >= pagecontext.value * pagesize.value && index + 1 <= (pagecontext.value + 1) * pagesize.value
|
|
1418
|
+
)
|
|
1419
|
+
),
|
|
1405
1420
|
addable: vue.computed(() => {
|
|
1406
1421
|
if (!props.model[modelName.value].length) {
|
|
1407
1422
|
return true;
|
|
@@ -1589,7 +1604,7 @@
|
|
|
1589
1604
|
const _hoisted_2$2 = { class: "el-form-item__content" };
|
|
1590
1605
|
const _hoisted_3$2 = ["innerHTML"];
|
|
1591
1606
|
const _hoisted_4$1 = /* @__PURE__ */ vue.createTextVNode("\u6DFB\u52A0");
|
|
1592
|
-
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode(" \xA0 ");
|
|
1607
|
+
const _hoisted_5$1 = /* @__PURE__ */ vue.createTextVNode(" \xA0 ");
|
|
1593
1608
|
const _hoisted_6 = /* @__PURE__ */ vue.createTextVNode("\u5C55\u5F00\u914D\u7F6E");
|
|
1594
1609
|
const _hoisted_7 = /* @__PURE__ */ vue.createTextVNode("\u5BFC\u5165EXCEL");
|
|
1595
1610
|
const _hoisted_8 = /* @__PURE__ */ vue.createTextVNode("\xA0 ");
|
|
@@ -1772,7 +1787,7 @@
|
|
|
1772
1787
|
]),
|
|
1773
1788
|
_: 1
|
|
1774
1789
|
})) : vue.createCommentVNode("", true),
|
|
1775
|
-
_hoisted_5,
|
|
1790
|
+
_hoisted_5$1,
|
|
1776
1791
|
_ctx.enableToggleMode && !_ctx.isFullscreen ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
1777
1792
|
key: 1,
|
|
1778
1793
|
icon: _ctx.Grid,
|
|
@@ -2046,15 +2061,19 @@
|
|
|
2046
2061
|
return;
|
|
2047
2062
|
const mForm = vue.inject("mForm");
|
|
2048
2063
|
const instance = vue.getCurrentInstance();
|
|
2049
|
-
vue.watch(
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2064
|
+
vue.watch(
|
|
2065
|
+
() => instance?.proxy,
|
|
2066
|
+
(vm) => {
|
|
2067
|
+
if (vm) {
|
|
2068
|
+
mForm?.setField(prop, vm);
|
|
2069
|
+
} else {
|
|
2070
|
+
mForm?.deleteField(prop);
|
|
2071
|
+
}
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
immediate: true
|
|
2054
2075
|
}
|
|
2055
|
-
|
|
2056
|
-
immediate: true
|
|
2057
|
-
});
|
|
2076
|
+
);
|
|
2058
2077
|
};
|
|
2059
2078
|
|
|
2060
2079
|
const _sfc_main$l = vue.defineComponent({
|
|
@@ -2106,7 +2125,9 @@
|
|
|
2106
2125
|
}
|
|
2107
2126
|
};
|
|
2108
2127
|
if (typeof props.config.options === "function" && props.model && mForm) {
|
|
2109
|
-
vue.watchEffect(
|
|
2128
|
+
vue.watchEffect(
|
|
2129
|
+
() => options.value = props.config.options(vm, { model: props.model, formValues: mForm.values })
|
|
2130
|
+
);
|
|
2110
2131
|
} else if (!props.config.options || !props.config.options.length || props.config.remote) {
|
|
2111
2132
|
Promise.resolve(setRemoteOptions());
|
|
2112
2133
|
}
|
|
@@ -2370,26 +2391,34 @@
|
|
|
2370
2391
|
const value = vue.ref([]);
|
|
2371
2392
|
if (props.model !== void 0) {
|
|
2372
2393
|
if (names?.length) {
|
|
2373
|
-
vue.watch(
|
|
2374
|
-
|
|
2375
|
-
|
|
2394
|
+
vue.watch(
|
|
2395
|
+
[() => props.model[names[0]], () => props.model[names[1]]],
|
|
2396
|
+
([start, end], [preStart, preEnd]) => {
|
|
2397
|
+
if (!value.value) {
|
|
2398
|
+
value.value = [];
|
|
2399
|
+
}
|
|
2400
|
+
if (!start || !end)
|
|
2401
|
+
value.value = [];
|
|
2402
|
+
if (start !== preStart)
|
|
2403
|
+
value.value[0] = new Date(start);
|
|
2404
|
+
if (end !== preEnd)
|
|
2405
|
+
value.value[1] = new Date(end);
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
immediate: true
|
|
2376
2409
|
}
|
|
2377
|
-
|
|
2378
|
-
value.value = [];
|
|
2379
|
-
if (start !== preStart)
|
|
2380
|
-
value.value[0] = new Date(start);
|
|
2381
|
-
if (end !== preEnd)
|
|
2382
|
-
value.value[1] = new Date(end);
|
|
2383
|
-
}, {
|
|
2384
|
-
immediate: true
|
|
2385
|
-
});
|
|
2410
|
+
);
|
|
2386
2411
|
} else if (props.name && props.model[props.name]) {
|
|
2387
|
-
vue.watch(
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2412
|
+
vue.watch(
|
|
2413
|
+
() => props.model[props.name],
|
|
2414
|
+
(start, preStart) => {
|
|
2415
|
+
if (start !== preStart)
|
|
2416
|
+
value.value = start.map((item) => item ? new Date(item) : void 0);
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
immediate: true
|
|
2420
|
+
}
|
|
2421
|
+
);
|
|
2393
2422
|
}
|
|
2394
2423
|
}
|
|
2395
2424
|
const setValue = (v) => {
|
|
@@ -2407,11 +2436,14 @@
|
|
|
2407
2436
|
const changeHandler = (v) => {
|
|
2408
2437
|
const value2 = v || [];
|
|
2409
2438
|
if (props.name) {
|
|
2410
|
-
emit(
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2439
|
+
emit(
|
|
2440
|
+
"change",
|
|
2441
|
+
value2.map((item) => {
|
|
2442
|
+
if (item)
|
|
2443
|
+
return utils.datetimeFormatter(item, "");
|
|
2444
|
+
return void 0;
|
|
2445
|
+
})
|
|
2446
|
+
);
|
|
2415
2447
|
} else {
|
|
2416
2448
|
if (names?.length) {
|
|
2417
2449
|
setValue(value2);
|
|
@@ -2545,13 +2577,17 @@
|
|
|
2545
2577
|
fieldLabelMap.value[v.name] = v.label || "";
|
|
2546
2578
|
});
|
|
2547
2579
|
};
|
|
2548
|
-
const unwatch = vue.watch(
|
|
2549
|
-
|
|
2550
|
-
|
|
2580
|
+
const unwatch = vue.watch(
|
|
2581
|
+
() => props.model?.[props.config.dynamicKey],
|
|
2582
|
+
(val) => {
|
|
2583
|
+
if (val !== "") {
|
|
2584
|
+
changeFieldMap();
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
immediate: true
|
|
2551
2589
|
}
|
|
2552
|
-
|
|
2553
|
-
immediate: true
|
|
2554
|
-
});
|
|
2590
|
+
);
|
|
2555
2591
|
vue.onBeforeUnmount(() => {
|
|
2556
2592
|
if (typeof unwatch === "function") {
|
|
2557
2593
|
unwatch();
|
|
@@ -3016,12 +3052,18 @@
|
|
|
3016
3052
|
remote.value = false;
|
|
3017
3053
|
if (config.group) {
|
|
3018
3054
|
if (config.multiple && value.findIndex) {
|
|
3019
|
-
return localOptions.value.filter(
|
|
3055
|
+
return localOptions.value.filter(
|
|
3056
|
+
(group) => group.options.findIndex((item) => value.find((v) => equalValue(item.value, v)) > -1) > -1
|
|
3057
|
+
);
|
|
3020
3058
|
}
|
|
3021
|
-
return localOptions.value.filter(
|
|
3059
|
+
return localOptions.value.filter(
|
|
3060
|
+
(group) => group.options.findIndex((item) => equalValue(item.value, value)) > -1
|
|
3061
|
+
);
|
|
3022
3062
|
}
|
|
3023
3063
|
if (config.multiple && value.findIndex) {
|
|
3024
|
-
return localOptions.value.filter(
|
|
3064
|
+
return localOptions.value.filter(
|
|
3065
|
+
(item) => value.findIndex((v) => equalValue(item.value, v)) > -1
|
|
3066
|
+
);
|
|
3025
3067
|
}
|
|
3026
3068
|
return localOptions.value.filter((item) => equalValue(item.value, value));
|
|
3027
3069
|
};
|
|
@@ -3067,24 +3109,34 @@
|
|
|
3067
3109
|
return options2;
|
|
3068
3110
|
};
|
|
3069
3111
|
if (typeof props.config.options === "function") {
|
|
3070
|
-
vue.watch(
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3112
|
+
vue.watch(
|
|
3113
|
+
() => mForm?.values,
|
|
3114
|
+
() => {
|
|
3115
|
+
typeof props.config.options === "function" && Promise.resolve(
|
|
3116
|
+
props.config.options(mForm, {
|
|
3117
|
+
model: props.model,
|
|
3118
|
+
prop: props.prop,
|
|
3119
|
+
formValues: mForm?.values,
|
|
3120
|
+
formValue: mForm?.values,
|
|
3121
|
+
config: props.config
|
|
3122
|
+
})
|
|
3123
|
+
).then((data) => {
|
|
3124
|
+
options.value = data;
|
|
3125
|
+
});
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
deep: true,
|
|
3129
|
+
immediate: true
|
|
3130
|
+
}
|
|
3131
|
+
);
|
|
3084
3132
|
} else if (Array.isArray(props.config.options)) {
|
|
3085
|
-
vue.watch(
|
|
3086
|
-
|
|
3087
|
-
|
|
3133
|
+
vue.watch(
|
|
3134
|
+
() => props.config.options,
|
|
3135
|
+
() => {
|
|
3136
|
+
options.value = props.config.options;
|
|
3137
|
+
},
|
|
3138
|
+
{ immediate: true }
|
|
3139
|
+
);
|
|
3088
3140
|
} else if (props.config.option) {
|
|
3089
3141
|
vue.onBeforeMount(() => {
|
|
3090
3142
|
if (!props.model)
|
|
@@ -3551,18 +3603,22 @@
|
|
|
3551
3603
|
}
|
|
3552
3604
|
});
|
|
3553
3605
|
vue.provide("mForm", formState);
|
|
3554
|
-
vue.watch(
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3606
|
+
vue.watch(
|
|
3607
|
+
[() => props.config, () => props.initValues],
|
|
3608
|
+
([config], [preConfig]) => {
|
|
3609
|
+
if (!lodashEs.isEqual(vue.toRaw(config), vue.toRaw(preConfig))) {
|
|
3610
|
+
initialized.value = false;
|
|
3611
|
+
}
|
|
3612
|
+
initValue(formState, {
|
|
3613
|
+
initValues: props.initValues,
|
|
3614
|
+
config: props.config
|
|
3615
|
+
}).then((value) => {
|
|
3616
|
+
values.value = value;
|
|
3617
|
+
initialized.value = true;
|
|
3618
|
+
});
|
|
3619
|
+
},
|
|
3620
|
+
{ immediate: true }
|
|
3621
|
+
);
|
|
3566
3622
|
return {
|
|
3567
3623
|
initialized,
|
|
3568
3624
|
values,
|
|
@@ -3633,6 +3689,9 @@
|
|
|
3633
3689
|
type: Object,
|
|
3634
3690
|
default: () => ({})
|
|
3635
3691
|
},
|
|
3692
|
+
parentValues: {
|
|
3693
|
+
type: Object
|
|
3694
|
+
},
|
|
3636
3695
|
width: [Number, String],
|
|
3637
3696
|
fullscreen: Boolean,
|
|
3638
3697
|
title: String,
|
|
@@ -3715,116 +3774,120 @@
|
|
|
3715
3774
|
}
|
|
3716
3775
|
});
|
|
3717
3776
|
|
|
3718
|
-
const _hoisted_1 = {
|
|
3719
|
-
const _hoisted_2 =
|
|
3720
|
-
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\
|
|
3721
|
-
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\
|
|
3777
|
+
const _hoisted_1 = { class: "m-form-dialog" };
|
|
3778
|
+
const _hoisted_2 = { style: { "min-height": "1px" } };
|
|
3779
|
+
const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
|
|
3780
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\u4E0A\u4E00\u6B65");
|
|
3781
|
+
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u4E0B\u4E00\u6B65");
|
|
3722
3782
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
3723
3783
|
const _component_m_form = vue.resolveComponent("m-form");
|
|
3724
3784
|
const _component_el_col = vue.resolveComponent("el-col");
|
|
3725
3785
|
const _component_el_button = vue.resolveComponent("el-button");
|
|
3726
3786
|
const _component_el_row = vue.resolveComponent("el-row");
|
|
3727
3787
|
const _component_el_dialog = vue.resolveComponent("el-dialog");
|
|
3728
|
-
return vue.openBlock(), vue.
|
|
3729
|
-
vue.
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
])
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
])
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3788
|
+
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
3789
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_1, [
|
|
3790
|
+
vue.createVNode(_component_el_dialog, {
|
|
3791
|
+
modelValue: _ctx.dialogVisible,
|
|
3792
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.dialogVisible = $event),
|
|
3793
|
+
top: "20px",
|
|
3794
|
+
title: _ctx.title,
|
|
3795
|
+
width: _ctx.width,
|
|
3796
|
+
fullscreen: _ctx.fullscreen,
|
|
3797
|
+
"close-on-click-modal": false,
|
|
3798
|
+
onClose: _ctx.closeHandler
|
|
3799
|
+
}, {
|
|
3800
|
+
footer: vue.withCtx(() => [
|
|
3801
|
+
vue.createVNode(_component_el_row, { class: "dialog-footer" }, {
|
|
3802
|
+
default: vue.withCtx(() => [
|
|
3803
|
+
vue.createVNode(_component_el_col, {
|
|
3804
|
+
span: 12,
|
|
3805
|
+
style: { "text-align": "left" }
|
|
3806
|
+
}, {
|
|
3807
|
+
default: vue.withCtx(() => [
|
|
3808
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
3809
|
+
vue.renderSlot(_ctx.$slots, "left")
|
|
3810
|
+
])
|
|
3811
|
+
]),
|
|
3812
|
+
_: 3
|
|
3813
|
+
}),
|
|
3814
|
+
vue.createVNode(_component_el_col, { span: 12 }, {
|
|
3815
|
+
default: vue.withCtx(() => [
|
|
3816
|
+
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
3817
|
+
vue.createVNode(_component_el_button, {
|
|
3818
|
+
onClick: _ctx.cancel,
|
|
3819
|
+
size: "small"
|
|
3820
|
+
}, {
|
|
3821
|
+
default: vue.withCtx(() => [
|
|
3822
|
+
_hoisted_3
|
|
3823
|
+
]),
|
|
3824
|
+
_: 1
|
|
3825
|
+
}, 8, ["onClick"]),
|
|
3826
|
+
_ctx.hasStep && _ctx.stepActive > 1 ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3827
|
+
key: 0,
|
|
3828
|
+
type: "info",
|
|
3829
|
+
size: "small",
|
|
3830
|
+
onClick: _ctx.preStep
|
|
3831
|
+
}, {
|
|
3832
|
+
default: vue.withCtx(() => [
|
|
3833
|
+
_hoisted_4
|
|
3834
|
+
]),
|
|
3835
|
+
_: 1
|
|
3836
|
+
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
3837
|
+
_ctx.hasStep && _ctx.stepCount > _ctx.stepActive ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3838
|
+
key: 1,
|
|
3839
|
+
type: "info",
|
|
3840
|
+
size: "small",
|
|
3841
|
+
onClick: _ctx.nextStep
|
|
3842
|
+
}, {
|
|
3843
|
+
default: vue.withCtx(() => [
|
|
3844
|
+
_hoisted_5
|
|
3845
|
+
]),
|
|
3846
|
+
_: 1
|
|
3847
|
+
}, 8, ["onClick"])) : (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
3848
|
+
key: 2,
|
|
3849
|
+
type: "primary",
|
|
3850
|
+
size: "small",
|
|
3851
|
+
loading: _ctx.saveFetch,
|
|
3852
|
+
onClick: _ctx.save
|
|
3853
|
+
}, {
|
|
3854
|
+
default: vue.withCtx(() => [
|
|
3855
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.confirmText), 1)
|
|
3856
|
+
]),
|
|
3857
|
+
_: 1
|
|
3858
|
+
}, 8, ["loading", "onClick"]))
|
|
3859
|
+
])
|
|
3860
|
+
]),
|
|
3861
|
+
_: 3
|
|
3862
|
+
})
|
|
3863
|
+
]),
|
|
3864
|
+
_: 3
|
|
3865
|
+
})
|
|
3866
|
+
]),
|
|
3867
|
+
default: vue.withCtx(() => [
|
|
3868
|
+
vue.createElementVNode("div", {
|
|
3869
|
+
class: "m-dialog-body",
|
|
3870
|
+
style: vue.normalizeStyle(`max-height: ${_ctx.bodyHeight}; overflow-y: auto; overflow-x: hidden;`)
|
|
3871
|
+
}, [
|
|
3872
|
+
vue.createVNode(_component_m_form, {
|
|
3873
|
+
modelValue: _ctx.stepActive,
|
|
3874
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.stepActive = $event),
|
|
3875
|
+
ref: "form",
|
|
3876
|
+
size: _ctx.size,
|
|
3877
|
+
config: _ctx.config,
|
|
3878
|
+
"init-values": _ctx.values,
|
|
3879
|
+
"parent-values": _ctx.parentValues,
|
|
3880
|
+
"label-width": _ctx.labelWidth,
|
|
3881
|
+
onChange: _ctx.changeHandler
|
|
3882
|
+
}, null, 8, ["modelValue", "size", "config", "init-values", "parent-values", "label-width", "onChange"]),
|
|
3883
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
3884
|
+
], 4)
|
|
3885
|
+
]),
|
|
3886
|
+
_: 3
|
|
3887
|
+
}, 8, ["modelValue", "title", "width", "fullscreen", "onClose"])
|
|
3888
|
+
], 512), [
|
|
3889
|
+
[vue.vShow, _ctx.dialogVisible]
|
|
3890
|
+
])
|
|
3828
3891
|
]);
|
|
3829
3892
|
}
|
|
3830
3893
|
const FormDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|