@form-create/element-ui 3.3.0-alpha.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.esm.js +166 -166
- package/dist/form-create.js +1 -1
- package/dist/form-create.min.js +1 -1
- package/package.json +13 -13
- package/src/core/api.js +3 -2
package/dist/form-create.esm.js
CHANGED
|
@@ -19,14 +19,14 @@ var mt = (t, e, r) => e in t ? yr(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
19
19
|
_r.call(e, r) && mt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
}, H = (t, e) => br(t, $r(e));
|
|
22
|
-
import { defineComponent as
|
|
22
|
+
import { defineComponent as re, resolveComponent as F, createVNode as v, mergeProps as Y, toRef as T, ref as it, watch as L, computed as se, openBlock as z, createElementBlock as Z, createElementVNode as he, nextTick as I, createBlock as Be, withCtx as gt, Fragment as xe, renderList as yt, renderSlot as wr, markRaw as ce, reactive as Q, isVNode as Cr, getCurrentInstance as Qe, provide as Vr, inject as Sr, toRefs as bt, onBeforeMount as Or, watchEffect as Fr, onMounted as Er, onBeforeUnmount as Rr, onUpdated as kr, withDirectives as Dr, resolveDirective as Ar, createApp as jr, h as Ir } from "vue";
|
|
23
23
|
function st(t, e) {
|
|
24
24
|
return Object.keys(t).reduce((r, n) => ((!e || e.indexOf(n) === -1) && (r[n] = t[n]), r), {});
|
|
25
25
|
}
|
|
26
26
|
function x(t) {
|
|
27
27
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
28
28
|
}
|
|
29
|
-
const Pr = "fcCheckbox", Br = /* @__PURE__ */
|
|
29
|
+
const Pr = "fcCheckbox", Br = /* @__PURE__ */ re({
|
|
30
30
|
name: Pr,
|
|
31
31
|
inheritAttrs: !1,
|
|
32
32
|
props: {
|
|
@@ -83,7 +83,7 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ te({
|
|
|
83
83
|
value: o.value || void 0,
|
|
84
84
|
label: o.value || void 0
|
|
85
85
|
}, {
|
|
86
|
-
default: () => [v(
|
|
86
|
+
default: () => [v(F("ElInput"), {
|
|
87
87
|
size: "small",
|
|
88
88
|
modelValue: o.value,
|
|
89
89
|
"onUpdate:modelValue": l
|
|
@@ -93,8 +93,8 @@ const Pr = "fcCheckbox", Br = /* @__PURE__ */ te({
|
|
|
93
93
|
};
|
|
94
94
|
},
|
|
95
95
|
render() {
|
|
96
|
-
const t = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox", e =
|
|
97
|
-
return v(
|
|
96
|
+
const t = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox", e = F(t);
|
|
97
|
+
return v(F("ElCheckboxGroup"), Y(this.$attrs, {
|
|
98
98
|
modelValue: this.value === null ? void 0 : this.value,
|
|
99
99
|
"onUpdate:modelValue": this.onInput,
|
|
100
100
|
ref: "el"
|
|
@@ -155,7 +155,7 @@ const ge = (t, e) => {
|
|
|
155
155
|
xmlns: "http://www.w3.org/2000/svg"
|
|
156
156
|
};
|
|
157
157
|
function Mr(t, e, r, n, s, i) {
|
|
158
|
-
return z(),
|
|
158
|
+
return z(), Z("svg", Lr, [...e[0] || (e[0] = [
|
|
159
159
|
he("path", {
|
|
160
160
|
fill: "currentColor",
|
|
161
161
|
d: "M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"
|
|
@@ -174,7 +174,7 @@ const Nr = /* @__PURE__ */ ge(Tr, [["render", Mr]]), Ur = {
|
|
|
174
174
|
xmlns: "http://www.w3.org/2000/svg"
|
|
175
175
|
};
|
|
176
176
|
function Hr(t, e, r, n, s, i) {
|
|
177
|
-
return z(),
|
|
177
|
+
return z(), Z("svg", qr, [...e[0] || (e[0] = [
|
|
178
178
|
he("path", {
|
|
179
179
|
fill: "currentColor",
|
|
180
180
|
d: "M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"
|
|
@@ -189,7 +189,7 @@ const zr = /* @__PURE__ */ ge(Ur, [["render", Hr]]), xr = {
|
|
|
189
189
|
xmlns: "http://www.w3.org/2000/svg"
|
|
190
190
|
};
|
|
191
191
|
function Yr(t, e, r, n, s, i) {
|
|
192
|
-
return z(),
|
|
192
|
+
return z(), Z("svg", Gr, [...e[0] || (e[0] = [
|
|
193
193
|
he("path", {
|
|
194
194
|
fill: "currentColor",
|
|
195
195
|
d: "M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"
|
|
@@ -204,7 +204,7 @@ const Wr = /* @__PURE__ */ ge(xr, [["render", Yr]]), Jr = {
|
|
|
204
204
|
xmlns: "http://www.w3.org/2000/svg"
|
|
205
205
|
};
|
|
206
206
|
function Xr(t, e, r, n, s, i) {
|
|
207
|
-
return z(),
|
|
207
|
+
return z(), Z("svg", Kr, [...e[0] || (e[0] = [
|
|
208
208
|
he("path", {
|
|
209
209
|
fill: "currentColor",
|
|
210
210
|
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"
|
|
@@ -219,14 +219,14 @@ const Zr = /* @__PURE__ */ ge(Jr, [["render", Xr]]), Qr = {
|
|
|
219
219
|
xmlns: "http://www.w3.org/2000/svg"
|
|
220
220
|
};
|
|
221
221
|
function tn(t, e, r, n, s, i) {
|
|
222
|
-
return z(),
|
|
222
|
+
return z(), Z("svg", en, [...e[0] || (e[0] = [
|
|
223
223
|
he("path", {
|
|
224
224
|
fill: "currentColor",
|
|
225
225
|
d: "M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"
|
|
226
226
|
}, null, -1)
|
|
227
227
|
])]);
|
|
228
228
|
}
|
|
229
|
-
const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__PURE__ */
|
|
229
|
+
const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__PURE__ */ re({
|
|
230
230
|
name: nn,
|
|
231
231
|
props: {
|
|
232
232
|
type: {
|
|
@@ -373,18 +373,18 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
373
373
|
this.$emit("update:modelValue", e), this.$emit("change", e);
|
|
374
374
|
},
|
|
375
375
|
makeInput() {
|
|
376
|
-
return v(
|
|
376
|
+
return v(F("ElInput"), Y({
|
|
377
377
|
type: "text",
|
|
378
378
|
modelValue: this.fileList.map((t) => this.getSrc(t)).toString(),
|
|
379
379
|
readonly: !0
|
|
380
380
|
}, {
|
|
381
381
|
key: 1
|
|
382
382
|
}), {
|
|
383
|
-
append: () => v(
|
|
384
|
-
icon:
|
|
383
|
+
append: () => v(F("ElButton"), {
|
|
384
|
+
icon: F(this.icon),
|
|
385
385
|
onClick: () => this.showModel()
|
|
386
386
|
}, null),
|
|
387
|
-
suffix: () => this.fileList.length && !this.disabled ? v(
|
|
387
|
+
suffix: () => this.fileList.length && !this.disabled ? v(F("ElIcon"), {
|
|
388
388
|
class: "el-input__icon _fc-upload-icon",
|
|
389
389
|
onClick: () => {
|
|
390
390
|
this.fileList = [], this.input();
|
|
@@ -420,8 +420,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
makeHandleIcon(t, e) {
|
|
423
|
-
const r =
|
|
424
|
-
return v(
|
|
423
|
+
const r = F(this.handleIcon === !0 || this.handleIcon === void 0 ? "icon-view" : this.handleIcon);
|
|
424
|
+
return v(F("ElIcon"), {
|
|
425
425
|
onClick: () => this.handleClick(t),
|
|
426
426
|
key: "5" + e
|
|
427
427
|
}, {
|
|
@@ -429,7 +429,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
429
429
|
});
|
|
430
430
|
},
|
|
431
431
|
makeRemoveIcon(t, e) {
|
|
432
|
-
return v(
|
|
432
|
+
return v(F("ElIcon"), {
|
|
433
433
|
onClick: () => this.handleRemove(t),
|
|
434
434
|
key: "6" + e
|
|
435
435
|
}, {
|
|
@@ -437,7 +437,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
437
437
|
});
|
|
438
438
|
},
|
|
439
439
|
makeFiles() {
|
|
440
|
-
return this.makeGroup(this.fileList.map((t, e) => this.makeItem(e, [v(
|
|
440
|
+
return this.makeGroup(this.fileList.map((t, e) => this.makeItem(e, [v(F("ElIcon"), {
|
|
441
441
|
onClick: () => this.handleClick(t)
|
|
442
442
|
}, {
|
|
443
443
|
default: () => [v(zr, null, null)]
|
|
@@ -449,12 +449,12 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
449
449
|
}, null), this.makeIcons(t, e)])));
|
|
450
450
|
},
|
|
451
451
|
makeBtn() {
|
|
452
|
-
const t =
|
|
452
|
+
const t = F(this.icon);
|
|
453
453
|
return v("div", {
|
|
454
454
|
class: "_fc-upload-btn",
|
|
455
455
|
onClick: () => this.showModel(),
|
|
456
456
|
key: 7
|
|
457
|
-
}, [v(
|
|
457
|
+
}, [v(F("ElIcon"), null, {
|
|
458
458
|
default: () => [v(t, null, null)]
|
|
459
459
|
})]);
|
|
460
460
|
},
|
|
@@ -497,11 +497,11 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
497
497
|
footer: s
|
|
498
498
|
} = this.$props;
|
|
499
499
|
if (s)
|
|
500
|
-
return v("div", null, [r ? v(
|
|
500
|
+
return v("div", null, [r ? v(F("ElButton"), {
|
|
501
501
|
onClick: () => this.onCancel() !== !1 && (this.frameVisible = !1)
|
|
502
502
|
}, {
|
|
503
503
|
default: () => [e || this.formCreateInject.t("close") || "关闭"]
|
|
504
|
-
}) : null, n ? v(
|
|
504
|
+
}) : null, n ? v(F("ElButton"), {
|
|
505
505
|
type: "primary",
|
|
506
506
|
onClick: () => this.onOk() !== !1 && this.closeModel()
|
|
507
507
|
}, {
|
|
@@ -527,7 +527,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
527
527
|
"_fc-frame": !0,
|
|
528
528
|
"_fc-disabled": this.disabled
|
|
529
529
|
}
|
|
530
|
-
}, [e, v(
|
|
530
|
+
}, [e, v(F("ElDialog"), {
|
|
531
531
|
appendToBody: !0,
|
|
532
532
|
modal: this.previewMask,
|
|
533
533
|
title: o,
|
|
@@ -538,7 +538,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
538
538
|
style: "width: 100%",
|
|
539
539
|
src: this.previewImage
|
|
540
540
|
}, null)]
|
|
541
|
-
}), v(
|
|
541
|
+
}), v(F("ElDialog"), Y({
|
|
542
542
|
appendToBody: !0
|
|
543
543
|
}, _({
|
|
544
544
|
width: r,
|
|
@@ -576,7 +576,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
576
576
|
} = this.formCreateInject;
|
|
577
577
|
t && r.off("fc:closeModal:" + t, this.close), e && r.off("fc:closeModal:" + e, this.close);
|
|
578
578
|
}
|
|
579
|
-
}), on = "fcRadio", an = /* @__PURE__ */
|
|
579
|
+
}), on = "fcRadio", an = /* @__PURE__ */ re({
|
|
580
580
|
name: on,
|
|
581
581
|
inheritAttrs: !1,
|
|
582
582
|
props: {
|
|
@@ -629,7 +629,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
629
629
|
value: o.value || void 0,
|
|
630
630
|
label: o.value || void 0
|
|
631
631
|
}, {
|
|
632
|
-
default: () => [v(
|
|
632
|
+
default: () => [v(F("ElInput"), {
|
|
633
633
|
size: "small",
|
|
634
634
|
modelValue: o.value,
|
|
635
635
|
"onUpdate:modelValue": f
|
|
@@ -639,8 +639,8 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
639
639
|
};
|
|
640
640
|
},
|
|
641
641
|
render() {
|
|
642
|
-
const t = this.type === "button" ? "ElRadioButton" : "ElRadio", e =
|
|
643
|
-
return v(
|
|
642
|
+
const t = this.type === "button" ? "ElRadioButton" : "ElRadio", e = F(t);
|
|
643
|
+
return v(F("ElRadioGroup"), Y(this.$attrs, {
|
|
644
644
|
modelValue: this.value,
|
|
645
645
|
"onUpdate:modelValue": this.onInput,
|
|
646
646
|
ref: "el"
|
|
@@ -696,7 +696,7 @@ const rn = /* @__PURE__ */ ge(Qr, [["render", tn]]), nn = "fcFrame", sn = /* @__
|
|
|
696
696
|
function D(t, e) {
|
|
697
697
|
return {}.hasOwnProperty.call(t, e);
|
|
698
698
|
}
|
|
699
|
-
const ln = "fcSelect", un =
|
|
699
|
+
const ln = "fcSelect", un = re({
|
|
700
700
|
name: ln,
|
|
701
701
|
inheritAttrs: !1,
|
|
702
702
|
props: {
|
|
@@ -725,20 +725,20 @@ const ln = "fcSelect", un = te({
|
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
727
|
function fn(t, e, r, n, s, i) {
|
|
728
|
-
const o =
|
|
728
|
+
const o = F("el-option"), a = F("el-option-group"), l = F("el-select");
|
|
729
729
|
return z(), Be(l, Y(t.$attrs, {
|
|
730
730
|
"model-value": t.value,
|
|
731
731
|
"onUpdate:modelValue": t.handleUpdate,
|
|
732
732
|
ref: "el"
|
|
733
733
|
}), {
|
|
734
734
|
default: gt(() => [
|
|
735
|
-
(z(!0),
|
|
735
|
+
(z(!0), Z(xe, null, yt(t.options, (u, f) => (z(), Z(xe, null, [
|
|
736
736
|
t.hasProperty(u, "options") ? (z(), Be(a, {
|
|
737
737
|
label: u.label,
|
|
738
738
|
key: `${f}-${u.label}`
|
|
739
739
|
}, {
|
|
740
740
|
default: gt(() => [
|
|
741
|
-
(z(!0),
|
|
741
|
+
(z(!0), Z(xe, null, yt(t.is.trueArray(u.options) ? u.options : [], (d, h) => (z(), Be(o, Y({
|
|
742
742
|
key: `${h}-${d.value}`
|
|
743
743
|
}, { ref_for: !0 }, d), null, 16))), 128))
|
|
744
744
|
]),
|
|
@@ -752,7 +752,7 @@ function fn(t, e, r, n, s, i) {
|
|
|
752
752
|
_: 3
|
|
753
753
|
}, 16, ["model-value", "onUpdate:modelValue"]);
|
|
754
754
|
}
|
|
755
|
-
const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__PURE__ */
|
|
755
|
+
const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__PURE__ */ re({
|
|
756
756
|
name: dn,
|
|
757
757
|
inheritAttrs: !1,
|
|
758
758
|
formCreateParser: {
|
|
@@ -788,7 +788,7 @@ const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__P
|
|
|
788
788
|
}
|
|
789
789
|
},
|
|
790
790
|
render() {
|
|
791
|
-
return v(
|
|
791
|
+
return v(F("ElTree"), Y(this.$attrs, {
|
|
792
792
|
ref: "tree",
|
|
793
793
|
onCheck: this.updateValue,
|
|
794
794
|
onNodeClick: this.updateValue
|
|
@@ -805,7 +805,7 @@ const cn = /* @__PURE__ */ ge(un, [["render", fn]]), dn = "fcTree", hn = /* @__P
|
|
|
805
805
|
xmlns: "http://www.w3.org/2000/svg"
|
|
806
806
|
};
|
|
807
807
|
function gn(t, e, r, n, s, i) {
|
|
808
|
-
return z(),
|
|
808
|
+
return z(), Z("svg", mn, [...e[0] || (e[0] = [
|
|
809
809
|
he("path", {
|
|
810
810
|
fill: "currentColor",
|
|
811
811
|
d: "M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"
|
|
@@ -830,7 +830,7 @@ function vt(t) {
|
|
|
830
830
|
function bn(t) {
|
|
831
831
|
return ("" + t).split("/").pop();
|
|
832
832
|
}
|
|
833
|
-
const $n = "fcUpload", vn = /* @__PURE__ */
|
|
833
|
+
const $n = "fcUpload", vn = /* @__PURE__ */ re({
|
|
834
834
|
name: $n,
|
|
835
835
|
inheritAttrs: !1,
|
|
836
836
|
formCreateParser: {
|
|
@@ -894,7 +894,7 @@ const $n = "fcUpload", vn = /* @__PURE__ */ te({
|
|
|
894
894
|
const t = x(this.modelValue).length;
|
|
895
895
|
return v("div", {
|
|
896
896
|
class: "_fc-upload"
|
|
897
|
-
}, [v(
|
|
897
|
+
}, [v(F("ElUpload"), Y({
|
|
898
898
|
key: t
|
|
899
899
|
}, this.$attrs, {
|
|
900
900
|
listType: this.listType || "picture-card",
|
|
@@ -910,15 +910,15 @@ const $n = "fcUpload", vn = /* @__PURE__ */ te({
|
|
|
910
910
|
}), _({
|
|
911
911
|
default: () => {
|
|
912
912
|
var e, r;
|
|
913
|
-
return [((r = (e = this.$slots).default) == null ? void 0 : r.call(e)) || (["text", "picture"].indexOf(this.listType) === -1 ? v(
|
|
913
|
+
return [((r = (e = this.$slots).default) == null ? void 0 : r.call(e)) || (["text", "picture"].indexOf(this.listType) === -1 ? v(F("ElIcon"), null, {
|
|
914
914
|
default: () => [v(yn, null, null)]
|
|
915
|
-
}) : v(
|
|
915
|
+
}) : v(F("ElButton"), {
|
|
916
916
|
type: "primary"
|
|
917
917
|
}, {
|
|
918
918
|
default: () => [this.formCreateInject.t("clickToUpload") || this.uploadText || "点击上传"]
|
|
919
919
|
}))];
|
|
920
920
|
}
|
|
921
|
-
}, st(this.$slots, ["default"]))), v(
|
|
921
|
+
}, st(this.$slots, ["default"]))), v(F("ElDialog"), {
|
|
922
922
|
appendToBody: !0,
|
|
923
923
|
modal: this.previewMask,
|
|
924
924
|
title: this.modalTitle,
|
|
@@ -965,7 +965,7 @@ function ke(t, e = {}, r) {
|
|
|
965
965
|
}
|
|
966
966
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function ee(t) {
|
|
969
969
|
return ke({}, { value: t }).value;
|
|
970
970
|
}
|
|
971
971
|
const _n = Object.assign || function(t) {
|
|
@@ -1027,7 +1027,7 @@ function Re(t, e) {
|
|
|
1027
1027
|
function Ge(t) {
|
|
1028
1028
|
return new Function("return " + t)();
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function te(t, e) {
|
|
1031
1031
|
if (t && m.String(t) && t.length > 4) {
|
|
1032
1032
|
let r = t.trim(), n = !1;
|
|
1033
1033
|
try {
|
|
@@ -1070,7 +1070,7 @@ err: ${s}`);
|
|
|
1070
1070
|
}
|
|
1071
1071
|
function Ut(t, e) {
|
|
1072
1072
|
return JSON.parse(t, function(r, n) {
|
|
1073
|
-
return m.Undef(n) || !n.indexOf ? n :
|
|
1073
|
+
return m.Undef(n) || !n.indexOf ? n : te(n, e);
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
let Vn = 0;
|
|
@@ -1084,7 +1084,7 @@ function pe(t, e, r) {
|
|
|
1084
1084
|
s && ((!n[s] || typeof n[s] != "object") && (n[s] = {}), n = n[s]), s = i;
|
|
1085
1085
|
}), n[s] = r, n;
|
|
1086
1086
|
}
|
|
1087
|
-
const Sn = "fcGroup",
|
|
1087
|
+
const Sn = "fcGroup", On = /* @__PURE__ */ re({
|
|
1088
1088
|
name: Sn,
|
|
1089
1089
|
props: {
|
|
1090
1090
|
field: String,
|
|
@@ -1166,7 +1166,7 @@ const Sn = "fcGroup", Fn = /* @__PURE__ */ te({
|
|
|
1166
1166
|
const i = n.$f.formData();
|
|
1167
1167
|
n.$f.once("reloading", () => {
|
|
1168
1168
|
n.$f.setValue(i);
|
|
1169
|
-
}), n.rule =
|
|
1169
|
+
}), n.rule = ee(t);
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
1172
|
});
|
|
@@ -1231,7 +1231,7 @@ const Sn = "fcGroup", Fn = /* @__PURE__ */ te({
|
|
|
1231
1231
|
};
|
|
1232
1232
|
if (this.defaultValue) {
|
|
1233
1233
|
n.formData || (n.formData = {});
|
|
1234
|
-
const s =
|
|
1234
|
+
const s = ee(this.defaultValue);
|
|
1235
1235
|
w(n.formData, this.field ? {
|
|
1236
1236
|
[this.field]: s
|
|
1237
1237
|
} : s);
|
|
@@ -1258,7 +1258,7 @@ const Sn = "fcGroup", Fn = /* @__PURE__ */ te({
|
|
|
1258
1258
|
if (this.disabled || this.onBeforeAdd(this.modelValue) === !1)
|
|
1259
1259
|
return;
|
|
1260
1260
|
const e = [...this.modelValue];
|
|
1261
|
-
e.push(this.defaultValue ?
|
|
1261
|
+
e.push(this.defaultValue ? ee(this.defaultValue) : this.field ? null : {}), this.input(e);
|
|
1262
1262
|
},
|
|
1263
1263
|
del(t, e) {
|
|
1264
1264
|
if (this.disabled)
|
|
@@ -1410,13 +1410,13 @@ const Sn = "fcGroup", Fn = /* @__PURE__ */ te({
|
|
|
1410
1410
|
class: "_fc-group " + (n ? "_fc-group-disabled" : "") + (s ? " _fc-group-card" : "")
|
|
1411
1411
|
}, [i]);
|
|
1412
1412
|
}
|
|
1413
|
-
}),
|
|
1414
|
-
name:
|
|
1413
|
+
}), Fn = "fcSubForm", En = /* @__PURE__ */ re({
|
|
1414
|
+
name: Fn,
|
|
1415
1415
|
props: {
|
|
1416
1416
|
rule: Array,
|
|
1417
1417
|
options: {
|
|
1418
1418
|
type: Object,
|
|
1419
|
-
default: () =>
|
|
1419
|
+
default: () => Q({
|
|
1420
1420
|
submitBtn: !1,
|
|
1421
1421
|
resetBtn: !1
|
|
1422
1422
|
})
|
|
@@ -1482,7 +1482,7 @@ const Sn = "fcGroup", Fn = /* @__PURE__ */ te({
|
|
|
1482
1482
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1483
1483
|
};
|
|
1484
1484
|
function Dn(t, e, r, n, s, i) {
|
|
1485
|
-
return z(),
|
|
1485
|
+
return z(), Z("svg", kn, [...e[0] || (e[0] = [
|
|
1486
1486
|
he("path", {
|
|
1487
1487
|
fill: "currentColor",
|
|
1488
1488
|
d: "M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"
|
|
@@ -1496,7 +1496,7 @@ const An = /* @__PURE__ */ ge(Rn, [["render", Dn]]), jn = [
|
|
|
1496
1496
|
cn,
|
|
1497
1497
|
hn,
|
|
1498
1498
|
vn,
|
|
1499
|
-
|
|
1499
|
+
On,
|
|
1500
1500
|
En,
|
|
1501
1501
|
An
|
|
1502
1502
|
], qt = ["props"], Ht = ["class", "style", "directives"], zt = ["on", "hook"], oe = (t, e = {}, r = {}) => {
|
|
@@ -1575,7 +1575,7 @@ function Kt(t, e) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
}, r), {}));
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function X(t) {
|
|
1579
1579
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1580
1580
|
}
|
|
1581
1581
|
function S(t, e) {
|
|
@@ -1708,7 +1708,7 @@ const Me = (t, e) => {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
};
|
|
1710
1710
|
function Tn(t, e, r) {
|
|
1711
|
-
return
|
|
1711
|
+
return re({
|
|
1712
1712
|
name: "FormCreate" + (t.isMobile ? "Mobile" : ""),
|
|
1713
1713
|
components: e,
|
|
1714
1714
|
directives: r,
|
|
@@ -1758,7 +1758,7 @@ function Tn(t, e, r) {
|
|
|
1758
1758
|
o = o.setupState.parent;
|
|
1759
1759
|
else
|
|
1760
1760
|
o = s;
|
|
1761
|
-
const { rule: a, modelValue: l, subForm: u, inFor: f } = bt(n), d =
|
|
1761
|
+
const { rule: a, modelValue: l, subForm: u, inFor: f } = bt(n), d = Q({
|
|
1762
1762
|
ctxInject: {},
|
|
1763
1763
|
destroyed: !1,
|
|
1764
1764
|
isShow: !0,
|
|
@@ -1773,7 +1773,7 @@ function Tn(t, e, r) {
|
|
|
1773
1773
|
$ ? (A = x(E.getSubForm()), A.push(p)) : A = p, E.subForm(A);
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
},
|
|
1776
|
+
}, O = () => {
|
|
1777
1777
|
const E = Me(s, i);
|
|
1778
1778
|
if (E)
|
|
1779
1779
|
if ($) {
|
|
@@ -1783,8 +1783,8 @@ function Tn(t, e, r) {
|
|
|
1783
1783
|
E.subForm();
|
|
1784
1784
|
};
|
|
1785
1785
|
let P = null;
|
|
1786
|
-
|
|
1787
|
-
|
|
1786
|
+
Or(() => {
|
|
1787
|
+
Fr(() => {
|
|
1788
1788
|
let E = "";
|
|
1789
1789
|
const A = n.option && n.option.globalClass || {};
|
|
1790
1790
|
Object.keys(A).forEach((q) => {
|
|
@@ -1807,7 +1807,7 @@ function Tn(t, e, r) {
|
|
|
1807
1807
|
return Er(() => {
|
|
1808
1808
|
i && (p.top.bus.$on("$loadData.$form", U), p.top.bus.$on("change", De)), p !== p.scope && p.scope.bus.$on("$loadData.$scopeForm", M), h.mounted();
|
|
1809
1809
|
}), Rr(() => {
|
|
1810
|
-
i && (p.top.bus.$off("$loadData.$form", U), p.top.bus.$off("change", De)), p !== p.scope && p.scope.bus.$off("$loadData.$scopeForm", M),
|
|
1810
|
+
i && (p.top.bus.$off("$loadData.$form", U), p.top.bus.$off("change", De)), p !== p.scope && p.scope.bus.$off("$loadData.$scopeForm", M), O(), d.destroyed = !0, h.unmount(), P && (P.parentNode || P.parentElement) && document.head.removeChild(P);
|
|
1811
1811
|
}), kr(() => {
|
|
1812
1812
|
h.updated();
|
|
1813
1813
|
}), C(), L(() => n.option, () => {
|
|
@@ -1947,12 +1947,12 @@ function er(t) {
|
|
|
1947
1947
|
s[i] != null && e.setRequestHeader(i, s[i]);
|
|
1948
1948
|
}), e.send(n);
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1950
|
+
function Ot(t, e, r) {
|
|
1951
1951
|
return new Promise((n, s) => {
|
|
1952
1952
|
(e || er)(H(_({}, t), {
|
|
1953
1953
|
onSuccess(i) {
|
|
1954
1954
|
let o = (l) => l;
|
|
1955
|
-
const a =
|
|
1955
|
+
const a = te(t.parse);
|
|
1956
1956
|
m.Function(a) ? o = a : a && m.String(a) && (o = (l) => N(l, a)), Ne(o(i, t.targetRule, r)).then((l) => {
|
|
1957
1957
|
n(l);
|
|
1958
1958
|
});
|
|
@@ -1964,7 +1964,7 @@ function Ft(t, e, r) {
|
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
1966
|
function Se(t) {
|
|
1967
|
-
return
|
|
1967
|
+
return ee(t);
|
|
1968
1968
|
}
|
|
1969
1969
|
function qn(t) {
|
|
1970
1970
|
function e(i) {
|
|
@@ -2094,7 +2094,7 @@ function qn(t) {
|
|
|
2094
2094
|
}, !0), o ? o.origin : void 0;
|
|
2095
2095
|
},
|
|
2096
2096
|
removeRule(i) {
|
|
2097
|
-
const o = i &&
|
|
2097
|
+
const o = i && X(i);
|
|
2098
2098
|
if (o)
|
|
2099
2099
|
return o.rm(), o.origin;
|
|
2100
2100
|
},
|
|
@@ -2180,7 +2180,7 @@ function qn(t) {
|
|
|
2180
2180
|
i.forEach((a) => s.sync(a));
|
|
2181
2181
|
return;
|
|
2182
2182
|
}
|
|
2183
|
-
let o = m.Object(i) ?
|
|
2183
|
+
let o = m.Object(i) ? X(i) : t.getCtxs(i);
|
|
2184
2184
|
o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
|
|
2185
2185
|
if (!a.deleted) {
|
|
2186
2186
|
const l = t.subForm[a.id];
|
|
@@ -2336,7 +2336,7 @@ function qn(t) {
|
|
|
2336
2336
|
return o ? t.subForm[o.id] : void 0;
|
|
2337
2337
|
},
|
|
2338
2338
|
getChildrenRuleList(i) {
|
|
2339
|
-
const o = typeof i == "object", a = o ?
|
|
2339
|
+
const o = typeof i == "object", a = o ? X(i) : t.getCtx(i), l = a ? a.rule : o ? i : s.getRule(i);
|
|
2340
2340
|
if (!l)
|
|
2341
2341
|
return [];
|
|
2342
2342
|
const u = [];
|
|
@@ -2347,10 +2347,10 @@ function qn(t) {
|
|
|
2347
2347
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2348
2348
|
},
|
|
2349
2349
|
getParentRule(i) {
|
|
2350
|
-
return (typeof i == "object" ?
|
|
2350
|
+
return (typeof i == "object" ? X(i) : t.getCtx(i)).parent.rule;
|
|
2351
2351
|
},
|
|
2352
2352
|
getParentSubRule(i) {
|
|
2353
|
-
const a = typeof i == "object" ?
|
|
2353
|
+
const a = typeof i == "object" ? X(i) : t.getCtx(i);
|
|
2354
2354
|
if (a) {
|
|
2355
2355
|
const l = a.getParentGroup();
|
|
2356
2356
|
if (l)
|
|
@@ -2371,7 +2371,7 @@ function qn(t) {
|
|
|
2371
2371
|
getGlobalEvent(i) {
|
|
2372
2372
|
let o = s.options.globalEvent[i];
|
|
2373
2373
|
if (o)
|
|
2374
|
-
return typeof o == "object" && (o = o.handle),
|
|
2374
|
+
return typeof o == "object" && (o = o.handle), te(o);
|
|
2375
2375
|
},
|
|
2376
2376
|
getGlobalData(i) {
|
|
2377
2377
|
return new Promise((o, a) => {
|
|
@@ -2395,11 +2395,11 @@ function qn(t) {
|
|
|
2395
2395
|
s.setData("$var." + i, o);
|
|
2396
2396
|
},
|
|
2397
2397
|
renderRule(i, o, a) {
|
|
2398
|
-
const u = typeof i == "object" ?
|
|
2398
|
+
const u = typeof i == "object" ? X(i) : t.getCtx(i);
|
|
2399
2399
|
return u ? t.$render.createRuleVnode(u, o, a) : void 0;
|
|
2400
2400
|
},
|
|
2401
2401
|
renderChildren(i, o, a) {
|
|
2402
|
-
const u = typeof i == "object" ?
|
|
2402
|
+
const u = typeof i == "object" ? X(i) : t.getCtx(i);
|
|
2403
2403
|
return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
|
|
2404
2404
|
},
|
|
2405
2405
|
nextTick(i) {
|
|
@@ -2426,7 +2426,7 @@ function qn(t) {
|
|
|
2426
2426
|
const u = (f) => {
|
|
2427
2427
|
S(() => l.onError && l.onError(f)), a(f);
|
|
2428
2428
|
};
|
|
2429
|
-
t.beforeFetch(l).then(() =>
|
|
2429
|
+
t.beforeFetch(l).then(() => Ot(l, t.fc.create.fetch, s).then((f) => {
|
|
2430
2430
|
S(() => l.onSuccess && l.onSuccess(f)), o(f);
|
|
2431
2431
|
}).catch((f) => {
|
|
2432
2432
|
u(f);
|
|
@@ -2443,7 +2443,7 @@ function qn(t) {
|
|
|
2443
2443
|
const h = (p) => {
|
|
2444
2444
|
S(() => d.onError && d.onError(p)), a && a(p);
|
|
2445
2445
|
};
|
|
2446
|
-
t.beforeFetch(d).then(() =>
|
|
2446
|
+
t.beforeFetch(d).then(() => Ot(d, t.fc.create.fetch, s).then((p) => {
|
|
2447
2447
|
S(() => d.onSuccess && d.onSuccess(p)), o && o(p, f);
|
|
2448
2448
|
}).catch((p) => {
|
|
2449
2449
|
h(p);
|
|
@@ -2601,17 +2601,17 @@ function zn(t) {
|
|
|
2601
2601
|
l.length && n.slotUpdate && S(() => n.slotUpdate(u));
|
|
2602
2602
|
let f = {};
|
|
2603
2603
|
const d = e.loadChildrenPending();
|
|
2604
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(i.renderSlots || {}).forEach((
|
|
2605
|
-
f[
|
|
2606
|
-
if (m.Function(i.renderSlots[
|
|
2607
|
-
return S(() => i.renderSlots[
|
|
2608
|
-
const U = this.parseSide(i.renderSlots[
|
|
2604
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(i.renderSlots || {}).forEach((O) => {
|
|
2605
|
+
f[O] = (...P) => {
|
|
2606
|
+
if (m.Function(i.renderSlots[O]))
|
|
2607
|
+
return S(() => i.renderSlots[O](...P));
|
|
2608
|
+
const U = this.parseSide(i.renderSlots[O], e);
|
|
2609
2609
|
return this.renderRule(U);
|
|
2610
2610
|
};
|
|
2611
2611
|
});
|
|
2612
2612
|
const h = this.getTypeSlot(e);
|
|
2613
2613
|
let p;
|
|
2614
|
-
return h ? (u.children = f, p = h(u)) : p = a ? e.parser.preview(et(f), e) : e.parser.render(et(f), e), p = this.renderSides(p, e), ($ = i.title) != null && $.show && (i.wrap = H(_({}, i.wrap || {}), { show: !0 }), i.native || (i.native = !1)), (!(!e.input && m.Undef(i.native)) || ((C = i.col) == null ? void 0 : C.show) === !0) && i.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), p = this.$manager.makeWrap(e, p)), e.none && (Array.isArray(p) ? p = p.map((
|
|
2614
|
+
return h ? (u.children = f, p = h(u)) : p = a ? e.parser.preview(et(f), e) : e.parser.render(et(f), e), p = this.renderSides(p, e), ($ = i.title) != null && $.show && (i.wrap = H(_({}, i.wrap || {}), { show: !0 }), i.native || (i.native = !1)), (!(!e.input && m.Undef(i.native)) || ((C = i.col) == null ? void 0 : C.show) === !0) && i.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), p = this.$manager.makeWrap(e, p)), e.none && (Array.isArray(p) ? p = p.map((O) => !O || !O.__v_isVNode ? O : this.none(O)) : p = this.none(p)), o && this.setCache(e, () => this.stable(p), r), p;
|
|
2615
2615
|
}, this.setCache(e, s, r);
|
|
2616
2616
|
}
|
|
2617
2617
|
return (...s) => {
|
|
@@ -2830,7 +2830,7 @@ function Gn(t) {
|
|
|
2830
2830
|
if (!s && Array.isArray(r) && r[0] && (m.String(r[0]) || m.Function(r[0])))
|
|
2831
2831
|
return this.parseEventLst(e, r, n, !0);
|
|
2832
2832
|
if (m.String(r)) {
|
|
2833
|
-
const i =
|
|
2833
|
+
const i = te(r);
|
|
2834
2834
|
if (i && r !== i)
|
|
2835
2835
|
return i.__inject ? this.parseEvent(e, i, n, !0) : i;
|
|
2836
2836
|
}
|
|
@@ -2926,7 +2926,7 @@ function Gn(t) {
|
|
|
2926
2926
|
}
|
|
2927
2927
|
});
|
|
2928
2928
|
}
|
|
2929
|
-
const
|
|
2929
|
+
const Ft = ["hook:updated", "hook:mounted"];
|
|
2930
2930
|
function Yn(t) {
|
|
2931
2931
|
w(t.prototype, {
|
|
2932
2932
|
usePage() {
|
|
@@ -2941,9 +2941,9 @@ function Yn(t) {
|
|
|
2941
2941
|
},
|
|
2942
2942
|
pageLoad() {
|
|
2943
2943
|
const e = () => {
|
|
2944
|
-
this.pageEnd ? (this.bus.$off(
|
|
2944
|
+
this.pageEnd ? (this.bus.$off(Ft, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2945
2945
|
};
|
|
2946
|
-
this.bus.$on(
|
|
2946
|
+
this.bus.$on(Ft, e);
|
|
2947
2947
|
}
|
|
2948
2948
|
});
|
|
2949
2949
|
}
|
|
@@ -2998,7 +2998,7 @@ function tr(t, e, r) {
|
|
|
2998
2998
|
input: s,
|
|
2999
2999
|
el: void 0,
|
|
3000
3000
|
exportEl: void 0,
|
|
3001
|
-
defaultValue: s ?
|
|
3001
|
+
defaultValue: s ? ee(r) : void 0,
|
|
3002
3002
|
field: e.field || void 0
|
|
3003
3003
|
}), this.updateKey(), Kn(this), this.update(t, !0);
|
|
3004
3004
|
}
|
|
@@ -3062,7 +3062,7 @@ w(tr.prototype, {
|
|
|
3062
3062
|
setPending(t, e, r) {
|
|
3063
3063
|
this.pending[t] = {
|
|
3064
3064
|
origin: e,
|
|
3065
|
-
value:
|
|
3065
|
+
value: Q(r)
|
|
3066
3066
|
};
|
|
3067
3067
|
},
|
|
3068
3068
|
effectData(t) {
|
|
@@ -3168,7 +3168,7 @@ function Xn(t) {
|
|
|
3168
3168
|
__origin__: nt(e)
|
|
3169
3169
|
}), Zn(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((n) => {
|
|
3170
3170
|
n && this.loadFn(n, r);
|
|
3171
|
-
}), this.loadCtrl(r), r.update && (r.update =
|
|
3171
|
+
}), this.loadCtrl(r), r.update && (r.update = te(r.update)), r;
|
|
3172
3172
|
},
|
|
3173
3173
|
loadFn(e, r) {
|
|
3174
3174
|
["on", "props", "deep"].forEach((n) => {
|
|
@@ -3177,7 +3177,7 @@ function Xn(t) {
|
|
|
3177
3177
|
},
|
|
3178
3178
|
loadCtrl(e) {
|
|
3179
3179
|
e.control && e.control.forEach((r) => {
|
|
3180
|
-
r.handle && (r.handle =
|
|
3180
|
+
r.handle && (r.handle = te(r.handle));
|
|
3181
3181
|
});
|
|
3182
3182
|
},
|
|
3183
3183
|
syncProp(e) {
|
|
@@ -3231,14 +3231,14 @@ function Xn(t) {
|
|
|
3231
3231
|
if (f)
|
|
3232
3232
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3233
3233
|
else {
|
|
3234
|
-
const
|
|
3235
|
-
f = new tr(this,
|
|
3234
|
+
const O = this.parseRule(o);
|
|
3235
|
+
f = new tr(this, O, p), this.bindParser(f);
|
|
3236
3236
|
}
|
|
3237
3237
|
this.parseEmit(f), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !h && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3238
3238
|
const $ = f.loadChildrenPending();
|
|
3239
3239
|
if (f.parser.loadChildren === !1 || s($, f), !r) {
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3240
|
+
const O = n(a);
|
|
3241
|
+
O > -1 || !a ? this.sort.splice(O + 1, 0, f.id) : this.sort.push(f.id);
|
|
3242
3242
|
}
|
|
3243
3243
|
const C = f.rule;
|
|
3244
3244
|
return f.updated || (f.updated = !0, m.Function(C.update) && this.bus.$once("load-end", () => {
|
|
@@ -3295,7 +3295,7 @@ function Xn(t) {
|
|
|
3295
3295
|
});
|
|
3296
3296
|
} else {
|
|
3297
3297
|
e.ctrlRule.splice(e.ctrlRule.indexOf(p), 1);
|
|
3298
|
-
const C =
|
|
3298
|
+
const C = X(p);
|
|
3299
3299
|
C && C.rm();
|
|
3300
3300
|
}
|
|
3301
3301
|
});
|
|
@@ -3386,7 +3386,7 @@ function ti(t) {
|
|
|
3386
3386
|
return this.formData[e.id];
|
|
3387
3387
|
},
|
|
3388
3388
|
syncForm() {
|
|
3389
|
-
const e =
|
|
3389
|
+
const e = Q({}), r = this.fields(), n = [];
|
|
3390
3390
|
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, i) => (r.indexOf(i) === -1 && (s[i] = T(this.appendData, i)), s), e), r.reduce((s, i) => {
|
|
3391
3391
|
let o = (this.fieldCtx[i] || []).filter((a) => !this.isIgnore(a))[0];
|
|
3392
3392
|
return o || (o = this.fieldCtx[i][0], n.push(i)), s[i] = T(o.rule, "value"), s;
|
|
@@ -3449,7 +3449,7 @@ function ti(t) {
|
|
|
3449
3449
|
function Rt(t, e) {
|
|
3450
3450
|
return typeof e == "function" ? "" + e : e;
|
|
3451
3451
|
}
|
|
3452
|
-
const
|
|
3452
|
+
const Fe = {
|
|
3453
3453
|
init(t) {
|
|
3454
3454
|
},
|
|
3455
3455
|
toFormValue(t, e) {
|
|
@@ -3468,7 +3468,7 @@ const Oe = {
|
|
|
3468
3468
|
},
|
|
3469
3469
|
mergeProp(t) {
|
|
3470
3470
|
}
|
|
3471
|
-
}, ri = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"],
|
|
3471
|
+
}, ri = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Oe = Symbol("oldValue");
|
|
3472
3472
|
function ni(t) {
|
|
3473
3473
|
w(t.prototype, {
|
|
3474
3474
|
getCtx(e) {
|
|
@@ -3504,7 +3504,7 @@ function ni(t) {
|
|
|
3504
3504
|
if (i)
|
|
3505
3505
|
return i;
|
|
3506
3506
|
}
|
|
3507
|
-
return r[e.originType] || r[G(e.type)] || r[e.trueType] ||
|
|
3507
|
+
return r[e.originType] || r[G(e.type)] || r[e.trueType] || Fe;
|
|
3508
3508
|
},
|
|
3509
3509
|
bindParser(e) {
|
|
3510
3510
|
e.setParser(this.getParser(e));
|
|
@@ -3598,12 +3598,12 @@ function ni(t) {
|
|
|
3598
3598
|
const a = n[s];
|
|
3599
3599
|
if (!a) return;
|
|
3600
3600
|
const l = this.compute(e, a);
|
|
3601
|
-
return (a.linkage || a.linkageVariable) && l ===
|
|
3601
|
+
return (a.linkage || a.linkageVariable) && l === Oe ? Oe : l;
|
|
3602
3602
|
}), o = (a) => {
|
|
3603
3603
|
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : pe(e.rule, s, a);
|
|
3604
3604
|
};
|
|
3605
3605
|
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : i.value !== N(e.rule, s)) && o(i.value), e.watch.push(L(i, (a) => {
|
|
3606
|
-
a !==
|
|
3606
|
+
a !== Oe && setTimeout(() => {
|
|
3607
3607
|
o(a);
|
|
3608
3608
|
});
|
|
3609
3609
|
}, { deep: !0 }));
|
|
@@ -3748,7 +3748,7 @@ function ni(t) {
|
|
|
3748
3748
|
return l ? !1 : u;
|
|
3749
3749
|
};
|
|
3750
3750
|
let o = i(r);
|
|
3751
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ? S(() => this.computeValue(r.linkage, e, s), void 0) :
|
|
3751
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? S(() => this.computeValue(r.linkage, e, s), void 0) : Oe : r.linkageVariable ? o ? S(() => this.fc.getLoadData(r.linkageVariable), void 0) : Oe : o;
|
|
3752
3752
|
} else if (m.Function(r))
|
|
3753
3753
|
n = () => r(this.api.form, this.api, e.rule);
|
|
3754
3754
|
else {
|
|
@@ -3813,7 +3813,7 @@ function ii(t) {
|
|
|
3813
3813
|
emitEvent(e, ...r) {
|
|
3814
3814
|
const n = this.options[e] || this.options[G("on-" + e)];
|
|
3815
3815
|
if (n) {
|
|
3816
|
-
const s =
|
|
3816
|
+
const s = te(n);
|
|
3817
3817
|
m.Function(s) && S(() => s(...r));
|
|
3818
3818
|
}
|
|
3819
3819
|
this.bus.$emit(e, ...r);
|
|
@@ -3922,7 +3922,7 @@ function ai(t) {
|
|
|
3922
3922
|
return r.length ? r : !1;
|
|
3923
3923
|
} else return m.String(e) ? [e] : !1;
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3925
|
+
function ne(t) {
|
|
3926
3926
|
Kt(this, {
|
|
3927
3927
|
options() {
|
|
3928
3928
|
return t.options.value || {};
|
|
@@ -3942,10 +3942,10 @@ function re(t) {
|
|
|
3942
3942
|
noWatchFn: null,
|
|
3943
3943
|
deferSyncFn: null,
|
|
3944
3944
|
isMounted: !1,
|
|
3945
|
-
formData:
|
|
3946
|
-
subRuleData:
|
|
3945
|
+
formData: Q({}),
|
|
3946
|
+
subRuleData: Q({}),
|
|
3947
3947
|
subForm: {},
|
|
3948
|
-
form:
|
|
3948
|
+
form: Q({}),
|
|
3949
3949
|
appendData: {},
|
|
3950
3950
|
ignoreFields: [],
|
|
3951
3951
|
providers: {},
|
|
@@ -3962,7 +3962,7 @@ function re(t) {
|
|
|
3962
3962
|
return n && n !== e && w(e, n), e;
|
|
3963
3963
|
}, qn(this));
|
|
3964
3964
|
}
|
|
3965
|
-
w(
|
|
3965
|
+
w(ne.prototype, {
|
|
3966
3966
|
initData(t) {
|
|
3967
3967
|
w(this, {
|
|
3968
3968
|
ctxs: {},
|
|
@@ -3976,7 +3976,7 @@ w(re.prototype, {
|
|
|
3976
3976
|
this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
|
|
3977
3977
|
},
|
|
3978
3978
|
updateAppendData() {
|
|
3979
|
-
this.appendData = _(_(_({},
|
|
3979
|
+
this.appendData = _(_(_({}, ee(this.options.formData || {})), this.fc.vm.props.modelValue || {}), this.appendData);
|
|
3980
3980
|
},
|
|
3981
3981
|
isBreakWatch() {
|
|
3982
3982
|
return this.loading || this.noWatchFn || this.reloading;
|
|
@@ -4000,15 +4000,15 @@ w(re.prototype, {
|
|
|
4000
4000
|
});
|
|
4001
4001
|
}
|
|
4002
4002
|
});
|
|
4003
|
-
Gn(
|
|
4004
|
-
Yn(
|
|
4005
|
-
Jn(
|
|
4006
|
-
Xn(
|
|
4007
|
-
ti(
|
|
4008
|
-
ni(
|
|
4009
|
-
ii(
|
|
4010
|
-
si(
|
|
4011
|
-
const li = "fcFragment", Ye =
|
|
4003
|
+
Gn(ne);
|
|
4004
|
+
Yn(ne);
|
|
4005
|
+
Jn(ne);
|
|
4006
|
+
Xn(ne);
|
|
4007
|
+
ti(ne);
|
|
4008
|
+
ni(ne);
|
|
4009
|
+
ii(ne);
|
|
4010
|
+
si(ne);
|
|
4011
|
+
const li = "fcFragment", Ye = re({
|
|
4012
4012
|
name: li,
|
|
4013
4013
|
inheritAttrs: !1,
|
|
4014
4014
|
props: ["vnode"],
|
|
@@ -4052,7 +4052,7 @@ function fi() {
|
|
|
4052
4052
|
const o = (this.vm || Qe()).appContext.config.isNativeTag(r), a = this.handle.fc.prop.components[r];
|
|
4053
4053
|
!a && o && delete n.formCreateInject;
|
|
4054
4054
|
try {
|
|
4055
|
-
return v(a || (o ? r :
|
|
4055
|
+
return v(a || (o ? r : F(r)), n, s);
|
|
4056
4056
|
} catch (l) {
|
|
4057
4057
|
return console.error(l), v("");
|
|
4058
4058
|
}
|
|
@@ -4155,7 +4155,7 @@ const di = function(t) {
|
|
|
4155
4155
|
let h;
|
|
4156
4156
|
n && n.__fc__ && (h = n.__fc__.getParentGroup());
|
|
4157
4157
|
let p;
|
|
4158
|
-
a.template ? p = t.$handle.loadStrVar(a.template, d, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null) : a.handler && m.Function(a.handler) ? p = a.handler(d, n, s) : p = t.$handle.loadStrVar(`{{${a.attr}}}`, d, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null), (p == null || p === "") && a.default != null && (p = a.default), a.copy !== !1 && (p =
|
|
4158
|
+
a.template ? p = t.$handle.loadStrVar(a.template, d, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null) : a.handler && m.Function(a.handler) ? p = a.handler(d, n, s) : p = t.$handle.loadStrVar(`{{${a.attr}}}`, d, h ? { rule: n, value: t.$handle.subRuleData[h.id] || {} } : null), (p == null || p === "") && a.default != null && (p = a.default), a.copy !== !1 && (p = ee(p));
|
|
4159
4159
|
const $ = a.modify ? n : r.getProp();
|
|
4160
4160
|
a.to === "child" ? $.children ? $.children[0] = p : $.children = [p] : pe($, a.to || "options", p), s.sync(n);
|
|
4161
4161
|
}, u = (d) => l(d);
|
|
@@ -4211,7 +4211,7 @@ const di = function(t) {
|
|
|
4211
4211
|
m.Object(n) || (n = { method: n });
|
|
4212
4212
|
const s = n.method, i = H(_({}, n), {
|
|
4213
4213
|
validator(...o) {
|
|
4214
|
-
const a =
|
|
4214
|
+
const a = X(e);
|
|
4215
4215
|
if (a)
|
|
4216
4216
|
return r.exec(a.id, m.String(s) ? s : "formCreateValidate", ...o, {
|
|
4217
4217
|
attr: t,
|
|
@@ -4243,7 +4243,7 @@ const di = function(t) {
|
|
|
4243
4243
|
l(void 0);
|
|
4244
4244
|
return;
|
|
4245
4245
|
}
|
|
4246
|
-
a =
|
|
4246
|
+
a = ee(a), a.to || (a.to = "options");
|
|
4247
4247
|
const u = a.onError, f = () => {
|
|
4248
4248
|
if (!s.getValue())
|
|
4249
4249
|
return s.clearProp(), o.sync(i), !0;
|
|
@@ -4260,19 +4260,19 @@ const di = function(t) {
|
|
|
4260
4260
|
}
|
|
4261
4261
|
return;
|
|
4262
4262
|
}
|
|
4263
|
-
const p = t.$handle.loadFetchVar(
|
|
4263
|
+
const p = t.$handle.loadFetchVar(ee(a), d, i), $ = H(_({
|
|
4264
4264
|
headers: {}
|
|
4265
4265
|
}, p), {
|
|
4266
|
-
onSuccess(C,
|
|
4266
|
+
onSuccess(C, O) {
|
|
4267
4267
|
if (f()) return;
|
|
4268
|
-
let P = (M) =>
|
|
4269
|
-
const U =
|
|
4268
|
+
let P = (M) => O ? M : D(M, "data") ? M.data : M;
|
|
4269
|
+
const U = te(p.parse);
|
|
4270
4270
|
m.Function(U) ? P = U : U && m.String(U) && (P = (M) => N(M, U)), Ne(P(C, i, o)).then((M) => {
|
|
4271
4271
|
l(M);
|
|
4272
4272
|
});
|
|
4273
4273
|
},
|
|
4274
4274
|
onError(C) {
|
|
4275
|
-
l(void 0), !f() && (u || ((
|
|
4275
|
+
l(void 0), !f() && (u || ((O) => ot(O.message || "fetch fail " + p.action)))(C, i, o);
|
|
4276
4276
|
}
|
|
4277
4277
|
});
|
|
4278
4278
|
t.$handle.beforeFetch($, { rule: i, api: o }).then(() => {
|
|
@@ -4431,11 +4431,11 @@ function Si(t, e) {
|
|
|
4431
4431
|
function We() {
|
|
4432
4432
|
return Si("name", ...arguments);
|
|
4433
4433
|
}
|
|
4434
|
-
function
|
|
4434
|
+
function Oi(t) {
|
|
4435
4435
|
const e = t.key || [], r = t.array || [], n = t.normal || [];
|
|
4436
4436
|
xt.push(...e), at.push(...r), lt.push(...n), Qt([...e, ...r, ...n]);
|
|
4437
4437
|
}
|
|
4438
|
-
let
|
|
4438
|
+
let Fi = 1;
|
|
4439
4439
|
const W = {}, Dt = Symbol("defValue");
|
|
4440
4440
|
function ir(t) {
|
|
4441
4441
|
const e = {
|
|
@@ -4444,10 +4444,10 @@ function ir(t) {
|
|
|
4444
4444
|
t.extendApi
|
|
4445
4445
|
], u = _({}, mi), f = Nn();
|
|
4446
4446
|
let d = { global: {} };
|
|
4447
|
-
const h = t.isMobile === !0, p =
|
|
4447
|
+
const h = t.isMobile === !0, p = Q({
|
|
4448
4448
|
$mobile: h
|
|
4449
|
-
}), $ = fi(), C = {},
|
|
4450
|
-
|
|
4449
|
+
}), $ = fi(), C = {}, O = {};
|
|
4450
|
+
Oi(t.attrs || {});
|
|
4451
4451
|
function P(c) {
|
|
4452
4452
|
const g = W[c];
|
|
4453
4453
|
if (Array.isArray(g))
|
|
@@ -4473,13 +4473,13 @@ function ir(t) {
|
|
|
4473
4473
|
}
|
|
4474
4474
|
function E(c) {
|
|
4475
4475
|
if (arguments.length === 0)
|
|
4476
|
-
return
|
|
4476
|
+
return Fe;
|
|
4477
4477
|
if (typeof c == "string" && arguments.length === 1)
|
|
4478
4478
|
return r[G(c)];
|
|
4479
4479
|
const g = We(...arguments);
|
|
4480
|
-
if (!g.id || !g.prop) return
|
|
4480
|
+
if (!g.id || !g.prop) return Fe;
|
|
4481
4481
|
const y = G(g.id), b = g.prop, V = b.merge === !0 ? r[y] : void 0;
|
|
4482
|
-
r[y] = Le(b, V ||
|
|
4482
|
+
r[y] = Le(b, V || Fe), f[y] = B(y), b.maker && w(f, b.maker);
|
|
4483
4483
|
}
|
|
4484
4484
|
function A(c, g) {
|
|
4485
4485
|
let y;
|
|
@@ -4499,7 +4499,7 @@ function ir(t) {
|
|
|
4499
4499
|
const y = q();
|
|
4500
4500
|
return jr({
|
|
4501
4501
|
data() {
|
|
4502
|
-
return
|
|
4502
|
+
return Q({
|
|
4503
4503
|
rule: c,
|
|
4504
4504
|
option: g
|
|
4505
4505
|
});
|
|
@@ -4523,7 +4523,7 @@ function ir(t) {
|
|
|
4523
4523
|
const b = document.createElement("div");
|
|
4524
4524
|
return ((g == null ? void 0 : g.el) || document.body).appendChild(b), y.mount(b).$refs.fc.fapi;
|
|
4525
4525
|
}
|
|
4526
|
-
Le(le,
|
|
4526
|
+
Le(le, O);
|
|
4527
4527
|
function lr(c) {
|
|
4528
4528
|
let g = _({}, t);
|
|
4529
4529
|
return c ? g.inherit = {
|
|
@@ -4547,7 +4547,7 @@ function ir(t) {
|
|
|
4547
4547
|
function cr(c, g) {
|
|
4548
4548
|
const y = i[c] || {}, b = y.parsers || {};
|
|
4549
4549
|
g.parsers && Object.keys(g.parsers).forEach((V) => {
|
|
4550
|
-
b[V] = Le(g.parsers[V],
|
|
4550
|
+
b[V] = Le(g.parsers[V], Fe);
|
|
4551
4551
|
}), g.name = c, i[c] = H(_(_({}, y), g), { parsers: b });
|
|
4552
4552
|
}
|
|
4553
4553
|
function je(c) {
|
|
@@ -4585,7 +4585,7 @@ function ir(t) {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
function ze(c) {
|
|
4587
4587
|
w(this, {
|
|
4588
|
-
id:
|
|
4588
|
+
id: Fi++,
|
|
4589
4589
|
create: le,
|
|
4590
4590
|
vm: c,
|
|
4591
4591
|
manager: ci(t.manager),
|
|
@@ -4612,14 +4612,14 @@ function ir(t) {
|
|
|
4612
4612
|
options: it({}),
|
|
4613
4613
|
extendApiFn: l,
|
|
4614
4614
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4615
|
-
tmpData:
|
|
4615
|
+
tmpData: Q({})
|
|
4616
4616
|
}), a.forEach((g) => {
|
|
4617
4617
|
this.bus.$on(g.name, g.callback);
|
|
4618
4618
|
}), I(() => {
|
|
4619
4619
|
L(this.options, () => {
|
|
4620
4620
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4621
4621
|
}, { deep: !0 });
|
|
4622
|
-
}), w(c.appContext.components, e), w(c.appContext.directives, n), this.$handle = new
|
|
4622
|
+
}), w(c.appContext.components, e), w(c.appContext.directives, n), this.$handle = new ne(this), this.name && (this.inFor ? (W[this.name] || (W[this.name] = []), W[this.name].push(this)) : W[this.name] = this);
|
|
4623
4623
|
}
|
|
4624
4624
|
ze.isMobile = h, w(ze.prototype, {
|
|
4625
4625
|
init() {
|
|
@@ -4693,7 +4693,7 @@ function ir(t) {
|
|
|
4693
4693
|
let g = c.split(".");
|
|
4694
4694
|
const y = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[y];
|
|
4695
4695
|
if (b) {
|
|
4696
|
-
const V = m.Function(b) ? b :
|
|
4696
|
+
const V = m.Function(b) ? b : te(b.handle);
|
|
4697
4697
|
if (V) {
|
|
4698
4698
|
let j = V((...k) => this.$handle.api.getData(...k), this.$handle.api);
|
|
4699
4699
|
return N(j, g);
|
|
@@ -4777,7 +4777,7 @@ function ir(t) {
|
|
|
4777
4777
|
resetBtn: {},
|
|
4778
4778
|
globalEvent: {},
|
|
4779
4779
|
globalData: {}
|
|
4780
|
-
},
|
|
4780
|
+
}, ee(d));
|
|
4781
4781
|
const g = this.isSub();
|
|
4782
4782
|
g && (c = this.mergeOptions(c, this.vm.setupState.parent.setupState.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.props.option);
|
|
4783
4783
|
const y = this.api();
|
|
@@ -4843,7 +4843,7 @@ function ir(t) {
|
|
|
4843
4843
|
mergeRule: ae,
|
|
4844
4844
|
fetch: er,
|
|
4845
4845
|
$form: q,
|
|
4846
|
-
parseFn:
|
|
4846
|
+
parseFn: te,
|
|
4847
4847
|
parseJson: Ut,
|
|
4848
4848
|
toJson: Re,
|
|
4849
4849
|
useApp: U,
|
|
@@ -4870,7 +4870,7 @@ function ir(t) {
|
|
|
4870
4870
|
}
|
|
4871
4871
|
});
|
|
4872
4872
|
}
|
|
4873
|
-
if (ht(
|
|
4873
|
+
if (ht(O), mr(O), Ie("$cookie", _i), Ie("$localStorage", wi), Ie("$sessionStorage", Ci), $.use({ fragment: "fcFragment" }), t.install && le.use(t), U((c, g) => {
|
|
4874
4874
|
g.mixin({
|
|
4875
4875
|
props: ["formCreateInject"]
|
|
4876
4876
|
});
|
|
@@ -4879,16 +4879,16 @@ function ir(t) {
|
|
|
4879
4879
|
c.components && w(e, c.components), c.parsers && w(r, c.parsers), c.directives && w(n, c.directives), c.modelFields && w(s, c.modelFields), c.providers && w(u, c.providers), c.useApps && w(o, c.useApps), c.maker && w(f, c.maker), c.loadData && w(p, c.loadData), c.formulas && w(C, c.formulas);
|
|
4880
4880
|
}
|
|
4881
4881
|
const Pe = q();
|
|
4882
|
-
return Le(Pe,
|
|
4882
|
+
return Le(Pe, O), Object.defineProperties(Pe, {
|
|
4883
4883
|
fetch: {
|
|
4884
4884
|
get() {
|
|
4885
|
-
return
|
|
4885
|
+
return O.fetch;
|
|
4886
4886
|
},
|
|
4887
4887
|
set(c) {
|
|
4888
|
-
|
|
4888
|
+
O.fetch = c;
|
|
4889
4889
|
}
|
|
4890
4890
|
}
|
|
4891
|
-
}), Pe.util =
|
|
4891
|
+
}), Pe.util = O, Pe;
|
|
4892
4892
|
}
|
|
4893
4893
|
const At = {
|
|
4894
4894
|
date: "YYYY-MM-DD",
|
|
@@ -5053,7 +5053,7 @@ function Ui(t) {
|
|
|
5053
5053
|
function Pt(t, e) {
|
|
5054
5054
|
D(t, e) && m.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
5055
5055
|
}
|
|
5056
|
-
function
|
|
5056
|
+
function ie(t) {
|
|
5057
5057
|
return t === !1;
|
|
5058
5058
|
}
|
|
5059
5059
|
function qi(t, e) {
|
|
@@ -5131,12 +5131,12 @@ const Hi = {
|
|
|
5131
5131
|
});
|
|
5132
5132
|
},
|
|
5133
5133
|
render(t) {
|
|
5134
|
-
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule,
|
|
5134
|
+
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, ie(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
|
|
5135
5135
|
},
|
|
5136
5136
|
makeWrap(t, e) {
|
|
5137
5137
|
const r = t.prop, n = `${this.key}${t.key}`, s = r.col, i = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !i ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props, u = r.wrap.class;
|
|
5138
5138
|
delete r.wrap.class, delete r.wrap.title;
|
|
5139
|
-
const f = (m.Undef(r.wrap.show) ? !t.input :
|
|
5139
|
+
const f = (m.Undef(r.wrap.show) ? !t.input : ie(r.wrap.show)) ? e : this.$r(oe([r.wrap, {
|
|
5140
5140
|
props: H(_({
|
|
5141
5141
|
labelWidth: o === void 0 ? o : Lt(o),
|
|
5142
5142
|
label: i ? r.title.title : void 0
|
|
@@ -5149,12 +5149,12 @@ const Hi = {
|
|
|
5149
5149
|
ref: t.wrapRef,
|
|
5150
5150
|
type: "formItem"
|
|
5151
5151
|
}]), _({ default: () => e }, i ? { label: () => this.makeInfo(r, n, t) } : {}));
|
|
5152
|
-
return a === !0 ||
|
|
5152
|
+
return a === !0 || ie(l) || ie(s.show) ? f : this.makeCol(r, n, [f]);
|
|
5153
5153
|
},
|
|
5154
5154
|
isTitle(t) {
|
|
5155
5155
|
if (this.options.form.title === !1) return !1;
|
|
5156
5156
|
const e = t.title;
|
|
5157
|
-
return !(!e.title && !e.native ||
|
|
5157
|
+
return !(!e.title && !e.native || ie(e.show));
|
|
5158
5158
|
},
|
|
5159
5159
|
makeInfo(t, e, r) {
|
|
5160
5160
|
var f, d, h, p, $, C;
|
|
@@ -5163,15 +5163,15 @@ const Hi = {
|
|
|
5163
5163
|
rule: r.rule,
|
|
5164
5164
|
options: this.options
|
|
5165
5165
|
}) : ((p = (h = r.refRule) == null ? void 0 : h.__$title) == null ? void 0 : p.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5166
|
-
if (!
|
|
5167
|
-
const
|
|
5166
|
+
if (!ie(s.show) && (s.info || s.native) && !ie(s.icon)) {
|
|
5167
|
+
const O = {
|
|
5168
5168
|
type: s.type || "popover",
|
|
5169
5169
|
props: Ze(s),
|
|
5170
5170
|
key: `${e}pop`
|
|
5171
5171
|
};
|
|
5172
|
-
delete
|
|
5172
|
+
delete O.props.icon, delete O.props.show, delete O.props.info, delete O.props.align, delete O.props.native;
|
|
5173
5173
|
const P = "content";
|
|
5174
|
-
s.info && !D(
|
|
5174
|
+
s.info && !D(O.props, P) && (O.props[P] = (C = ($ = r.refRule) == null ? void 0 : $.__$info) == null ? void 0 : C.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(oe([s, O]), {
|
|
5175
5175
|
[n.slot || (i ? "default" : "reference")]: () => this.$r({
|
|
5176
5176
|
type: "ElIcon",
|
|
5177
5177
|
style: "top:2px",
|
|
@@ -5189,8 +5189,8 @@ const Hi = {
|
|
|
5189
5189
|
class: "fc-form-title",
|
|
5190
5190
|
type: n.type || "span",
|
|
5191
5191
|
on: {
|
|
5192
|
-
click: (...
|
|
5193
|
-
this.$handle.targetHook(r, "titleClick", { args:
|
|
5192
|
+
click: (...O) => {
|
|
5193
|
+
this.$handle.targetHook(r, "titleClick", { args: O });
|
|
5194
5194
|
}
|
|
5195
5195
|
}
|
|
5196
5196
|
}]);
|
|
@@ -5216,7 +5216,7 @@ const Hi = {
|
|
|
5216
5216
|
},
|
|
5217
5217
|
makeFormBtn() {
|
|
5218
5218
|
let t = [];
|
|
5219
|
-
if (
|
|
5219
|
+
if (ie(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), ie(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
|
|
5220
5220
|
return;
|
|
5221
5221
|
const e = this.$r({
|
|
5222
5222
|
type: "formItem",
|
|
@@ -5333,18 +5333,18 @@ function Ki(t, e) {
|
|
|
5333
5333
|
},
|
|
5334
5334
|
validateField(r, n) {
|
|
5335
5335
|
return new Promise((s, i) => {
|
|
5336
|
-
const
|
|
5337
|
-
if (!
|
|
5336
|
+
const a = typeof r == "object" ? X(r) : e.getCtx(r);
|
|
5337
|
+
if (!a) {
|
|
5338
5338
|
s(null), n && n(null);
|
|
5339
5339
|
return;
|
|
5340
5340
|
}
|
|
5341
|
-
const
|
|
5342
|
-
x(
|
|
5343
|
-
|
|
5344
|
-
}), Promise.all(
|
|
5341
|
+
const l = e.subForm[a.id], u = [e.$manager.validateField(a.id)];
|
|
5342
|
+
x(l).filter((f) => !f.isScope).forEach((f) => {
|
|
5343
|
+
u.push(f.validate());
|
|
5344
|
+
}), Promise.all(u).then(() => {
|
|
5345
5345
|
s(null), n && n(null);
|
|
5346
|
-
}).catch((
|
|
5347
|
-
i(
|
|
5346
|
+
}).catch((f) => {
|
|
5347
|
+
i(f), n && n(f), e.vm.emit("validate-field-fail", f, { field: r, api: t });
|
|
5348
5348
|
});
|
|
5349
5349
|
});
|
|
5350
5350
|
},
|