low-code-form-generator 1.1.3 → 1.1.4
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/low-code-form.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, createElementBlock as l, openBlock as o, createElementVNode as r, ref as F, nextTick as T2, reactive as t1, normalizeClass as $0, unref as f2, renderSlot as _1, computed as Q2, onUnmounted as m1, normalizeStyle as h1, onMounted as d1, resolveComponent as I, createBlock as J, withCtx as C, resolveDynamicComponent as N1, h as
|
|
1
|
+
import { defineComponent as s, createElementBlock as l, openBlock as o, createElementVNode as r, ref as F, nextTick as T2, reactive as t1, normalizeClass as $0, unref as f2, renderSlot as _1, computed as Q2, onUnmounted as m1, normalizeStyle as h1, onMounted as d1, resolveComponent as I, createBlock as J, withCtx as C, resolveDynamicComponent as N1, h as g2, getCurrentInstance as d4, createVNode as g, withDirectives as h0, createCommentVNode as H2, vShow as d0, Fragment as V2, createTextVNode as m2, renderList as u0, createSlots as v4, toDisplayString as M0, createApp as v1, watch as a1, onBeforeUnmount as f4, Teleport as w4 } from "vue";
|
|
2
2
|
import * as F2 from "element-plus";
|
|
3
3
|
import { ElMessage as E1, ElMessageBox as g4 } from "element-plus";
|
|
4
4
|
const x4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -178,8 +178,8 @@ function e2(t, e, a, n, i) {
|
|
|
178
178
|
}
|
|
179
179
|
while (i = i.parentNode);
|
|
180
180
|
if (n && t !== window) {
|
|
181
|
-
var y = o0(i || t),
|
|
182
|
-
y && (c /=
|
|
181
|
+
var y = o0(i || t), E = y && y.a, z = y && y.d;
|
|
182
|
+
y && (c /= z, p /= E, h /= E, d /= z, _ = c + d, m = p + h);
|
|
183
183
|
}
|
|
184
184
|
return {
|
|
185
185
|
top: c,
|
|
@@ -216,7 +216,7 @@ function w1(t, e) {
|
|
|
216
216
|
a = a.previousElementSibling;
|
|
217
217
|
return a || null;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function b2(t, e) {
|
|
220
220
|
var a = 0;
|
|
221
221
|
if (!t || !t.parentNode)
|
|
222
222
|
return -1;
|
|
@@ -335,9 +335,9 @@ function y4() {
|
|
|
335
335
|
}
|
|
336
336
|
var u = !1, c = 0;
|
|
337
337
|
t.forEach(function(p) {
|
|
338
|
-
var _ = 0, m = p.target, d = m.fromRect, h = e2(m), w = m.prevFromRect, y = m.prevToRect,
|
|
339
|
-
|
|
340
|
-
(
|
|
338
|
+
var _ = 0, m = p.target, d = m.fromRect, h = e2(m), w = m.prevFromRect, y = m.prevToRect, E = p.rect, z = o0(m, !0);
|
|
339
|
+
z && (h.top -= z.f, h.left -= z.e), m.toRect = h, m.thisAnimationDuration && Y0(w, h) && !Y0(d, h) && // Make sure animatingRect is on line between toRect & fromRect
|
|
340
|
+
(E.top - h.top) / (E.left - h.left) === (d.top - h.top) / (d.left - h.left) && (_ = A4(E, w, y, i.options)), Y0(h, d) || (m.prevFromRect = d, m.prevToRect = h, _ || (_ = i.options.animation), i.animate(m, E, h, _)), _ && (u = !0, c = Math.max(c, _), clearTimeout(m.animationResetTimer), m.animationResetTimer = setTimeout(function() {
|
|
341
341
|
m.animationTime = 0, m.prevFromRect = null, m.fromRect = null, m.prevToRect = null, m.thisAnimationDuration = null;
|
|
342
342
|
}, _), m.thisAnimationDuration = _);
|
|
343
343
|
}), clearTimeout(e), u ? e = setTimeout(function() {
|
|
@@ -414,17 +414,17 @@ var e0 = [], W0 = {
|
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
function B4(t) {
|
|
417
|
-
var e = t.sortable, a = t.rootEl, n = t.name, i = t.targetEl, u = t.cloneEl, c = t.toEl, p = t.fromEl, _ = t.oldIndex, m = t.newIndex, d = t.oldDraggableIndex, h = t.newDraggableIndex, w = t.originalEvent, y = t.putSortable,
|
|
417
|
+
var e = t.sortable, a = t.rootEl, n = t.name, i = t.targetEl, u = t.cloneEl, c = t.toEl, p = t.fromEl, _ = t.oldIndex, m = t.newIndex, d = t.oldDraggableIndex, h = t.newDraggableIndex, w = t.originalEvent, y = t.putSortable, E = t.extraEventProperties;
|
|
418
418
|
if (e = e || a && a[_2], !!e) {
|
|
419
|
-
var
|
|
420
|
-
window.CustomEvent && !P2 && !z0 ?
|
|
419
|
+
var z, O = e.options, X = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
420
|
+
window.CustomEvent && !P2 && !z0 ? z = new CustomEvent(n, {
|
|
421
421
|
bubbles: !0,
|
|
422
422
|
cancelable: !0
|
|
423
|
-
}) : (
|
|
424
|
-
var R = B2(B2({},
|
|
423
|
+
}) : (z = document.createEvent("Event"), z.initEvent(n, !0, !0)), z.to = c || a, z.from = p || a, z.item = i || a, z.clone = u, z.oldIndex = _, z.newIndex = m, z.oldDraggableIndex = d, z.newDraggableIndex = h, z.originalEvent = w, z.pullMode = y ? y.lastPutMode : void 0;
|
|
424
|
+
var R = B2(B2({}, E), E0.getEventProperties(n, e));
|
|
425
425
|
for (var $ in R)
|
|
426
|
-
|
|
427
|
-
a && a.dispatchEvent(
|
|
426
|
+
z[$] = R[$];
|
|
427
|
+
a && a.dispatchEvent(z), O[X] && O[X].call(e, z);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
var D4 = ["evt"], p2 = function(e, a) {
|
|
@@ -620,7 +620,7 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
620
620
|
if (e.cancelable) {
|
|
621
621
|
var a = this, n = this.el, i = this.options, u = i.preventOnFilter, c = e.type, p = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, _ = (p || e).target, m = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || _, d = i.filter;
|
|
622
622
|
if ($4(n), !f && !(/mousedown|pointerdown/.test(c) && e.button !== 0 || i.disabled) && !m.isContentEditable && !(!this.nativeDraggable && v0 && _ && _.tagName.toUpperCase() === "SELECT") && (_ = S2(_, i.draggable, n, !1), !(_ && _.animated) && L0 !== _)) {
|
|
623
|
-
if (r0 =
|
|
623
|
+
if (r0 = b2(_), w0 = b2(_, i.draggable), typeof d == "function") {
|
|
624
624
|
if (d.call(this, e, _, this)) {
|
|
625
625
|
c2({
|
|
626
626
|
sortable: a,
|
|
@@ -795,10 +795,10 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
795
795
|
},
|
|
796
796
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
797
797
|
_onDragOver: function(e) {
|
|
798
|
-
var a = this.el, n = e.target, i, u, c, p = this.options, _ = p.group, m = H.active, d = V0 === _, h = p.sort, w = o2 || m, y,
|
|
798
|
+
var a = this.el, n = e.target, i, u, c, p = this.options, _ = p.group, m = H.active, d = V0 === _, h = p.sort, w = o2 || m, y, E = this, z = !1;
|
|
799
799
|
if (r1) return;
|
|
800
800
|
function O(h2, I2) {
|
|
801
|
-
p2(h2,
|
|
801
|
+
p2(h2, E, B2({
|
|
802
802
|
evt: e,
|
|
803
803
|
isOwner: d,
|
|
804
804
|
axis: y ? "vertical" : "horizontal",
|
|
@@ -816,18 +816,18 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
816
816
|
}, I2));
|
|
817
817
|
}
|
|
818
818
|
function X() {
|
|
819
|
-
O("dragOverAnimationCapture"),
|
|
819
|
+
O("dragOverAnimationCapture"), E.captureAnimationState(), E !== w && w.captureAnimationState();
|
|
820
820
|
}
|
|
821
821
|
function R(h2) {
|
|
822
822
|
return O("dragOverCompleted", {
|
|
823
823
|
insertion: h2
|
|
824
|
-
}), h2 && (d ? m._hideClone() : m._showClone(
|
|
825
|
-
O("dragOverAnimationComplete"),
|
|
826
|
-
}),
|
|
824
|
+
}), h2 && (d ? m._hideClone() : m._showClone(E), E !== w && (d2(f, o2 ? o2.options.ghostClass : m.options.ghostClass, !1), d2(f, p.ghostClass, !0)), o2 !== E && E !== H.active ? o2 = E : E === H.active && o2 && (o2 = null), w === E && (E._ignoreWhileAnimating = n), E.animateAll(function() {
|
|
825
|
+
O("dragOverAnimationComplete"), E._ignoreWhileAnimating = null;
|
|
826
|
+
}), E !== w && (w.animateAll(), w._ignoreWhileAnimating = null)), (n === f && !f.animated || n === a && !n.animated) && (t0 = null), !p.dragoverBubble && !e.rootEl && n !== document && (f.parentNode[_2]._isOutsideThisEl(e.target), !h2 && X2(e)), !p.dragoverBubble && e.stopPropagation && e.stopPropagation(), z = !0;
|
|
827
827
|
}
|
|
828
828
|
function $() {
|
|
829
|
-
v2 =
|
|
830
|
-
sortable:
|
|
829
|
+
v2 = b2(f), R2 = b2(f, p.draggable), c2({
|
|
830
|
+
sortable: E,
|
|
831
831
|
name: "change",
|
|
832
832
|
toEl: a,
|
|
833
833
|
newIndex: v2,
|
|
@@ -835,11 +835,11 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
835
835
|
originalEvent: e
|
|
836
836
|
});
|
|
837
837
|
}
|
|
838
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = S2(n, p.draggable, a, !0), O("dragOver"), H.eventCanceled) return
|
|
839
|
-
if (f.contains(e.target) || n.animated && n.animatingX && n.animatingY ||
|
|
838
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = S2(n, p.draggable, a, !0), O("dragOver"), H.eventCanceled) return z;
|
|
839
|
+
if (f.contains(e.target) || n.animated && n.animatingX && n.animatingY || E._ignoreWhileAnimating === n)
|
|
840
840
|
return R(!1);
|
|
841
841
|
if (N0 = !1, m && !p.disabled && (d ? h || (c = G !== U) : o2 === this || (this.lastPutMode = V0.checkPull(this, m, f, e)) && _.checkPut(this, m, f, e))) {
|
|
842
|
-
if (y = this._getDirection(e, n) === "vertical", i = e2(f), O("dragOverValid"), H.eventCanceled) return
|
|
842
|
+
if (y = this._getDirection(e, n) === "vertical", i = e2(f), O("dragOverValid"), H.eventCanceled) return z;
|
|
843
843
|
if (c)
|
|
844
844
|
return G = U, X(), this._hideClone(), O("revert"), H.eventCanceled || (K2 ? U.insertBefore(f, K2) : U.appendChild(f)), R(!0);
|
|
845
845
|
var B = w1(a, p.draggable);
|
|
@@ -856,11 +856,11 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
856
856
|
return X(), a.insertBefore(f, i2), G = a, $(), R(!0);
|
|
857
857
|
} else if (n.parentNode === a) {
|
|
858
858
|
u = e2(n);
|
|
859
|
-
var K = 0,
|
|
860
|
-
t0 !== n && (
|
|
859
|
+
var K = 0, x2, D2 = f.parentNode !== a, r2 = !T4(f.animated && f.toRect || i, n.animated && n.toRect || u, y), C2 = y ? "top" : "left", u2 = S1(n, "top", "top") || S1(f, "top", "top"), L2 = u2 ? u2.scrollTop : void 0;
|
|
860
|
+
t0 !== n && (x2 = u[C2], x0 = !1, y0 = !r2 && p.invertSwap || D2), K = R4(e, n, u, y, r2 ? 1 : p.swapThreshold, p.invertedSwapThreshold == null ? p.swapThreshold : p.invertedSwapThreshold, y0, t0 === n);
|
|
861
861
|
var A;
|
|
862
862
|
if (K !== 0) {
|
|
863
|
-
var M =
|
|
863
|
+
var M = b2(f);
|
|
864
864
|
do
|
|
865
865
|
M -= K, A = G.children[M];
|
|
866
866
|
while (A && (V(A, "display") === "none" || A === S));
|
|
@@ -870,9 +870,9 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
870
870
|
t0 = n, g0 = K;
|
|
871
871
|
var W = n.nextElementSibling, q = !1;
|
|
872
872
|
q = K === 1;
|
|
873
|
-
var
|
|
874
|
-
if (
|
|
875
|
-
return (
|
|
873
|
+
var M2 = A0(U, a, f, i, n, u, e, q);
|
|
874
|
+
if (M2 !== !1)
|
|
875
|
+
return (M2 === 1 || M2 === -1) && (q = M2 === 1), r1 = !0, setTimeout(P4, 30), X(), q && !W ? a.appendChild(f) : n.parentNode.insertBefore(f, q ? W : n), u2 && U1(u2, 0, L2 - u2.scrollTop), G = f.parentNode, x2 !== void 0 && !y0 && (T0 = Math.abs(x2 - e2(n)[C2])), $(), R(!0);
|
|
876
876
|
}
|
|
877
877
|
if (a.contains(f))
|
|
878
878
|
return R(!1);
|
|
@@ -889,9 +889,9 @@ H.prototype = /** @lends Sortable.prototype */
|
|
|
889
889
|
},
|
|
890
890
|
_onDrop: function(e) {
|
|
891
891
|
var a = this.el, n = this.options;
|
|
892
|
-
if (v2 =
|
|
892
|
+
if (v2 = b2(f), R2 = b2(f, n.draggable), p2("drop", this, {
|
|
893
893
|
evt: e
|
|
894
|
-
}), G = f && f.parentNode, v2 =
|
|
894
|
+
}), G = f && f.parentNode, v2 = b2(f), R2 = b2(f, n.draggable), H.eventCanceled) {
|
|
895
895
|
this._nulling();
|
|
896
896
|
return;
|
|
897
897
|
}
|
|
@@ -1077,7 +1077,7 @@ function R4(t, e, a, n, i, u, c, p) {
|
|
|
1077
1077
|
return w = w || c, w && (_ < d + m * u / 2 || _ > h - m * u / 2) ? _ > d + m / 2 ? 1 : -1 : 0;
|
|
1078
1078
|
}
|
|
1079
1079
|
function q4(t) {
|
|
1080
|
-
return
|
|
1080
|
+
return b2(f) < b2(t) ? 1 : -1;
|
|
1081
1081
|
}
|
|
1082
1082
|
function j4(t) {
|
|
1083
1083
|
for (var e = t.tagName + t.className + t.src + t.href + t.textContent, a = e.length, n = 0; a--; )
|
|
@@ -1113,7 +1113,7 @@ H.utils = {
|
|
|
1113
1113
|
closest: S2,
|
|
1114
1114
|
toggleClass: d2,
|
|
1115
1115
|
clone: Y1,
|
|
1116
|
-
index:
|
|
1116
|
+
index: b2,
|
|
1117
1117
|
nextTick: k0,
|
|
1118
1118
|
cancelNextTick: n1,
|
|
1119
1119
|
detectDirection: J1,
|
|
@@ -1203,9 +1203,9 @@ var e1 = $1(function(t, e, a, n) {
|
|
|
1203
1203
|
o1 !== a && (o1 = a, F0(), _0 = e.scroll, d = e.scrollFn, _0 === !0 && (_0 = $2(a, !0)));
|
|
1204
1204
|
var h = 0, w = _0;
|
|
1205
1205
|
do {
|
|
1206
|
-
var y = w,
|
|
1207
|
-
y === _ ? (i2 = $ <
|
|
1208
|
-
var L2 = i2 && (Math.abs(R - i) <= c &&
|
|
1206
|
+
var y = w, E = e2(y), z = E.top, O = E.bottom, X = E.left, R = E.right, $ = E.width, B = E.height, i2 = void 0, K = void 0, x2 = y.scrollWidth, D2 = y.scrollHeight, r2 = V(y), C2 = y.scrollLeft, u2 = y.scrollTop;
|
|
1207
|
+
y === _ ? (i2 = $ < x2 && (r2.overflowX === "auto" || r2.overflowX === "scroll" || r2.overflowX === "visible"), K = B < D2 && (r2.overflowY === "auto" || r2.overflowY === "scroll" || r2.overflowY === "visible")) : (i2 = $ < x2 && (r2.overflowX === "auto" || r2.overflowX === "scroll"), K = B < D2 && (r2.overflowY === "auto" || r2.overflowY === "scroll"));
|
|
1208
|
+
var L2 = i2 && (Math.abs(R - i) <= c && C2 + $ < x2) - (Math.abs(X - i) <= c && !!C2), A = K && (Math.abs(O - u) <= c && u2 + B < D2) - (Math.abs(z - u) <= c && !!u2);
|
|
1209
1209
|
if (!Z[h])
|
|
1210
1210
|
for (var M = 0; M <= h; M++)
|
|
1211
1211
|
Z[M] || (Z[M] = {});
|
|
@@ -6409,13 +6409,13 @@ function c1(t) {
|
|
|
6409
6409
|
}
|
|
6410
6410
|
return e;
|
|
6411
6411
|
}
|
|
6412
|
-
const
|
|
6412
|
+
const w2 = F({
|
|
6413
6413
|
components: []
|
|
6414
6414
|
// 顶级组件列表,支持嵌套 children
|
|
6415
6415
|
});
|
|
6416
6416
|
let U2 = {};
|
|
6417
6417
|
function B0(t) {
|
|
6418
|
-
|
|
6418
|
+
w2.value.components = JSON.parse(JSON.stringify(t));
|
|
6419
6419
|
}
|
|
6420
6420
|
function F5(t) {
|
|
6421
6421
|
const e = t.originalEvent.dataTransfer.getData("type"), a = t.to.closest("[data-id]");
|
|
@@ -6445,10 +6445,10 @@ function F5(t) {
|
|
|
6445
6445
|
};
|
|
6446
6446
|
}
|
|
6447
6447
|
if (a) {
|
|
6448
|
-
const c = a.dataset.id, p = i1(
|
|
6448
|
+
const c = a.dataset.id, p = i1(w2.value.components, c);
|
|
6449
6449
|
p && p.children.splice(t.newIndex, 0, u);
|
|
6450
6450
|
} else
|
|
6451
|
-
|
|
6451
|
+
w2.value.components[t.newIndex] ? w2.value.components.splice(t.newIndex, 0, u) : w2.value.components.push(u);
|
|
6452
6452
|
(e === "ElCard" || e === "ElTabs" || e === "GridComponent" || e === "DivComponent" || e === "ElRow") && T2(() => {
|
|
6453
6453
|
var c;
|
|
6454
6454
|
(c = u.children) != null && c.length ? u.children.forEach((p) => Y2({ id: p.id })) : Y2({ id: u.id });
|
|
@@ -6460,7 +6460,7 @@ function u4(t) {
|
|
|
6460
6460
|
console.error("itemId 为空");
|
|
6461
6461
|
return;
|
|
6462
6462
|
}
|
|
6463
|
-
const a = t.from.closest("[data-id]"), n = t.to.closest("[data-id]"), i = (a == null ? void 0 : a.dataset.id) || null, u = (n == null ? void 0 : n.dataset.id) || null, c = i ? i1(
|
|
6463
|
+
const a = t.from.closest("[data-id]"), n = t.to.closest("[data-id]"), i = (a == null ? void 0 : a.dataset.id) || null, u = (n == null ? void 0 : n.dataset.id) || null, c = i ? i1(w2.value.components, i) : { children: w2.value.components }, p = u ? i1(w2.value.components, u) : { children: w2.value.components };
|
|
6464
6464
|
let [_] = c.children.splice(t.oldDraggableIndex, 1);
|
|
6465
6465
|
p.children.splice(t.newIndex, 0, _), _.componentName === "ElCard" || _.componentName === "ElTabs" || _.componentName === "GridComponent" || _.componentName === "DivComponent" || _.componentName === "ElRow" ? T2(() => {
|
|
6466
6466
|
var d;
|
|
@@ -6502,7 +6502,7 @@ function Y2({ id: t = "", el: e = null, componentJSON: a = null }) {
|
|
|
6502
6502
|
function O5() {
|
|
6503
6503
|
return {
|
|
6504
6504
|
initSortable: Y2,
|
|
6505
|
-
schema:
|
|
6505
|
+
schema: w2
|
|
6506
6506
|
};
|
|
6507
6507
|
}
|
|
6508
6508
|
function P5() {
|
|
@@ -6736,7 +6736,7 @@ function u1(t, e) {
|
|
|
6736
6736
|
...a.props,
|
|
6737
6737
|
class: ((n = a.props) == null ? void 0 : n.class) || ""
|
|
6738
6738
|
}, u = a[e] ? u1(a[e]) : void 0;
|
|
6739
|
-
return
|
|
6739
|
+
return g2(
|
|
6740
6740
|
F2[a.componentName] || a.componentName,
|
|
6741
6741
|
i,
|
|
6742
6742
|
u || a.label
|
|
@@ -6759,7 +6759,7 @@ function J5(t, e) {
|
|
|
6759
6759
|
function X5(t) {
|
|
6760
6760
|
return t.icon ? {
|
|
6761
6761
|
...t,
|
|
6762
|
-
icon:
|
|
6762
|
+
icon: g2(U5, { icon: t.icon, ...t.iconStyle, class: t.class })
|
|
6763
6763
|
} : t;
|
|
6764
6764
|
}
|
|
6765
6765
|
function K5(t, e, a) {
|
|
@@ -6781,25 +6781,25 @@ function K5(t, e, a) {
|
|
|
6781
6781
|
return u.length > 0 && (c.default = C(() => u.map(e), a)), c;
|
|
6782
6782
|
}
|
|
6783
6783
|
function Q5(t, e, a) {
|
|
6784
|
-
return
|
|
6784
|
+
return g2("div", {
|
|
6785
6785
|
key: t.id,
|
|
6786
6786
|
class: "drop-item drop-item-card",
|
|
6787
6787
|
"data-id": t.id,
|
|
6788
6788
|
"data-component": t.componentName
|
|
6789
6789
|
}, [
|
|
6790
|
-
|
|
6790
|
+
g2(F2[t.componentName], e, {
|
|
6791
6791
|
...a,
|
|
6792
6792
|
[t.staticChildren[0].slot]: () => u1(t.staticChildren, "staticChildren")
|
|
6793
6793
|
})
|
|
6794
6794
|
]);
|
|
6795
6795
|
}
|
|
6796
|
-
function Z5(t, e, a) {
|
|
6797
|
-
return
|
|
6798
|
-
default: () =>
|
|
6796
|
+
function Z5(t, e, a, n) {
|
|
6797
|
+
return g2(p4, { componentData: t, key: t.id }, {
|
|
6798
|
+
default: C(() => [g2($5, { isPreview: a, ...t.props }, e)], n)
|
|
6799
6799
|
});
|
|
6800
6800
|
}
|
|
6801
6801
|
function e9(t, e, a) {
|
|
6802
|
-
return
|
|
6802
|
+
return g2(q5, { isPreview: a, ...t.props }, e);
|
|
6803
6803
|
}
|
|
6804
6804
|
function z1({ isPreview: t = !1, callback: e } = {}) {
|
|
6805
6805
|
const a = t ? L.previewFormData : L.formData, n = t ? "SET_PREVIEW_FORM_DATA" : "SET_FORM_DATA";
|
|
@@ -6807,27 +6807,32 @@ function z1({ isPreview: t = !1, callback: e } = {}) {
|
|
|
6807
6807
|
var $;
|
|
6808
6808
|
const { id: p, componentName: _, props: m = {}, on: d = {}, children: h, parentId: w } = c, y = O1(p);
|
|
6809
6809
|
(!w || _ === "ElCol") && j2.SET_COMPONENT_DATA_MAP(p, c), _ === "ElFormItem" && m.rules && !t && L.SET_FORM_RULES(O1(($ = h == null ? void 0 : h[0]) == null ? void 0 : $.id), m.rules), P1(_) && !(y in a.value) && L[n](y, J5(_, h));
|
|
6810
|
-
let
|
|
6811
|
-
if (_ === "ElRow" && !t && (
|
|
6810
|
+
let E = X5({ ...m });
|
|
6811
|
+
if (_ === "ElRow" && !t && (E.class = "el-row-border"), ["ElTabPane", "ElCol", "ElRow"].includes(_) && (E["data-id"] = p), P1(_)) {
|
|
6812
6812
|
const B = G5[_] ?? "modelValue";
|
|
6813
|
-
|
|
6813
|
+
E[B] = a.value[y], E[`onUpdate:${B}`] = (i2) => L[n](y, i2);
|
|
6814
6814
|
}
|
|
6815
|
-
const
|
|
6815
|
+
const z = d4(), O = K5(c, i, z);
|
|
6816
6816
|
if (_ === "ElCard")
|
|
6817
|
-
return Q5(c,
|
|
6817
|
+
return Q5(c, E, O);
|
|
6818
6818
|
if (_ === "GridComponent")
|
|
6819
|
-
return Z5(c, O, t);
|
|
6819
|
+
return Z5(c, O, t, z);
|
|
6820
6820
|
if (_ === "DivComponent") {
|
|
6821
6821
|
const B = e9(c, O, t);
|
|
6822
|
-
return u(c, _, { default: () => B });
|
|
6822
|
+
return u(c, _, { default: () => B }, z);
|
|
6823
6823
|
}
|
|
6824
|
-
const X =
|
|
6824
|
+
const X = g2(F2[_] ?? _, { key: p, ...E, ...d }, O);
|
|
6825
6825
|
e == null || e(_, y, X);
|
|
6826
6826
|
const R = { default: () => X };
|
|
6827
|
-
return u(c, c.componentName, R);
|
|
6827
|
+
return u(c, c.componentName, R, z);
|
|
6828
6828
|
}
|
|
6829
|
-
function u(c, p, _) {
|
|
6830
|
-
return W5.includes(c.componentName) && !c.parentId ?
|
|
6829
|
+
function u(c, p, _, m) {
|
|
6830
|
+
return W5.includes(c.componentName) && !c.parentId ? g2(p4, {
|
|
6831
|
+
componentData: { ...c, componentName: p },
|
|
6832
|
+
key: c.id
|
|
6833
|
+
}, {
|
|
6834
|
+
default: C(() => [_.default()], m)
|
|
6835
|
+
}) : _.default();
|
|
6831
6836
|
}
|
|
6832
6837
|
return i;
|
|
6833
6838
|
}
|
|
@@ -6974,8 +6979,8 @@ const t9 = [
|
|
|
6974
6979
|
},
|
|
6975
6980
|
setup(t, { expose: e }) {
|
|
6976
6981
|
e({ reset: i2, select: B });
|
|
6977
|
-
const a = t, n = F(""), i = F(null), u = F(!1), c = F(null), p = F(null), _ = F([]), m = F([]), d = F([]), h = F(!1), w = F(!1), y = ["ElTabs"],
|
|
6978
|
-
let
|
|
6982
|
+
const a = t, n = F(""), i = F(null), u = F(!1), c = F(null), p = F(null), _ = F([]), m = F([]), d = F([]), h = F(!1), w = F(!1), y = ["ElTabs"], E = ["ElCard", "ElButton", "ElDivider", "GridComponent", "DivComponent", "ElCol", "ElRow", "ElText"];
|
|
6983
|
+
let z = !1;
|
|
6979
6984
|
const O = Q2(() => c.value ? !c.value.noUseForm : !1), X = Q2(() => (v) => {
|
|
6980
6985
|
if (p.value.componentName === "ElUpload") {
|
|
6981
6986
|
if (v.name === "提示内容")
|
|
@@ -6998,11 +7003,11 @@ const t9 = [
|
|
|
6998
7003
|
}), R = Q2(() => (v) => p.value.componentName === "ElUpload" && v.key === "text" ? p.value.children[0].props : p.value.props), $ = Q2(() => (v) => p.value.componentName === "ElUpload" && v.key === "fontSize" ? p.value.children[0].props.iconStyle : p.value.props);
|
|
6999
7004
|
function B(v) {
|
|
7000
7005
|
var x, T;
|
|
7001
|
-
if (h.value = v.componentName === "ElTable", w.value = v.componentName === "ElRow",
|
|
7006
|
+
if (h.value = v.componentName === "ElTable", w.value = v.componentName === "ElRow", z = v.componentName === "ElTabs", _.value = [], c.value = v, p.value = E.indexOf(v.componentName) > -1 || h.value ? c.value : c.value.children[0], v.props && (n.value = v.props.label, i.value = v.props["label-width"], u.value = ((x = v.props.rules) == null ? void 0 : x.required) || !1), d.value = [], m.value = [], v.children && v.children[0] && ((T = v.children[0]) == null ? void 0 : T.componentName) !== "ElUpload" && !v.parentId) {
|
|
7002
7007
|
let j;
|
|
7003
7008
|
y.indexOf(v.componentName) > -1 || h.value || w.value ? j = v.children : v.componentName === "ElFormItem" && (j = v.children[0].children), m.value = (j || []).map((N, a2) => (d.value[a2] = w.value ? N.props.span : N.props.label, N.props));
|
|
7004
7009
|
}
|
|
7005
|
-
(O.value && v.children[0] ||
|
|
7010
|
+
(O.value && v.children[0] || E.indexOf(p.value.componentName) > -1 || h.value) && (_.value = f9[`${p.value.componentName}ConfigProps`]);
|
|
7006
7011
|
}
|
|
7007
7012
|
function i2() {
|
|
7008
7013
|
n.value = "", u.value = !1, c.value = null, _.value = [], m.value = [], h.value = !1, w.value = !1;
|
|
@@ -7010,7 +7015,7 @@ const t9 = [
|
|
|
7010
7015
|
function K() {
|
|
7011
7016
|
h && (n0.SET_TABLE_DATA(p.value.props.data), n0.SET_TABLE_DATA_KEYS(c.value.children.map((v) => v.props.prop)));
|
|
7012
7017
|
}
|
|
7013
|
-
function
|
|
7018
|
+
function x2(v) {
|
|
7014
7019
|
c.value.props.label = v;
|
|
7015
7020
|
}
|
|
7016
7021
|
function D2(v) {
|
|
@@ -7038,7 +7043,7 @@ const t9 = [
|
|
|
7038
7043
|
a.formRef.resetFields();
|
|
7039
7044
|
}));
|
|
7040
7045
|
}
|
|
7041
|
-
function
|
|
7046
|
+
function C2(v) {
|
|
7042
7047
|
var j, N, a2;
|
|
7043
7048
|
const x = v.key, T = ((a2 = (N = (j = c.value) == null ? void 0 : j.children) == null ? void 0 : N[0]) == null ? void 0 : a2.props) || {};
|
|
7044
7049
|
return x === "multiple-limit" || x === "collapse-tags" ? T.multiple === !0 : x === "unlink-panels" || x === "range-separator" ? T.type === "daterange" || T.type === "datetimerange" : x === "show-password" ? T.type === "password" : x === "maxlength" || x === "show-word-limit" ? T.type === "textarea" : !0;
|
|
@@ -7084,17 +7089,17 @@ const t9 = [
|
|
|
7084
7089
|
}));
|
|
7085
7090
|
}
|
|
7086
7091
|
function W(v) {
|
|
7087
|
-
h.value ||
|
|
7092
|
+
h.value || z || w.value ? c.value.children.splice(v, 1) : c.value.children[0].children.splice(v, 1), m.value.splice(v, 1), d.value.splice(v, 1), y2();
|
|
7088
7093
|
}
|
|
7089
7094
|
function q(v, x, T) {
|
|
7090
7095
|
const j = v[x];
|
|
7091
7096
|
v.splice(x, 1, v[T]), v.splice(T, 1, j);
|
|
7092
7097
|
}
|
|
7093
|
-
function
|
|
7094
|
-
q(m.value, v, v - 1), q(d.value, v, v - 1), q(
|
|
7098
|
+
function M2(v) {
|
|
7099
|
+
q(m.value, v, v - 1), q(d.value, v, v - 1), q(z || h.value ? c.value.children : c.value.children[0].children, v, v - 1), y2(), K();
|
|
7095
7100
|
}
|
|
7096
7101
|
function h2(v) {
|
|
7097
|
-
q(m.value, v, v + 1), q(d.value, v, v + 1), q(
|
|
7102
|
+
q(m.value, v, v + 1), q(d.value, v, v + 1), q(z || h.value ? c.value.children : c.value.children[0].children, v, v + 1), y2(), K();
|
|
7098
7103
|
}
|
|
7099
7104
|
function I2(v, x) {
|
|
7100
7105
|
m.value[x].label = v, y2();
|
|
@@ -7111,17 +7116,17 @@ const t9 = [
|
|
|
7111
7116
|
console.error("当前组件 length 为 0");
|
|
7112
7117
|
return;
|
|
7113
7118
|
}
|
|
7114
|
-
const v =
|
|
7119
|
+
const v = z || h.value ? c.value.children : (s0 = c.value.children[0]) == null ? void 0 : s0.children;
|
|
7115
7120
|
if (!v) {
|
|
7116
7121
|
console.error("目标children不存在");
|
|
7117
7122
|
return;
|
|
7118
7123
|
}
|
|
7119
7124
|
const x = (/* @__PURE__ */ new Date()).getTime(), T = {
|
|
7120
7125
|
label: "New Option",
|
|
7121
|
-
...
|
|
7126
|
+
...z ? { name: x } : { [h.value ? "prop" : "value"]: x.toString() }
|
|
7122
7127
|
};
|
|
7123
7128
|
(i0 = (G2 = c.value.children[0]) == null ? void 0 : G2.props) != null && i0.border && (T.border = !0);
|
|
7124
|
-
const j =
|
|
7129
|
+
const j = z || h.value ? c.value.children[0].componentName : (H0 = (c0 = c.value.children[0]) == null ? void 0 : c0.children[0]) == null ? void 0 : H0.componentName;
|
|
7125
7130
|
if (!j) {
|
|
7126
7131
|
console.error("无法确定组件类型");
|
|
7127
7132
|
return;
|
|
@@ -7131,9 +7136,9 @@ const t9 = [
|
|
|
7131
7136
|
id: b0(),
|
|
7132
7137
|
parentId: c.value.componentName === "ElFormItem" ? c.value.children[0].id : c.value.id,
|
|
7133
7138
|
props: T,
|
|
7134
|
-
...
|
|
7139
|
+
...z ? { children: [] } : {}
|
|
7135
7140
|
};
|
|
7136
|
-
v.push(t1({ ...N })), m.value && (d.value[d.value.length] = T.label, m.value.push(T)),
|
|
7141
|
+
v.push(t1({ ...N })), m.value && (d.value[d.value.length] = T.label, m.value.push(T)), z && T2(() => {
|
|
7137
7142
|
var b;
|
|
7138
7143
|
(b = a.initSortable) == null || b.call(a, { id: N.id });
|
|
7139
7144
|
}), y2();
|
|
@@ -7178,7 +7183,7 @@ const t9 = [
|
|
|
7178
7183
|
g(j, {
|
|
7179
7184
|
modelValue: n.value,
|
|
7180
7185
|
"onUpdate:modelValue": x[0] || (x[0] = (b) => n.value = b),
|
|
7181
|
-
onChange:
|
|
7186
|
+
onChange: x2
|
|
7182
7187
|
}, null, 8, ["modelValue"])
|
|
7183
7188
|
]),
|
|
7184
7189
|
_: 1
|
|
@@ -7241,7 +7246,7 @@ const t9 = [
|
|
|
7241
7246
|
[d0, _.value && _.value.length]
|
|
7242
7247
|
]),
|
|
7243
7248
|
(o(!0), l(V2, null, u0(_.value, (b) => (o(), l(V2, null, [
|
|
7244
|
-
|
|
7249
|
+
C2(b) ? (o(), J(N, {
|
|
7245
7250
|
key: 0,
|
|
7246
7251
|
label: b.name
|
|
7247
7252
|
}, v4({
|
|
@@ -7411,7 +7416,7 @@ const t9 = [
|
|
|
7411
7416
|
}, 1032, ["onClick"]),
|
|
7412
7417
|
P !== 0 ? (o(), J(a2, {
|
|
7413
7418
|
key: 0,
|
|
7414
|
-
onClick: (n2) =>
|
|
7419
|
+
onClick: (n2) => M2(P),
|
|
7415
7420
|
title: "上移"
|
|
7416
7421
|
}, {
|
|
7417
7422
|
default: C(() => [
|
|
@@ -7462,7 +7467,7 @@ const t9 = [
|
|
|
7462
7467
|
]);
|
|
7463
7468
|
};
|
|
7464
7469
|
}
|
|
7465
|
-
}, C9 = /* @__PURE__ */ N2(x9, [["__scopeId", "data-v-
|
|
7470
|
+
}, C9 = /* @__PURE__ */ N2(x9, [["__scopeId", "data-v-03d43955"]]), M9 = {
|
|
7466
7471
|
__name: "setForm",
|
|
7467
7472
|
emits: ["inlineChange"],
|
|
7468
7473
|
setup(t, { expose: e, emit: a }) {
|
|
@@ -7483,10 +7488,10 @@ const t9 = [
|
|
|
7483
7488
|
n("inlineChange", h);
|
|
7484
7489
|
}
|
|
7485
7490
|
return (h, w) => {
|
|
7486
|
-
const y = I("el-icon"),
|
|
7491
|
+
const y = I("el-icon"), E = I("el-input-number"), z = I("el-form-item"), O = I("el-radio"), X = I("el-radio-group"), R = I("el-switch"), $ = I("el-form");
|
|
7487
7492
|
return o(), J($, { "label-width": "100px" }, {
|
|
7488
7493
|
default: C(() => [
|
|
7489
|
-
g(
|
|
7494
|
+
g(z, null, {
|
|
7490
7495
|
label: C(() => [
|
|
7491
7496
|
w[3] || (w[3] = m2(" 标签宽度 ")),
|
|
7492
7497
|
g(y, {
|
|
@@ -7500,7 +7505,7 @@ const t9 = [
|
|
|
7500
7505
|
})
|
|
7501
7506
|
]),
|
|
7502
7507
|
default: C(() => [
|
|
7503
|
-
g(
|
|
7508
|
+
g(E, {
|
|
7504
7509
|
modelValue: u.value,
|
|
7505
7510
|
"onUpdate:modelValue": w[0] || (w[0] = (B) => u.value = B),
|
|
7506
7511
|
min: 0,
|
|
@@ -7512,7 +7517,7 @@ const t9 = [
|
|
|
7512
7517
|
]),
|
|
7513
7518
|
_: 1
|
|
7514
7519
|
}),
|
|
7515
|
-
g(
|
|
7520
|
+
g(z, { label: "标签文本对齐" }, {
|
|
7516
7521
|
default: C(() => [
|
|
7517
7522
|
g(X, {
|
|
7518
7523
|
modelValue: i.value,
|
|
@@ -7544,7 +7549,7 @@ const t9 = [
|
|
|
7544
7549
|
]),
|
|
7545
7550
|
_: 1
|
|
7546
7551
|
}),
|
|
7547
|
-
g(
|
|
7552
|
+
g(z, { label: "表单内联" }, {
|
|
7548
7553
|
default: C(() => [
|
|
7549
7554
|
g(R, {
|
|
7550
7555
|
modelValue: c.value,
|
|
@@ -7569,11 +7574,12 @@ const t9 = [
|
|
|
7569
7574
|
let c = null;
|
|
7570
7575
|
function p() {
|
|
7571
7576
|
a.value = !0, T2(() => {
|
|
7577
|
+
JSON.stringify(w2.value.components);
|
|
7572
7578
|
const h = z1({ isPreview: !0 });
|
|
7573
7579
|
c = v1({
|
|
7574
7580
|
render() {
|
|
7575
|
-
const w = JSON.parse(JSON.stringify(
|
|
7576
|
-
return
|
|
7581
|
+
const w = JSON.parse(JSON.stringify(w2.value.components));
|
|
7582
|
+
return g2(
|
|
7577
7583
|
F2.ElForm,
|
|
7578
7584
|
{
|
|
7579
7585
|
key: "preview",
|
|
@@ -7602,10 +7608,10 @@ const t9 = [
|
|
|
7602
7608
|
n.value.resetFields();
|
|
7603
7609
|
}
|
|
7604
7610
|
return (h, w) => {
|
|
7605
|
-
const y = I("el-button"),
|
|
7606
|
-
return o(), J(
|
|
7611
|
+
const y = I("el-button"), E = I("el-dialog");
|
|
7612
|
+
return o(), J(E, {
|
|
7607
7613
|
modelValue: a.value,
|
|
7608
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
7614
|
+
"onUpdate:modelValue": w[0] || (w[0] = (z) => a.value = z),
|
|
7609
7615
|
title: "预览",
|
|
7610
7616
|
style: { height: "100%", margin: "0" },
|
|
7611
7617
|
width: "100%",
|
|
@@ -7640,7 +7646,7 @@ const t9 = [
|
|
|
7640
7646
|
}, 8, ["modelValue"]);
|
|
7641
7647
|
};
|
|
7642
7648
|
}
|
|
7643
|
-
}, H9 = /* @__PURE__ */ N2(E9, [["__scopeId", "data-v-
|
|
7649
|
+
}, H9 = /* @__PURE__ */ N2(E9, [["__scopeId", "data-v-61d660b4"]]), V9 = { class: "header" }, y9 = {
|
|
7644
7650
|
__name: "headerComponent",
|
|
7645
7651
|
props: {
|
|
7646
7652
|
json: [Object, Array]
|
|
@@ -8330,13 +8336,13 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8330
8336
|
p1.forEach((A) => {
|
|
8331
8337
|
A.componentName && (a[A.componentName] = A);
|
|
8332
8338
|
}), c4.SET_COMPONENT_MAP(a);
|
|
8333
|
-
const n = F("first"), i = F("first"), u = F(null), c = F(null), p = F(null), _ = F(null), m = F(null), d = F(null), h = F(!1), w = F(!1), y = F(C0.teleportTo.value),
|
|
8339
|
+
const n = F("first"), i = F("first"), u = F(null), c = F(null), p = F(null), _ = F(null), m = F(null), d = F(null), h = F(!1), w = F(!1), y = F(C0.teleportTo.value), E = L.formData, z = L.rules;
|
|
8334
8340
|
let O = null, X = !0, R = !1, $ = null;
|
|
8335
8341
|
const B = t;
|
|
8336
8342
|
a1(C0.teleportTo, (A) => {
|
|
8337
8343
|
y.value = A;
|
|
8338
8344
|
}), a1(() => B.data, () => {
|
|
8339
|
-
|
|
8345
|
+
x2();
|
|
8340
8346
|
});
|
|
8341
8347
|
const {
|
|
8342
8348
|
initSortable: i2,
|
|
@@ -8377,17 +8383,17 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8377
8383
|
render() {
|
|
8378
8384
|
B.data && B.data.forms && X === !0 && (B0(B.data.forms), X = !1);
|
|
8379
8385
|
const M = K.value.components;
|
|
8380
|
-
return
|
|
8386
|
+
return g2(
|
|
8381
8387
|
F2.ElForm,
|
|
8382
8388
|
{
|
|
8383
8389
|
ref: _,
|
|
8384
|
-
model:
|
|
8385
|
-
rules:
|
|
8390
|
+
model: E,
|
|
8391
|
+
rules: z,
|
|
8386
8392
|
...L.formOptions
|
|
8387
8393
|
},
|
|
8388
8394
|
{
|
|
8389
8395
|
default: () => [
|
|
8390
|
-
|
|
8396
|
+
g2("div", {
|
|
8391
8397
|
ref: p,
|
|
8392
8398
|
class: "drop-zone-box",
|
|
8393
8399
|
onClick: D2
|
|
@@ -8399,28 +8405,28 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8399
8405
|
);
|
|
8400
8406
|
}
|
|
8401
8407
|
}).use(F2, { locale: C1 }), $.mount("#canvas-drop"), T2(() => {
|
|
8402
|
-
|
|
8408
|
+
x2();
|
|
8403
8409
|
});
|
|
8404
8410
|
}), f4(() => {
|
|
8405
8411
|
B0([]), L.CLEAR_ALL(), $.unmount();
|
|
8406
8412
|
});
|
|
8407
|
-
function
|
|
8413
|
+
function x2() {
|
|
8408
8414
|
P5(), R = !0, L.CLEAR_ALL(), c.value && c.value.init(L.formOptions), B.data && B.data.forms ? (L.SET_FORM_OPTIONS_INIT(B.data.formOptions.inline), L.SET_FORM_OPTIONS(B.data.formOptions), B0(B.data.forms)) : B0([]);
|
|
8409
8415
|
}
|
|
8410
8416
|
function D2(A) {
|
|
8411
8417
|
var h2, I2;
|
|
8412
8418
|
const M = A.target.closest(".drop-item"), W = O0();
|
|
8413
8419
|
if (W && W.classList.remove("selected-component"), !M) {
|
|
8414
|
-
|
|
8420
|
+
C2();
|
|
8415
8421
|
return;
|
|
8416
8422
|
}
|
|
8417
8423
|
k5(M), M.classList.add("selected-component");
|
|
8418
8424
|
const q = j2.componentDataMap;
|
|
8419
8425
|
O = q[M.dataset.id], d.value.select(q[M.dataset.id]), w.value = O.componentName === "ElCol", y2();
|
|
8420
|
-
const
|
|
8421
|
-
if (A.target.parentElement.tagName !== "TH" && A.target.tagName !== "TH" && A.target.tagName !== "SVG" && (((I2 = A.target.className) == null ? void 0 : I2.indexOf("el-table__cell")) > -1 ||
|
|
8426
|
+
const M2 = ((h2 = A == null ? void 0 : A.target) == null ? void 0 : h2.className) === "cell";
|
|
8427
|
+
if (A.target.parentElement.tagName !== "TH" && A.target.tagName !== "TH" && A.target.tagName !== "SVG" && (((I2 = A.target.className) == null ? void 0 : I2.indexOf("el-table__cell")) > -1 || M2)) {
|
|
8422
8428
|
let z2;
|
|
8423
|
-
|
|
8429
|
+
M2 ? z2 = A.target : z2 = A.target.querySelector(".cell");
|
|
8424
8430
|
let Q = document.createElement("input");
|
|
8425
8431
|
Q.style.width = "100%", Q.style.height = "100%", Q.style.boxSizing = "border-box", Q.style.border = "1px solid rgba(0, 0, 0, 0.1)", Q.style.outline = "none", Q.style.minHeight = "21px", z2.innerText !== "" && (Q.value = z2.innerText, n0.SET_TABLE_DATA(O.props.data), n0.SET_TABLE_DATA_KEYS(O.children.map((t2) => t2.props.prop)), n0.SET_TABLE_DATA_ITEM(A.target.closest("tr").rowIndex, A.target.closest("td").cellIndex, "")), z2.appendChild(Q), Q.focus(), Q.onblur = () => {
|
|
8426
8432
|
n0.SET_TABLE_DATA_ITEM(A.target.closest("tr").rowIndex, A.target.closest("td").cellIndex, Q.value), z2.removeChild(Q), Q = null;
|
|
@@ -8430,7 +8436,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8430
8436
|
function r2(A) {
|
|
8431
8437
|
h.value = A;
|
|
8432
8438
|
}
|
|
8433
|
-
function
|
|
8439
|
+
function C2(A = null) {
|
|
8434
8440
|
A !== null && L.SET_FORM_OPTIONS_INIT(A);
|
|
8435
8441
|
const M = O0();
|
|
8436
8442
|
M && (M.classList.remove("selected-component"), C0.SET_TELEPORT_TO(null), d.value.reset());
|
|
@@ -8438,15 +8444,15 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8438
8444
|
function u2(A) {
|
|
8439
8445
|
var W;
|
|
8440
8446
|
let M = A;
|
|
8441
|
-
A || (M = O, O0().remove(), s4(K.value.components, M.id),
|
|
8447
|
+
A || (M = O, O0().remove(), s4(K.value.components, M.id), C2()), delete j2.componentDataMap[M.id], (W = M.children) != null && W[0] && (delete j2.componentDataMap[M.children[0].id], (M.componentName === "ElFormItem" || M.componentName === "ElTabs") && (L.DELETE_FORM_DATA(M.props.prop || `field${M.id}`), L.DELETE_RULES(M.props.prop))), M.componentName === "ElUpload" && W2.DELETE_STYLES(`${M.children[0].props.class} ::v-deep(.el-icon)`), M.children && M.children.length && M.children.forEach((q) => {
|
|
8442
8448
|
u2(q);
|
|
8443
8449
|
});
|
|
8444
8450
|
}
|
|
8445
8451
|
function L2() {
|
|
8446
|
-
K.value.components = [], L.CLEAR_ALL(), j2.componentDataMap = {}, c.value.init(L.formOptions),
|
|
8452
|
+
K.value.components = [], L.CLEAR_ALL(), j2.componentDataMap = {}, c.value.init(L.formOptions), C2();
|
|
8447
8453
|
}
|
|
8448
8454
|
return (A, M) => {
|
|
8449
|
-
const W = I("el-icon"), q = I("el-tab-pane"),
|
|
8455
|
+
const W = I("el-icon"), q = I("el-tab-pane"), M2 = I("el-tabs"), h2 = I("el-aside"), I2 = I("el-header"), z2 = I("el-main"), Q = I("el-container");
|
|
8450
8456
|
return o(), J(Q, { style: { position: "relative" } }, {
|
|
8451
8457
|
default: C(() => [
|
|
8452
8458
|
y.value ? (o(), J(w4, {
|
|
@@ -8486,7 +8492,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8486
8492
|
class: "panel"
|
|
8487
8493
|
}, {
|
|
8488
8494
|
default: C(() => [
|
|
8489
|
-
g(
|
|
8495
|
+
g(M2, {
|
|
8490
8496
|
modelValue: n.value,
|
|
8491
8497
|
"onUpdate:modelValue": M[1] || (M[1] = (t2) => n.value = t2)
|
|
8492
8498
|
}, {
|
|
@@ -8545,7 +8551,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8545
8551
|
class: "editor-panel"
|
|
8546
8552
|
}, {
|
|
8547
8553
|
default: C(() => [
|
|
8548
|
-
g(
|
|
8554
|
+
g(M2, {
|
|
8549
8555
|
modelValue: i.value,
|
|
8550
8556
|
"onUpdate:modelValue": M[2] || (M[2] = (t2) => i.value = t2)
|
|
8551
8557
|
}, {
|
|
@@ -8575,7 +8581,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8575
8581
|
h0(g(b9, {
|
|
8576
8582
|
ref_key: "setFormRef",
|
|
8577
8583
|
ref: c,
|
|
8578
|
-
onInlineChange:
|
|
8584
|
+
onInlineChange: C2
|
|
8579
8585
|
}, null, 512), [
|
|
8580
8586
|
[d0, i.value === "form"]
|
|
8581
8587
|
])
|
|
@@ -8593,7 +8599,8 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8593
8599
|
props: {
|
|
8594
8600
|
data: { type: Object, required: !0, default: () => ({}) },
|
|
8595
8601
|
variables: { type: Object, required: !0 },
|
|
8596
|
-
callback: { type: Function }
|
|
8602
|
+
callback: { type: Function },
|
|
8603
|
+
disabled: { type: Boolean, default: !1 }
|
|
8597
8604
|
},
|
|
8598
8605
|
setup(t, { expose: e }) {
|
|
8599
8606
|
const a = t, n = F(null), i = L.previewFormData, u = L.rules;
|
|
@@ -8605,14 +8612,15 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8605
8612
|
const c = z1({ isPreview: !0, callback: a.callback });
|
|
8606
8613
|
v1({
|
|
8607
8614
|
render() {
|
|
8608
|
-
return
|
|
8615
|
+
return g2(
|
|
8609
8616
|
F2.ElForm,
|
|
8610
8617
|
{
|
|
8611
8618
|
ref: n,
|
|
8612
8619
|
model: i,
|
|
8613
8620
|
rules: u,
|
|
8614
8621
|
// ...formStore.formOptions
|
|
8615
|
-
...a.data.formOptions
|
|
8622
|
+
...a.data.formOptions,
|
|
8623
|
+
disabled: a.disabled
|
|
8616
8624
|
},
|
|
8617
8625
|
{
|
|
8618
8626
|
default: () => (a.data.forms || []).map((_) => (j2.SET_COMPONENT_DATA_MAP(_.id, _), c(_)))
|
|
@@ -8622,7 +8630,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8622
8630
|
}).use(F2, { locale: C1 }).mount("#preview-panel");
|
|
8623
8631
|
}), (c, p) => (o(), l("div", li));
|
|
8624
8632
|
}
|
|
8625
|
-
}, ii = /* @__PURE__ */ N2(si, [["__scopeId", "data-v-
|
|
8633
|
+
}, ii = /* @__PURE__ */ N2(si, [["__scopeId", "data-v-8fdee92e"]]), ci = { class: "low-code-form" }, ui = {
|
|
8626
8634
|
__name: "index",
|
|
8627
8635
|
props: {
|
|
8628
8636
|
isPreview: Boolean,
|
|
@@ -8634,7 +8642,8 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8634
8642
|
type: Object,
|
|
8635
8643
|
default: () => ({})
|
|
8636
8644
|
},
|
|
8637
|
-
callback: { type: Function }
|
|
8645
|
+
callback: { type: Function },
|
|
8646
|
+
disabled: { type: Boolean, default: !1 }
|
|
8638
8647
|
},
|
|
8639
8648
|
setup(t, { expose: e }) {
|
|
8640
8649
|
e({
|
|
@@ -8651,7 +8660,7 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8651
8660
|
}
|
|
8652
8661
|
function u() {
|
|
8653
8662
|
const { labelPosition: c, labelWidth: p, inline: _ } = L.formOptions, m = {};
|
|
8654
|
-
return c !== "right" && c !== "" && (m.labelPosition = c), p !== "" && p !== "auto" && (m.labelWidth = p), _ && (m.inline = _), { formOptions: m, forms:
|
|
8663
|
+
return c !== "right" && c !== "" && (m.labelPosition = c), p !== "" && p !== "auto" && (m.labelWidth = p), _ && (m.inline = _), { formOptions: m, forms: w2.value.components };
|
|
8655
8664
|
}
|
|
8656
8665
|
return (c, p) => (o(), l("div", ci, [
|
|
8657
8666
|
t.isPreview ? (o(), J(ii, {
|
|
@@ -8660,14 +8669,15 @@ const Zs = ["index.js", "imports.js"], s2 = Qs(Zs), p1 = [
|
|
|
8660
8669
|
ref: a,
|
|
8661
8670
|
data: t.data,
|
|
8662
8671
|
variables: t.variables,
|
|
8663
|
-
callback: t.callback
|
|
8664
|
-
|
|
8672
|
+
callback: t.callback,
|
|
8673
|
+
disabled: t.disabled
|
|
8674
|
+
}, null, 8, ["data", "variables", "callback", "disabled"])) : (o(), J(oi, {
|
|
8665
8675
|
key: 0,
|
|
8666
8676
|
data: t.data
|
|
8667
8677
|
}, null, 8, ["data"]))
|
|
8668
8678
|
]));
|
|
8669
8679
|
}
|
|
8670
|
-
}, mi = /* @__PURE__ */ N2(ui, [["__scopeId", "data-v-
|
|
8680
|
+
}, mi = /* @__PURE__ */ N2(ui, [["__scopeId", "data-v-d62ea7b1"]]);
|
|
8671
8681
|
export {
|
|
8672
8682
|
mi as default
|
|
8673
8683
|
};
|