gp-designer 1.0.66 → 1.0.67
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/README.md +4 -0
- package/dist/gp-designer.es.js +230 -230
- package/dist/gp-designer.umd.js +4 -4
- package/dist/spa/topic/css/style.css +2 -2
- package/dist/spa/topic/html/demo-xiaoyuan.html +29 -3
- package/dist/spa/topic/js/index.js +17 -2
- package/dist/spa/topic/js/kefu.js +24 -0
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/gp-designer.es.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent as ye, ref as $, computed as De, openBlock as G, createBlock as je, Transition as C0, withCtx as ts, createElementBlock as V, createElementVNode as T, normalizeClass as ei, renderSlot as mr, createCommentVNode as
|
1
|
+
import { defineComponent as ye, ref as $, computed as De, openBlock as G, createBlock as je, Transition as C0, withCtx as ts, createElementBlock as V, createElementVNode as T, normalizeClass as ei, renderSlot as mr, createCommentVNode as q, toDisplayString as JA, reactive as m0, createApp as w0, h as Oi, watch as zA, resolveComponent as T0, Fragment as Ot, resolveDynamicComponent as b0, mergeProps as U0, unref as cA, withModifiers as YA, createTextVNode as ia, renderList as xn, toRaw as Ho, withDirectives as Ce, vModelSelect as Fs, vModelText as ct, createVNode as Re, toRefs as Q0, onMounted as F0, nextTick as Ri, normalizeStyle as ua, vModelCheckbox as I0 } from "vue";
|
2
2
|
var uA;
|
3
3
|
(function(A) {
|
4
4
|
A.Root = "root", A.Text = "text", A.Directive = "directive", A.Comment = "comment", A.Script = "script", A.Style = "style", A.Tag = "tag", A.CDATA = "cdata", A.Doctype = "doctype";
|
@@ -173,7 +173,7 @@ class ai extends si {
|
|
173
173
|
});
|
174
174
|
}
|
175
175
|
}
|
176
|
-
function
|
176
|
+
function j(A) {
|
177
177
|
return v0(A);
|
178
178
|
}
|
179
179
|
function rs(A) {
|
@@ -200,7 +200,7 @@ function Hr(A, e = !1) {
|
|
200
200
|
t = new xr(A.data);
|
201
201
|
else if (ns(A))
|
202
202
|
t = new ri(A.data);
|
203
|
-
else if (
|
203
|
+
else if (j(A)) {
|
204
204
|
const r = e ? Is(A.children) : [], n = new ai(A.name, { ...A.attribs }, r);
|
205
205
|
r.forEach((s) => s.parent = n), A.namespace != null && (n.namespace = A.namespace), A["x-attribsNamespace"] && (n["x-attribsNamespace"] = { ...A["x-attribsNamespace"] }), A["x-attribsPrefix"] && (n["x-attribsPrefix"] = { ...A["x-attribsPrefix"] }), t = n;
|
206
206
|
} else if (rs(A)) {
|
@@ -862,7 +862,7 @@ function uf(A, e) {
|
|
862
862
|
return PA(A) ? A.children.map((t) => Go(t, e)).join("") : "";
|
863
863
|
}
|
864
864
|
function In(A) {
|
865
|
-
return Array.isArray(A) ? A.map(In).join("") :
|
865
|
+
return Array.isArray(A) ? A.map(In).join("") : j(A) ? A.name === "br" ? `
|
866
866
|
` : In(A.children) : rs(A) ? In(A.children) : Ie(A) ? A.data : "";
|
867
867
|
}
|
868
868
|
function Xt(A) {
|
@@ -901,13 +901,13 @@ function lf(A) {
|
|
901
901
|
}
|
902
902
|
function oi(A) {
|
903
903
|
let { next: e } = A;
|
904
|
-
for (; e !== null && !
|
904
|
+
for (; e !== null && !j(e); )
|
905
905
|
({ next: e } = e);
|
906
906
|
return e;
|
907
907
|
}
|
908
908
|
function ci(A) {
|
909
909
|
let { prev: e } = A;
|
910
|
-
for (; e !== null && !
|
910
|
+
for (; e !== null && !j(e); )
|
911
911
|
({ prev: e } = e);
|
912
912
|
return e;
|
913
913
|
}
|
@@ -987,14 +987,14 @@ function fi(A, e, t = !0) {
|
|
987
987
|
let r = null;
|
988
988
|
for (let n = 0; n < e.length && !r; n++) {
|
989
989
|
const s = e[n];
|
990
|
-
if (
|
990
|
+
if (j(s))
|
991
991
|
A(s) ? r = s : t && s.children.length > 0 && (r = fi(A, s.children, !0));
|
992
992
|
else continue;
|
993
993
|
}
|
994
994
|
return r;
|
995
995
|
}
|
996
996
|
function Xo(A, e) {
|
997
|
-
return e.some((t) =>
|
997
|
+
return e.some((t) => j(t) && (A(t) || Xo(A, t.children)));
|
998
998
|
}
|
999
999
|
function pf(A, e) {
|
1000
1000
|
const t = [], r = [e], n = [0];
|
@@ -1006,12 +1006,12 @@ function pf(A, e) {
|
|
1006
1006
|
continue;
|
1007
1007
|
}
|
1008
1008
|
const s = r[0][n[0]++];
|
1009
|
-
|
1009
|
+
j(s) && (A(s) && t.push(s), s.children.length > 0 && (n.unshift(0), r.unshift(s.children)));
|
1010
1010
|
}
|
1011
1011
|
}
|
1012
1012
|
const Nn = {
|
1013
1013
|
tag_name(A) {
|
1014
|
-
return typeof A == "function" ? (e) =>
|
1014
|
+
return typeof A == "function" ? (e) => j(e) && A(e.name) : A === "*" ? j : (e) => j(e) && e.name === A;
|
1015
1015
|
},
|
1016
1016
|
tag_type(A) {
|
1017
1017
|
return typeof A == "function" ? (e) => A(e.type) : (e) => e.type === A;
|
@@ -1021,7 +1021,7 @@ const Nn = {
|
|
1021
1021
|
}
|
1022
1022
|
};
|
1023
1023
|
function Wo(A, e) {
|
1024
|
-
return typeof e == "function" ? (t) =>
|
1024
|
+
return typeof e == "function" ? (t) => j(t) && e(t.attribs[A]) : (t) => j(t) && t.attribs[A] === e;
|
1025
1025
|
}
|
1026
1026
|
function Cf(A, e) {
|
1027
1027
|
return (t) => A(t) || e(t);
|
@@ -1205,7 +1205,7 @@ const us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1205
1205
|
isCDATA: rs,
|
1206
1206
|
isComment: ns,
|
1207
1207
|
isDocument: it,
|
1208
|
-
isTag:
|
1208
|
+
isTag: j,
|
1209
1209
|
isText: Ie,
|
1210
1210
|
nextElementSibling: oi,
|
1211
1211
|
prepend: gf,
|
@@ -1335,7 +1335,7 @@ function ha(A) {
|
|
1335
1335
|
const Dr = Object.prototype.hasOwnProperty, Or = /\s+/, da = "data-", hi = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, Kf = /^{[^]*}$|^\[[^]*]$/;
|
1336
1336
|
function On(A, e, t) {
|
1337
1337
|
var r;
|
1338
|
-
if (!(!A || !
|
1338
|
+
if (!(!A || !j(A))) {
|
1339
1339
|
if ((r = A.attribs) !== null && r !== void 0 || (A.attribs = {}), !e)
|
1340
1340
|
return A.attribs;
|
1341
1341
|
if (Dr.call(A.attribs, e))
|
@@ -1355,11 +1355,11 @@ function Gf(A, e) {
|
|
1355
1355
|
if (typeof A != "string")
|
1356
1356
|
throw new Error("Bad combination of arguments.");
|
1357
1357
|
return UA(this, (t, r) => {
|
1358
|
-
|
1358
|
+
j(t) && kt(t, A, e.call(t, r, t.attribs[A]));
|
1359
1359
|
});
|
1360
1360
|
}
|
1361
1361
|
return UA(this, (t) => {
|
1362
|
-
if (
|
1362
|
+
if (j(t))
|
1363
1363
|
if (typeof A == "object")
|
1364
1364
|
for (const r of Object.keys(A)) {
|
1365
1365
|
const n = A[r];
|
@@ -1384,7 +1384,7 @@ function Vf(A, e) {
|
|
1384
1384
|
var t;
|
1385
1385
|
if (typeof A == "string" && e === void 0) {
|
1386
1386
|
const r = this[0];
|
1387
|
-
if (!r || !
|
1387
|
+
if (!r || !j(r))
|
1388
1388
|
return;
|
1389
1389
|
switch (A) {
|
1390
1390
|
case "style": {
|
@@ -1418,11 +1418,11 @@ function Vf(A, e) {
|
|
1418
1418
|
if (typeof A == "object")
|
1419
1419
|
throw new TypeError("Bad combination of arguments.");
|
1420
1420
|
return UA(this, (r, n) => {
|
1421
|
-
|
1421
|
+
j(r) && _s(r, A, e.call(r, n, Gi(r, A, this.options.xmlMode)), this.options.xmlMode);
|
1422
1422
|
});
|
1423
1423
|
}
|
1424
1424
|
return UA(this, (r) => {
|
1425
|
-
if (
|
1425
|
+
if (j(r))
|
1426
1426
|
if (typeof A == "object")
|
1427
1427
|
for (const n of Object.keys(A)) {
|
1428
1428
|
const s = A[n];
|
@@ -1473,16 +1473,16 @@ function zo(A) {
|
|
1473
1473
|
function Wf(A, e) {
|
1474
1474
|
var t;
|
1475
1475
|
const r = this[0];
|
1476
|
-
if (!r || !
|
1476
|
+
if (!r || !j(r))
|
1477
1477
|
return;
|
1478
1478
|
const n = r;
|
1479
1479
|
return (t = n.data) !== null && t !== void 0 || (n.data = {}), A == null ? Yf(n) : typeof A == "object" || e !== void 0 ? (UA(this, (s) => {
|
1480
|
-
|
1480
|
+
j(s) && (typeof A == "object" ? Vi(s, A) : Vi(s, A, e));
|
1481
1481
|
}), this) : Xf(n, A);
|
1482
1482
|
}
|
1483
1483
|
function Jf(A) {
|
1484
1484
|
const e = arguments.length === 0, t = this[0];
|
1485
|
-
if (!t || !
|
1485
|
+
if (!t || !j(t))
|
1486
1486
|
return e ? void 0 : this;
|
1487
1487
|
switch (t.name) {
|
1488
1488
|
case "textarea":
|
@@ -1515,13 +1515,13 @@ function qf(A) {
|
|
1515
1515
|
const e = Rn(A);
|
1516
1516
|
for (const t of e)
|
1517
1517
|
UA(this, (r) => {
|
1518
|
-
|
1518
|
+
j(r) && Ac(r, t);
|
1519
1519
|
});
|
1520
1520
|
return this;
|
1521
1521
|
}
|
1522
1522
|
function jf(A) {
|
1523
1523
|
return this.toArray().some((e) => {
|
1524
|
-
const t =
|
1524
|
+
const t = j(e) && e.attribs.class;
|
1525
1525
|
let r = -1;
|
1526
1526
|
if (t && A.length > 0)
|
1527
1527
|
for (; (r = t.indexOf(A, r + 1)) > -1; ) {
|
@@ -1535,7 +1535,7 @@ function jf(A) {
|
|
1535
1535
|
function ec(A) {
|
1536
1536
|
if (typeof A == "function")
|
1537
1537
|
return UA(this, (r, n) => {
|
1538
|
-
if (
|
1538
|
+
if (j(r)) {
|
1539
1539
|
const s = r.attribs.class || "";
|
1540
1540
|
ec.call([r], A.call(r, n, s));
|
1541
1541
|
}
|
@@ -1545,7 +1545,7 @@ function ec(A) {
|
|
1545
1545
|
const e = A.split(Or), t = this.length;
|
1546
1546
|
for (let r = 0; r < t; r++) {
|
1547
1547
|
const n = this[r];
|
1548
|
-
if (!
|
1548
|
+
if (!j(n))
|
1549
1549
|
continue;
|
1550
1550
|
const s = On(n, "class", !1);
|
1551
1551
|
if (s) {
|
@@ -1563,11 +1563,11 @@ function ec(A) {
|
|
1563
1563
|
function tc(A) {
|
1564
1564
|
if (typeof A == "function")
|
1565
1565
|
return UA(this, (n, s) => {
|
1566
|
-
|
1566
|
+
j(n) && tc.call([n], A.call(n, s, n.attribs.class || ""));
|
1567
1567
|
});
|
1568
1568
|
const e = Rn(A), t = e.length, r = arguments.length === 0;
|
1569
1569
|
return UA(this, (n) => {
|
1570
|
-
if (
|
1570
|
+
if (j(n))
|
1571
1571
|
if (r)
|
1572
1572
|
n.attribs.class = "";
|
1573
1573
|
else {
|
@@ -1584,14 +1584,14 @@ function tc(A) {
|
|
1584
1584
|
function rc(A, e) {
|
1585
1585
|
if (typeof A == "function")
|
1586
1586
|
return UA(this, (a, u) => {
|
1587
|
-
|
1587
|
+
j(a) && rc.call([a], A.call(a, u, a.attribs.class || "", e), e);
|
1588
1588
|
});
|
1589
1589
|
if (!A || typeof A != "string")
|
1590
1590
|
return this;
|
1591
1591
|
const t = A.split(Or), r = t.length, n = typeof e == "boolean" ? e ? 1 : -1 : 0, s = this.length;
|
1592
1592
|
for (let a = 0; a < s; a++) {
|
1593
1593
|
const u = this[a];
|
1594
|
-
if (!
|
1594
|
+
if (!j(u))
|
1595
1595
|
continue;
|
1596
1596
|
const o = Rn(u.attribs.class);
|
1597
1597
|
for (let c = 0; c < r; c++) {
|
@@ -2636,7 +2636,7 @@ function gc(A, e, t) {
|
|
2636
2636
|
}
|
2637
2637
|
for (let a = 0; a < n.length && (s == null ? void 0 : s.size) !== e.length; a++) {
|
2638
2638
|
const u = n[a];
|
2639
|
-
if ((s ? e.filter((l) =>
|
2639
|
+
if ((s ? e.filter((l) => j(l) && !s.has(l)) : e).length === 0)
|
2640
2640
|
break;
|
2641
2641
|
const c = Ec(u, e, t);
|
2642
2642
|
if (c.length)
|
@@ -2671,7 +2671,7 @@ function kn(A, e, t, r, n) {
|
|
2671
2671
|
const s = e.findIndex(Pn), a = e.slice(0, s), u = e[s], o = e.length - 1 === s ? n : 1 / 0, c = vh(u.name, u.data, o);
|
2672
2672
|
if (c === 0)
|
2673
2673
|
return [];
|
2674
|
-
const f = (a.length === 0 && !Array.isArray(A) ? as(A).filter(
|
2674
|
+
const f = (a.length === 0 && !Array.isArray(A) ? as(A).filter(j) : a.length === 0 ? (Array.isArray(A) ? A : [A]).filter(j) : r || a.some(wr) ? Ea(A, [a], t, c) : pa(A, [a], t)).slice(0, c);
|
2675
2675
|
let h = Lh(u.name, f, u.data, t);
|
2676
2676
|
if (h.length === 0 || e.length === s + 1)
|
2677
2677
|
return h;
|
@@ -2706,10 +2706,10 @@ function Ea(A, e, t, r) {
|
|
2706
2706
|
}
|
2707
2707
|
function pc(A, e, t = 1 / 0) {
|
2708
2708
|
const r = fc(A, us, e.shouldTestNextSiblings);
|
2709
|
-
return li((n) =>
|
2709
|
+
return li((n) => j(n) && e(n), r, !0, t);
|
2710
2710
|
}
|
2711
2711
|
function pa(A, e, t) {
|
2712
|
-
const r = (Array.isArray(A) ? A : [A]).filter(
|
2712
|
+
const r = (Array.isArray(A) ? A : [A]).filter(j);
|
2713
2713
|
if (r.length === 0)
|
2714
2714
|
return r;
|
2715
2715
|
const n = Bi(e, t);
|
@@ -2800,7 +2800,7 @@ function Ph(A) {
|
|
2800
2800
|
root: (e = this._root) === null || e === void 0 ? void 0 : e[0]
|
2801
2801
|
}, n = typeof A == "string" ? (s) => hc(s, A, r) : Yr(A);
|
2802
2802
|
return UA(this, (s) => {
|
2803
|
-
for (s && !it(s) && !
|
2803
|
+
for (s && !it(s) && !j(s) && (s = s.parent); s && j(s); ) {
|
2804
2804
|
if (n(s, 0)) {
|
2805
2805
|
t.includes(s) || t.push(s);
|
2806
2806
|
break;
|
@@ -2812,14 +2812,14 @@ function Ph(A) {
|
|
2812
2812
|
const kh = pi((A) => oi(A)), Kh = Vr((A) => {
|
2813
2813
|
const e = [];
|
2814
2814
|
for (; A.next; )
|
2815
|
-
A = A.next,
|
2815
|
+
A = A.next, j(A) && e.push(A);
|
2816
2816
|
return e;
|
2817
2817
|
}, $t), Gh = Ci((A) => oi(A), $t), Vh = pi((A) => ci(A)), Yh = Vr((A) => {
|
2818
2818
|
const e = [];
|
2819
2819
|
for (; A.prev; )
|
2820
|
-
A = A.prev,
|
2820
|
+
A = A.prev, j(A) && e.push(A);
|
2821
2821
|
return e;
|
2822
|
-
}, $t), Xh = Ci((A) => ci(A), $t), Wh = Vr((A) => Yo(A).filter((e) =>
|
2822
|
+
}, $t), Xh = Ci((A) => ci(A), $t), Wh = Vr((A) => Yo(A).filter((e) => j(e) && e !== A), jt), Jh = Vr((A) => as(A).filter(j), $t);
|
2823
2823
|
function qh() {
|
2824
2824
|
const A = this.toArray().reduce((e, t) => PA(t) ? e.concat(t.children) : e, []);
|
2825
2825
|
return this._make(A);
|
@@ -2853,7 +2853,7 @@ function mi(A, e, t, r) {
|
|
2853
2853
|
}
|
2854
2854
|
function zh(A) {
|
2855
2855
|
const e = this.toArray();
|
2856
|
-
return typeof A == "string" ? dc(e.filter(
|
2856
|
+
return typeof A == "string" ? dc(e.filter(j), A, this.options) : A ? e.some(Yr(A)) : !1;
|
2857
2857
|
}
|
2858
2858
|
function Ad(A) {
|
2859
2859
|
let e = this.toArray();
|
@@ -3035,7 +3035,7 @@ function mc(A) {
|
|
3035
3035
|
let o = u, c = 0;
|
3036
3036
|
for (; c < o.children.length; ) {
|
3037
3037
|
const l = o.children[c];
|
3038
|
-
|
3038
|
+
j(l) ? (o = l, c = 0) : c++;
|
3039
3039
|
}
|
3040
3040
|
A(s, o, [u]);
|
3041
3041
|
}
|
@@ -3206,7 +3206,7 @@ function Nd(A, e) {
|
|
3206
3206
|
if (A != null && e != null || // When `prop` is a "plain" object
|
3207
3207
|
typeof A == "object" && !Array.isArray(A))
|
3208
3208
|
return UA(this, (t, r) => {
|
3209
|
-
|
3209
|
+
j(t) && wc(t, A, e, r);
|
3210
3210
|
});
|
3211
3211
|
if (this.length !== 0)
|
3212
3212
|
return Tc(this[0], A);
|
@@ -3224,7 +3224,7 @@ function wc(A, e, t, r) {
|
|
3224
3224
|
}
|
3225
3225
|
}
|
3226
3226
|
function Tc(A, e) {
|
3227
|
-
if (!A || !
|
3227
|
+
if (!A || !j(A))
|
3228
3228
|
return;
|
3229
3229
|
const t = Od(A.attribs.style);
|
3230
3230
|
if (typeof e == "string")
|
@@ -3265,7 +3265,7 @@ function Pd() {
|
|
3265
3265
|
function kd() {
|
3266
3266
|
return this.map((A, e) => {
|
3267
3267
|
const t = this._make(e);
|
3268
|
-
return
|
3268
|
+
return j(e) && e.name === "form" ? t.find($i).toArray() : t.filter($i).toArray();
|
3269
3269
|
}).filter(
|
3270
3270
|
// Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)
|
3271
3271
|
'[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))'
|
@@ -8865,7 +8865,7 @@ function IE(A, e, t) {
|
|
8865
8865
|
const Je = {
|
8866
8866
|
// Re-exports from domhandler
|
8867
8867
|
isCommentNode: ns,
|
8868
|
-
isElementNode:
|
8868
|
+
isElementNode: j,
|
8869
8869
|
isTextNode: Ie,
|
8870
8870
|
//Node construction
|
8871
8871
|
createDocument() {
|
@@ -9688,7 +9688,7 @@ function OE(A, e) {
|
|
9688
9688
|
return new DE(t, e).end(A), t.root;
|
9689
9689
|
}
|
9690
9690
|
const RE = hd((A, e, t, r) => e._useHtmlParser2 ? OE(A, e) : vE(A, e, t, r)), gu = Xd(RE, (A, e) => e._useHtmlParser2 ? ss(A, e) : yE(A));
|
9691
|
-
var
|
9691
|
+
var J = /* @__PURE__ */ ((A) => (A[A.None = 0] = "None", A[A.Text = 1] = "Text", A[A.Image = 2] = "Image", A[A.Video = 3] = "Video", A[A.Icon = 4] = "Icon", A[A.Link = 5] = "Link", A[A.Button = 6] = "Button", A[A.Block = 10] = "Block", A))(J || {}), we;
|
9692
9692
|
((A) => {
|
9693
9693
|
A.THEME_TEXT_COLOR_CLASS = "gp-designer-theme-text", A.THEME_BUTTON_COLOR_CLASS = "gp-designer-theme-button", A.THEME_ICON_COLOR_CLASS = "gp-designer-theme-icon", A.THEME_COLOR = "#3574e6";
|
9694
9694
|
})(we || (we = {}));
|
@@ -9772,19 +9772,19 @@ function XE(A, e, t, r, n, s) {
|
|
9772
9772
|
}, [
|
9773
9773
|
A.icon ? (G(), V("span", kE, [
|
9774
9774
|
mr(A.$slots, "icon", {}, () => [
|
9775
|
-
A.type === "success" ? (G(), V("span", KE, "✔")) :
|
9776
|
-
A.type === "error" ? (G(), V("span", GE, "✖")) :
|
9777
|
-
A.type === "info" ? (G(), V("span", VE, "ℹ")) :
|
9778
|
-
A.type === "warning" ? (G(), V("span", YE, "⚠")) :
|
9775
|
+
A.type === "success" ? (G(), V("span", KE, "✔")) : q("", !0),
|
9776
|
+
A.type === "error" ? (G(), V("span", GE, "✖")) : q("", !0),
|
9777
|
+
A.type === "info" ? (G(), V("span", VE, "ℹ")) : q("", !0),
|
9778
|
+
A.type === "warning" ? (G(), V("span", YE, "⚠")) : q("", !0)
|
9779
9779
|
], !0)
|
9780
|
-
])) :
|
9780
|
+
])) : q("", !0),
|
9781
9781
|
T("span", null, JA(A.message), 1),
|
9782
9782
|
T("button", {
|
9783
9783
|
class: "close-btn hover:text-gray-800 font-bold",
|
9784
9784
|
onClick: e[0] || (e[0] = (...a) => A.closeMessage && A.closeMessage(...a))
|
9785
9785
|
}, " × ")
|
9786
9786
|
], 2)
|
9787
|
-
])) :
|
9787
|
+
])) : q("", !0)
|
9788
9788
|
]),
|
9789
9789
|
_: 3
|
9790
9790
|
});
|
@@ -9965,17 +9965,17 @@ const $E = ["onClick"], ZE = {
|
|
9965
9965
|
"updateElementRule"
|
9966
9966
|
],
|
9967
9967
|
setup(A, { emit: e }) {
|
9968
|
-
const t = A, r = e, n = De(() => t.element.editText || t.element.text), s = De(() => t.selectedElement === t.element), a = De(() => t.hoveredElement === t.element), u = $(!1), o = $(!1), c = $(""), l = De(() => t.element.rule.minText || 0), f = De(() => t.element.rule.maxText || 1 / 0), h = (
|
9969
|
-
let
|
9970
|
-
if (
|
9971
|
-
const z =
|
9972
|
-
Math.min(z,
|
9968
|
+
const t = A, r = e, n = De(() => t.element.editText || t.element.text), s = De(() => t.selectedElement === t.element), a = De(() => t.hoveredElement === t.element), u = $(!1), o = $(!1), c = $(""), l = De(() => t.element.rule.minText || 0), f = De(() => t.element.rule.maxText || 1 / 0), h = (S) => {
|
9969
|
+
let L = "";
|
9970
|
+
if (S.children && S.children.length && S.children[0].type === J.Block) {
|
9971
|
+
const z = S.children[0].rule.flexColumn || S.children[0].rule.mobileFlexColumn;
|
9972
|
+
Math.min(z, S.children.length) && (L += " flex pc:justify-center flex-wrap ", S.children[0].rule.mobileFlexColumn ? L += " justify-center " : L += " gp-designer-m-swiper swiper-wrapper justify-normal ");
|
9973
9973
|
}
|
9974
|
-
if (
|
9975
|
-
const z =
|
9976
|
-
(AA || z) && (
|
9974
|
+
if (S.type === J.Block) {
|
9975
|
+
const z = S.rule.flexColumn, AA = S.rule.mobileFlexColumn;
|
9976
|
+
(AA || z) && (L += " box-border "), AA > 1 && AA <= 12 ? L += ` basis-1/${AA} ` : AA == 1 ? L += " basis-full " : AA || (L += " gp-designer-m-swiper-slide swiper-slide "), z > 1 && z <= 12 ? L += ` pc:basis-1/${z} ` : z == 1 && (L += " pc:basis-full ");
|
9977
9977
|
}
|
9978
|
-
return S;
|
9978
|
+
return (S.type == J.Button || S.type == J.Link) && S.rule.openMeiqia && (L += " gp-designer-meiqia "), L;
|
9979
9979
|
};
|
9980
9980
|
zA(
|
9981
9981
|
() => t.r,
|
@@ -9984,28 +9984,28 @@ const $E = ["onClick"], ZE = {
|
|
9984
9984
|
},
|
9985
9985
|
{ immediate: !0 }
|
9986
9986
|
);
|
9987
|
-
function C(
|
9988
|
-
|
9987
|
+
function C(S) {
|
9988
|
+
S.xpath != "/div[1]" && t.mode !== "preview" && (t.mode === "edit" ? S.type === J.Text && r("selectElement", S) : r("selectElement", S), !S.rule.isReadOnly && S.type === J.Text && (u.value = !0));
|
9989
9989
|
}
|
9990
|
-
function p(
|
9991
|
-
r("selectElement",
|
9990
|
+
function p(S) {
|
9991
|
+
r("selectElement", S);
|
9992
9992
|
}
|
9993
|
-
function w(
|
9994
|
-
r("hoverElement",
|
9993
|
+
function w(S, L) {
|
9994
|
+
r("hoverElement", S, L);
|
9995
9995
|
}
|
9996
|
-
function U(
|
9997
|
-
r("hoverElement",
|
9996
|
+
function U(S) {
|
9997
|
+
r("hoverElement", S);
|
9998
9998
|
}
|
9999
|
-
function v(
|
10000
|
-
|
9999
|
+
function v(S) {
|
10000
|
+
S.currentTarget.contains(S.relatedTarget) ? r("hoverElement", null) : t.hoveredElement ? r("hoverElement", null, t.hoveredElement.parentxpath) : r("hoverElement", null);
|
10001
10001
|
}
|
10002
10002
|
function I() {
|
10003
10003
|
u.value = !1, r("contentUpdated", D());
|
10004
10004
|
}
|
10005
10005
|
function D() {
|
10006
|
-
function
|
10006
|
+
function S(z) {
|
10007
10007
|
var ue;
|
10008
|
-
const AA = z, ee = AA.rule.isThemeColor && AA.type ==
|
10008
|
+
const AA = z, ee = AA.rule.isThemeColor && AA.type == J.Text ? we.THEME_TEXT_COLOR_CLASS : AA.rule.isThemeColor && AA.type == J.Button ? we.THEME_BUTTON_COLOR_CLASS : AA.rule.isThemeColor && AA.type == J.Icon ? we.THEME_ICON_COLOR_CLASS : "";
|
10009
10009
|
ee ? AA.attrs.class = AA.attrs.class ? AA.attrs.class + " " + ee : ee : AA.attrs.class = (ue = AA.attrs.class) == null ? void 0 : ue.replace(
|
10010
10010
|
new RegExp(
|
10011
10011
|
`${we.THEME_TEXT_COLOR_CLASS}|${we.THEME_BUTTON_COLOR_CLASS}|${we.THEME_ICON_COLOR_CLASS}`,
|
@@ -10017,56 +10017,56 @@ const $E = ["onClick"], ZE = {
|
|
10017
10017
|
class: AA.attrs.class || ""
|
10018
10018
|
}, zt = h(AA);
|
10019
10019
|
zt && (Ke.class += " " + zt);
|
10020
|
-
const Ar = Object.entries(z.attrs || {}).filter(([$A, NA]) => $A !== "class").map(([$A, NA]) => `${$A}="${NA}"`).join(" "), F = Object.entries(Ke || {}).map(([$A, NA]) => `${$A}="${NA}"`).join(" "), x = `<${z.tag}${Ar ? " " + Ar : ""}${F ? " " + F : ""}>`, K = `</${z.tag}>`, Y = (z.children || []).map(($A) =>
|
10020
|
+
const Ar = Object.entries(z.attrs || {}).filter(([$A, NA]) => $A !== "class").map(([$A, NA]) => `${$A}="${NA}"`).join(" "), F = Object.entries(Ke || {}).map(([$A, NA]) => `${$A}="${NA}"`).join(" "), x = `<${z.tag}${Ar ? " " + Ar : ""}${F ? " " + F : ""}>`, K = `</${z.tag}>`, Y = (z.children || []).map(($A) => S($A)).join("");
|
10021
10021
|
let QA = z.editText || z.text || "";
|
10022
10022
|
return QA = QA.replace(/\r\n/g, `
|
10023
10023
|
`).replace(/\n/g, "<br>"), `${x}${QA}${Y}${K}`;
|
10024
10024
|
}
|
10025
|
-
return
|
10025
|
+
return S(t.element);
|
10026
10026
|
}
|
10027
|
-
function P(
|
10027
|
+
function P(S) {
|
10028
10028
|
var ee, Ke;
|
10029
|
-
|
10030
|
-
let
|
10031
|
-
(Ke = t.element.rule) != null && Ke.allowWrap ? (
|
10032
|
-
const z =
|
10029
|
+
S.preventDefault(), S.stopPropagation();
|
10030
|
+
let L = ((ee = S.clipboardData) == null ? void 0 : ee.getData("text/plain")) || "";
|
10031
|
+
(Ke = t.element.rule) != null && Ke.allowWrap ? (L = L == null ? void 0 : L.replace(/\n/g, "<br>"), document.execCommand("insertHTML", !1, L)) : (L = L == null ? void 0 : L.replace(/\n/g, " "), document.execCommand("insertText", !1, L));
|
10032
|
+
const z = S.target, AA = z.innerText || z.textContent || "";
|
10033
10033
|
N(AA);
|
10034
10034
|
}
|
10035
|
-
function H(
|
10036
|
-
var
|
10037
|
-
|
10035
|
+
function H(S) {
|
10036
|
+
var L;
|
10037
|
+
S.key === "Enter" && (S.preventDefault(), S.stopPropagation(), (L = t.element.rule) != null && L.allowWrap ? document.execCommand("insertLineBreak") : eA.error("当前节点不允许换行"));
|
10038
10038
|
}
|
10039
|
-
function E(
|
10040
|
-
|
10041
|
-
const
|
10039
|
+
function E(S) {
|
10040
|
+
S.stopPropagation();
|
10041
|
+
const L = S.target, z = L.innerText || L.textContent || "";
|
10042
10042
|
N(z);
|
10043
10043
|
}
|
10044
|
-
function N(
|
10045
|
-
if (
|
10044
|
+
function N(S) {
|
10045
|
+
if (S.length < l.value) {
|
10046
10046
|
o.value = !0, c.value = `最少输入 ${l.value} 个字符`;
|
10047
10047
|
return;
|
10048
|
-
} else if (
|
10048
|
+
} else if (S.length > f.value) {
|
10049
10049
|
o.value = !0, c.value = `最多输入 ${f.value} 个字符`;
|
10050
10050
|
return;
|
10051
10051
|
} else
|
10052
10052
|
o.value = !1, c.value = "";
|
10053
|
-
r("updateText", { element: t.element, newText:
|
10054
|
-
const
|
10055
|
-
|
10053
|
+
r("updateText", { element: t.element, newText: S }), r("contentUpdated", D());
|
10054
|
+
const L = Ho(t.element);
|
10055
|
+
L.editText = S;
|
10056
10056
|
}
|
10057
|
-
function k(
|
10058
|
-
r("updateText",
|
10057
|
+
function k(S) {
|
10058
|
+
r("updateText", S), r("contentUpdated", D());
|
10059
10059
|
}
|
10060
10060
|
function R() {
|
10061
|
-
const
|
10062
|
-
r("blockAction", { action: "add", element: t.element, newBlock:
|
10061
|
+
const S = { ...t.element };
|
10062
|
+
r("blockAction", { action: "add", element: t.element, newBlock: S });
|
10063
10063
|
}
|
10064
10064
|
function sA() {
|
10065
10065
|
lA(t.element), r("blockAction", { action: "moveUp", element: t.element });
|
10066
10066
|
}
|
10067
|
-
function lA(
|
10068
|
-
|
10069
|
-
|
10067
|
+
function lA(S) {
|
10068
|
+
S.children && S.children.length > 0 && S.children.forEach((L) => {
|
10069
|
+
L.type == J.Text && (L.text !== L.editText && (L.text = L.editText), lA(L));
|
10070
10070
|
});
|
10071
10071
|
}
|
10072
10072
|
function gA() {
|
@@ -10075,56 +10075,56 @@ const $E = ["onClick"], ZE = {
|
|
10075
10075
|
function Z() {
|
10076
10076
|
r("blockAction", { action: "delete", element: t.element });
|
10077
10077
|
}
|
10078
|
-
function iA(
|
10079
|
-
r("blockAction",
|
10078
|
+
function iA(S) {
|
10079
|
+
r("blockAction", S), r("contentUpdated", D());
|
10080
10080
|
}
|
10081
|
-
function fA(
|
10082
|
-
yA.value.openModal(
|
10081
|
+
function fA(S) {
|
10082
|
+
yA.value.openModal(S);
|
10083
10083
|
}
|
10084
|
-
function EA(
|
10085
|
-
VA.value.openModal(
|
10084
|
+
function EA(S) {
|
10085
|
+
VA.value.openModal(S);
|
10086
10086
|
}
|
10087
|
-
function bA(
|
10088
|
-
r("addIcon",
|
10087
|
+
function bA(S, L) {
|
10088
|
+
r("addIcon", S, L), r("contentUpdated", D());
|
10089
10089
|
}
|
10090
|
-
function jA(
|
10091
|
-
r("updateElementRule",
|
10090
|
+
function jA(S) {
|
10091
|
+
r("updateElementRule", S);
|
10092
10092
|
}
|
10093
10093
|
const yA = $(t.icon);
|
10094
10094
|
zA(
|
10095
10095
|
() => t.icon,
|
10096
|
-
(
|
10097
|
-
yA.value =
|
10096
|
+
(S) => {
|
10097
|
+
yA.value = S;
|
10098
10098
|
},
|
10099
10099
|
{ immediate: !0 }
|
10100
10100
|
);
|
10101
10101
|
const VA = $(t.upload);
|
10102
10102
|
zA(
|
10103
10103
|
() => t.upload,
|
10104
|
-
(
|
10105
|
-
VA.value =
|
10104
|
+
(S) => {
|
10105
|
+
VA.value = S;
|
10106
10106
|
},
|
10107
10107
|
{ immediate: !0 }
|
10108
10108
|
);
|
10109
10109
|
const HA = De(() => {
|
10110
|
-
const
|
10111
|
-
return t.element.css =
|
10112
|
-
}), Ae = (
|
10113
|
-
|
10114
|
-
z.rule.flexColumn =
|
10115
|
-
}), r("updateElementRule",
|
10110
|
+
const S = h(t.element);
|
10111
|
+
return t.element.css = S, S;
|
10112
|
+
}), Ae = (S, L) => {
|
10113
|
+
L.children && L.children.length && L.children[0].type === J.Block && L.children.map((z) => {
|
10114
|
+
z.rule.flexColumn = S;
|
10115
|
+
}), r("updateElementRule", L);
|
10116
10116
|
}, SA = De(() => {
|
10117
|
-
let
|
10117
|
+
let S = "";
|
10118
10118
|
if (t.mode === "design") {
|
10119
|
-
const
|
10120
|
-
if (
|
10121
|
-
const z =
|
10122
|
-
z > 1 && z <= 12 && (
|
10119
|
+
const L = t.element;
|
10120
|
+
if (L.type === J.Block) {
|
10121
|
+
const z = L.rule.flexColumn;
|
10122
|
+
z > 1 && z <= 12 && (S += `flex-basis: calc(100% / ${z} - 10px);`);
|
10123
10123
|
}
|
10124
10124
|
}
|
10125
|
-
return
|
10125
|
+
return S;
|
10126
10126
|
});
|
10127
|
-
return (
|
10127
|
+
return (S, L) => {
|
10128
10128
|
const z = T0("ElementRenderer", !0);
|
10129
10129
|
return G(), V(Ot, null, [
|
10130
10130
|
(G(), je(b0(t.element.tag), U0({
|
@@ -10143,19 +10143,19 @@ const $E = ["onClick"], ZE = {
|
|
10143
10143
|
// 鼠标悬停、选中或超出文字限制时显示手型
|
10144
10144
|
t.element.rule && t.element.rule.isReadOnly ? "cursor-not-allowed" : "",
|
10145
10145
|
// 只读
|
10146
|
-
t.element.rule.isThemeColor && t.element.type === cA(
|
10146
|
+
t.element.rule.isThemeColor && t.element.type === cA(J).Text ? cA(we).THEME_TEXT_COLOR_CLASS : "",
|
10147
10147
|
// 文本主题色
|
10148
|
-
t.element.rule.isThemeColor && t.element.type === cA(
|
10148
|
+
t.element.rule.isThemeColor && t.element.type === cA(J).Button ? cA(we).THEME_BUTTON_COLOR_CLASS : "",
|
10149
10149
|
// 按钮主题色
|
10150
|
-
t.element.rule.isThemeColor && t.element.type === cA(
|
10150
|
+
t.element.rule.isThemeColor && t.element.type === cA(J).Icon ? cA(we).THEME_ICON_COLOR_CLASS : "",
|
10151
10151
|
// 图标主题色
|
10152
10152
|
HA.value
|
10153
10153
|
],
|
10154
10154
|
style: SA.value
|
10155
10155
|
}, t.element.attrs, {
|
10156
10156
|
contenteditable: u.value,
|
10157
|
-
onClick:
|
10158
|
-
onMouseenter:
|
10157
|
+
onClick: L[3] || (L[3] = YA(() => C(t.element), ["stop"])),
|
10158
|
+
onMouseenter: L[4] || (L[4] = () => U(t.element)),
|
10159
10159
|
onMouseleave: v,
|
10160
10160
|
onBlur: I,
|
10161
10161
|
onInput: E,
|
@@ -10185,18 +10185,18 @@ const $E = ["onClick"], ZE = {
|
|
10185
10185
|
onAddIcon: bA,
|
10186
10186
|
onUpdateElementRule: () => jA(AA)
|
10187
10187
|
}, null, 8, ["show-margin", "r", "mode", "icons", "element", "selectedElement", "hoveredElement", "cropper", "icon", "upload", "upload-by-file", "onUpdateElementRule"]))), 128)),
|
10188
|
-
t.element.type === cA(
|
10188
|
+
t.element.type === cA(J).Block ? (G(), V("div", {
|
10189
10189
|
key: 0,
|
10190
10190
|
"date-action": "1",
|
10191
10191
|
contenteditable: "false",
|
10192
|
-
onClick:
|
10192
|
+
onClick: L[0] || (L[0] = YA(() => {
|
10193
10193
|
}, ["stop"])),
|
10194
10194
|
class: "hover:z-10 z-9 flex space-x-1 flex-none flex-nowrap overflow-visible absolute left-2 top-2 text-sm"
|
10195
10195
|
}, [
|
10196
10196
|
T("button", {
|
10197
10197
|
class: "flex-none content-center items-center p-1 bg-green-500/80 text-white rounded hover:bg-green-500",
|
10198
10198
|
onClick: YA(R, ["stop"])
|
10199
|
-
},
|
10199
|
+
}, L[7] || (L[7] = [
|
10200
10200
|
T("svg", {
|
10201
10201
|
xmlns: "http://www.w3.org/2000/svg",
|
10202
10202
|
width: "1em",
|
@@ -10228,7 +10228,7 @@ const $E = ["onClick"], ZE = {
|
|
10228
10228
|
T("button", {
|
10229
10229
|
class: "flex-none content-center items-center p-1 bg-blue-500/80 text-white rounded hover:bg-blue-500",
|
10230
10230
|
onClick: YA(sA, ["stop"])
|
10231
|
-
},
|
10231
|
+
}, L[8] || (L[8] = [
|
10232
10232
|
T("svg", {
|
10233
10233
|
xmlns: "http://www.w3.org/2000/svg",
|
10234
10234
|
width: "1em",
|
@@ -10248,7 +10248,7 @@ const $E = ["onClick"], ZE = {
|
|
10248
10248
|
T("button", {
|
10249
10249
|
class: "flex-none content-center items-center p-1 bg-blue-500/80 text-white rounded hover:bg-blue-500",
|
10250
10250
|
onClick: YA(gA, ["stop"])
|
10251
|
-
},
|
10251
|
+
}, L[9] || (L[9] = [
|
10252
10252
|
T("svg", {
|
10253
10253
|
xmlns: "http://www.w3.org/2000/svg",
|
10254
10254
|
width: "1em",
|
@@ -10268,7 +10268,7 @@ const $E = ["onClick"], ZE = {
|
|
10268
10268
|
T("button", {
|
10269
10269
|
class: "flex-none content-center items-center p-1 bg-red-500/80 text-white rounded hover:bg-red-500",
|
10270
10270
|
onClick: YA(Z, ["stop"])
|
10271
|
-
},
|
10271
|
+
}, L[10] || (L[10] = [
|
10272
10272
|
T("svg", {
|
10273
10273
|
xmlns: "http://www.w3.org/2000/svg",
|
10274
10274
|
width: "1em",
|
@@ -10285,12 +10285,12 @@ const $E = ["onClick"], ZE = {
|
|
10285
10285
|
})
|
10286
10286
|
], -1)
|
10287
10287
|
]))
|
10288
|
-
])) :
|
10289
|
-
t.element.children && t.element.children.length && t.element.children[0].type === cA(
|
10288
|
+
])) : q("", !0),
|
10289
|
+
t.element.children && t.element.children.length && t.element.children[0].type === cA(J).Block && t.element.children[0].rule && t.element.children[0].rule.flexColumns && t.element.children[0].rule.flexColumns.length > 0 ? (G(), V("div", {
|
10290
10290
|
key: 1,
|
10291
10291
|
"date-action": "1",
|
10292
10292
|
contenteditable: "false",
|
10293
|
-
onClick:
|
10293
|
+
onClick: L[1] || (L[1] = YA(() => {
|
10294
10294
|
}, ["stop"])),
|
10295
10295
|
class: "hover:z-10 z-9 flex space-x-1 flex-none flex-nowrap overflow-visible absolute right-0 -top-6 items-center"
|
10296
10296
|
}, [
|
@@ -10301,14 +10301,14 @@ const $E = ["onClick"], ZE = {
|
|
10301
10301
|
]),
|
10302
10302
|
onClick: YA(() => Ae(AA, t.element), ["stop"])
|
10303
10303
|
}, JA(AA), 11, $E))), 256))
|
10304
|
-
])) :
|
10305
|
-
], 64)) :
|
10306
|
-
t.element.type === cA(
|
10304
|
+
])) : q("", !0)
|
10305
|
+
], 64)) : q("", !0),
|
10306
|
+
t.element.type === cA(J).Icon ? (G(), V("div", {
|
10307
10307
|
key: 1,
|
10308
10308
|
class: "cursor-pointer rounded-sm w-5 h-5 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80 hover:bg-black",
|
10309
10309
|
contenteditable: "false",
|
10310
|
-
onClick:
|
10311
|
-
},
|
10310
|
+
onClick: L[2] || (L[2] = YA(() => fA(t.element), ["stop"]))
|
10311
|
+
}, L[11] || (L[11] = [
|
10312
10312
|
T("svg", {
|
10313
10313
|
xmlns: "http://www.w3.org/2000/svg",
|
10314
10314
|
width: "1em",
|
@@ -10332,22 +10332,22 @@ const $E = ["onClick"], ZE = {
|
|
10332
10332
|
d: "m320 255.79l-64-64l-64 64m64 192.42V207.79"
|
10333
10333
|
})
|
10334
10334
|
], -1)
|
10335
|
-
]))) :
|
10335
|
+
]))) : q("", !0)
|
10336
10336
|
]),
|
10337
10337
|
_: 1
|
10338
10338
|
}, 16, ["class", "style", "contenteditable"])),
|
10339
|
-
t.element.type == cA(
|
10340
|
-
t.element.type === cA(
|
10339
|
+
t.element.type == cA(J).Text && o.value ? (G(), V("div", ZE, JA(c.value), 1)) : q("", !0),
|
10340
|
+
t.element.type === cA(J).Image ? (G(), V("div", {
|
10341
10341
|
key: 1,
|
10342
10342
|
class: "cursor-pointer rounded-sm flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm text-gray-50 z-10 bg-black/80 hover:bg-black",
|
10343
|
-
onClick:
|
10343
|
+
onClick: L[6] || (L[6] = YA(() => {
|
10344
10344
|
}, ["stop"])),
|
10345
10345
|
contenteditable: "false"
|
10346
10346
|
}, [
|
10347
10347
|
T("div", {
|
10348
10348
|
class: "p-1",
|
10349
|
-
onClick:
|
10350
|
-
},
|
10349
|
+
onClick: L[5] || (L[5] = YA(() => EA(t.element), ["stop"]))
|
10350
|
+
}, L[12] || (L[12] = [
|
10351
10351
|
T("svg", {
|
10352
10352
|
xmlns: "http://www.w3.org/2000/svg",
|
10353
10353
|
width: "1em",
|
@@ -10372,11 +10372,11 @@ const $E = ["onClick"], ZE = {
|
|
10372
10372
|
})
|
10373
10373
|
], -1)
|
10374
10374
|
]))
|
10375
|
-
])) :
|
10375
|
+
])) : q("", !0)
|
10376
10376
|
], 64);
|
10377
10377
|
};
|
10378
10378
|
}
|
10379
|
-
}), Ap = /* @__PURE__ */ ot(zE, [["__scopeId", "data-v-
|
10379
|
+
}), Ap = /* @__PURE__ */ ot(zE, [["__scopeId", "data-v-fdc2479e"]]), ep = ye({
|
10380
10380
|
name: "GpCheckbox",
|
10381
10381
|
props: {
|
10382
10382
|
modelValue: {
|
@@ -10428,23 +10428,23 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10428
10428
|
);
|
10429
10429
|
function s() {
|
10430
10430
|
var a;
|
10431
|
-
if (n.value.type ===
|
10431
|
+
if (n.value.type === J.Icon && !n.value.attrs.class.includes("iconfont")) {
|
10432
10432
|
eA.error("图标仅支持 iconfont 图标");
|
10433
10433
|
return;
|
10434
10434
|
}
|
10435
|
-
if (n.value.type ===
|
10435
|
+
if (n.value.type === J.Image && n.value.tag !== "img") {
|
10436
10436
|
eA.error("节点类型错误");
|
10437
10437
|
return;
|
10438
10438
|
}
|
10439
|
-
if (n.value.type ===
|
10439
|
+
if (n.value.type === J.Video && n.value.tag !== "video") {
|
10440
10440
|
eA.error("节点类型错误");
|
10441
10441
|
return;
|
10442
10442
|
}
|
10443
|
-
if (n.value.type ===
|
10443
|
+
if (n.value.type === J.Link && n.value.tag !== "a") {
|
10444
10444
|
eA.error("节点类型错误");
|
10445
10445
|
return;
|
10446
10446
|
}
|
10447
|
-
if (n.value.type ===
|
10447
|
+
if (n.value.type === J.Text) {
|
10448
10448
|
if (Number(n.value.rule.minText) > Number(n.value.rule.maxText)) {
|
10449
10449
|
eA.error("最小文本长度不能大于最大文本长度");
|
10450
10450
|
return;
|
@@ -10454,7 +10454,7 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10454
10454
|
return;
|
10455
10455
|
}
|
10456
10456
|
}
|
10457
|
-
if (n.value.type ===
|
10457
|
+
if (n.value.type === J.Block) {
|
10458
10458
|
if (Number(n.value.rule.minBlock) > Number(n.value.rule.maxBlock)) {
|
10459
10459
|
eA.error("最小块数量不能大于最大块数量");
|
10460
10460
|
return;
|
@@ -10478,7 +10478,7 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10478
10478
|
n.value.text !== void 0 ? (G(), V("div", op, [
|
10479
10479
|
u[16] || (u[16] = T("label", { class: "block" }, "内容", -1)),
|
10480
10480
|
T("div", cp, JA(n.value.text || "-"), 1)
|
10481
|
-
])) :
|
10481
|
+
])) : q("", !0),
|
10482
10482
|
T("div", null, [
|
10483
10483
|
u[17] || (u[17] = T("label", { class: "block mt-4" }, "节点", -1)),
|
10484
10484
|
T("div", lp, JA(n.value.xpath), 1)
|
@@ -10501,7 +10501,7 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10501
10501
|
[Fs, n.value.type]
|
10502
10502
|
])
|
10503
10503
|
]),
|
10504
|
-
n.value.type == cA(
|
10504
|
+
n.value.type == cA(J).Text ? (G(), V("div", fp, [
|
10505
10505
|
u[20] || (u[20] = T("label", { class: "block mt-4" }, "最小文本长度", -1)),
|
10506
10506
|
Ce(T("input", {
|
10507
10507
|
"onUpdate:modelValue": u[1] || (u[1] = (o) => n.value.rule.minText = o),
|
@@ -10509,8 +10509,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10509
10509
|
}, null, 512), [
|
10510
10510
|
[ct, n.value.rule.minText]
|
10511
10511
|
])
|
10512
|
-
])) :
|
10513
|
-
n.value.type == cA(
|
10512
|
+
])) : q("", !0),
|
10513
|
+
n.value.type == cA(J).Text ? (G(), V("div", hp, [
|
10514
10514
|
u[21] || (u[21] = T("label", { class: "block mt-4" }, "最大文本长度", -1)),
|
10515
10515
|
Ce(T("input", {
|
10516
10516
|
"onUpdate:modelValue": u[2] || (u[2] = (o) => n.value.rule.maxText = o),
|
@@ -10518,8 +10518,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10518
10518
|
}, null, 512), [
|
10519
10519
|
[ct, n.value.rule.maxText]
|
10520
10520
|
])
|
10521
|
-
])) :
|
10522
|
-
n.value.type == cA(
|
10521
|
+
])) : q("", !0),
|
10522
|
+
n.value.type == cA(J).Image ? (G(), V("div", dp, [
|
10523
10523
|
u[22] || (u[22] = T("label", { class: "block mt-4" }, "是否裁剪", -1)),
|
10524
10524
|
Re(It, {
|
10525
10525
|
class: "py-2",
|
@@ -10527,8 +10527,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10527
10527
|
"onUpdate:modelValue": u[3] || (u[3] = (o) => n.value.rule.crop = o),
|
10528
10528
|
label: "是"
|
10529
10529
|
}, null, 8, ["modelValue"])
|
10530
|
-
])) :
|
10531
|
-
n.value.type == cA(
|
10530
|
+
])) : q("", !0),
|
10531
|
+
n.value.type == cA(J).Image ? (G(), V("div", Bp, [
|
10532
10532
|
u[23] || (u[23] = T("label", { class: "block mt-4" }, "图片宽度", -1)),
|
10533
10533
|
Ce(T("input", {
|
10534
10534
|
"onUpdate:modelValue": u[4] || (u[4] = (o) => n.value.rule.minImageWidth = o),
|
@@ -10536,8 +10536,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10536
10536
|
}, null, 512), [
|
10537
10537
|
[ct, n.value.rule.minImageWidth]
|
10538
10538
|
])
|
10539
|
-
])) :
|
10540
|
-
n.value.type == cA(
|
10539
|
+
])) : q("", !0),
|
10540
|
+
n.value.type == cA(J).Image ? (G(), V("div", gp, [
|
10541
10541
|
u[24] || (u[24] = T("label", { class: "block mt-4" }, "图片高度", -1)),
|
10542
10542
|
Ce(T("input", {
|
10543
10543
|
"onUpdate:modelValue": u[5] || (u[5] = (o) => n.value.rule.maxImageHeight = o),
|
@@ -10545,8 +10545,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10545
10545
|
}, null, 512), [
|
10546
10546
|
[ct, n.value.rule.maxImageHeight]
|
10547
10547
|
])
|
10548
|
-
])) :
|
10549
|
-
n.value.type == cA(
|
10548
|
+
])) : q("", !0),
|
10549
|
+
n.value.type == cA(J).Block ? (G(), V("div", Ep, [
|
10550
10550
|
u[25] || (u[25] = T("label", { class: "block mt-4" }, "块最小数量", -1)),
|
10551
10551
|
Ce(T("input", {
|
10552
10552
|
"onUpdate:modelValue": u[6] || (u[6] = (o) => n.value.rule.minBlock = o),
|
@@ -10554,8 +10554,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10554
10554
|
}, null, 512), [
|
10555
10555
|
[ct, n.value.rule.minBlock]
|
10556
10556
|
])
|
10557
|
-
])) :
|
10558
|
-
n.value.type == cA(
|
10557
|
+
])) : q("", !0),
|
10558
|
+
n.value.type == cA(J).Block ? (G(), V("div", pp, [
|
10559
10559
|
u[26] || (u[26] = T("label", { class: "block mt-4" }, "块最大数量", -1)),
|
10560
10560
|
Ce(T("input", {
|
10561
10561
|
"onUpdate:modelValue": u[7] || (u[7] = (o) => n.value.rule.maxBlock = o),
|
@@ -10563,8 +10563,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10563
10563
|
}, null, 512), [
|
10564
10564
|
[ct, n.value.rule.maxBlock]
|
10565
10565
|
])
|
10566
|
-
])) :
|
10567
|
-
n.value.type == cA(
|
10566
|
+
])) : q("", !0),
|
10567
|
+
n.value.type == cA(J).Block ? (G(), V("div", Cp, [
|
10568
10568
|
u[28] || (u[28] = T("label", { class: "block mt-4" }, "PC端每行列数", -1)),
|
10569
10569
|
Ce(T("select", {
|
10570
10570
|
multiple: "",
|
@@ -10586,8 +10586,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10586
10586
|
]), 512), [
|
10587
10587
|
[Fs, n.value.rule.flexColumns]
|
10588
10588
|
])
|
10589
|
-
])) :
|
10590
|
-
n.value.type == cA(
|
10589
|
+
])) : q("", !0),
|
10590
|
+
n.value.type == cA(J).Block ? (G(), V("div", mp, [
|
10591
10591
|
u[30] || (u[30] = T("label", { class: "block mt-4" }, "移动端每行列数", -1)),
|
10592
10592
|
Ce(T("select", {
|
10593
10593
|
"onUpdate:modelValue": u[9] || (u[9] = (o) => n.value.rule.mobileFlexColumn = o),
|
@@ -10603,8 +10603,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10603
10603
|
]), 512), [
|
10604
10604
|
[Fs, n.value.rule.mobileFlexColumn]
|
10605
10605
|
])
|
10606
|
-
])) :
|
10607
|
-
n.value.type == cA(
|
10606
|
+
])) : q("", !0),
|
10607
|
+
n.value.type == cA(J).Text || n.value.type == cA(J).Icon || n.value.type == cA(J).Button ? (G(), V("div", wp, [
|
10608
10608
|
u[31] || (u[31] = T("label", { class: "block mt-4" }, "主题色", -1)),
|
10609
10609
|
Re(It, {
|
10610
10610
|
class: "py-2",
|
@@ -10612,7 +10612,7 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10612
10612
|
"onUpdate:modelValue": u[10] || (u[10] = (o) => n.value.rule.isThemeColor = o),
|
10613
10613
|
label: "是"
|
10614
10614
|
}, null, 8, ["modelValue"])
|
10615
|
-
])) :
|
10615
|
+
])) : q("", !0),
|
10616
10616
|
T("div", null, [
|
10617
10617
|
u[32] || (u[32] = T("label", { class: "block mt-4" }, "是否必填", -1)),
|
10618
10618
|
Re(It, {
|
@@ -10631,7 +10631,7 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10631
10631
|
label: "是"
|
10632
10632
|
}, null, 8, ["modelValue"])
|
10633
10633
|
]),
|
10634
|
-
n.value.type == cA(
|
10634
|
+
n.value.type == cA(J).Link || n.value.type == cA(J).Button ? (G(), V("div", Tp, [
|
10635
10635
|
u[34] || (u[34] = T("label", { class: "block mt-4" }, "打开美洽", -1)),
|
10636
10636
|
Re(It, {
|
10637
10637
|
class: "py-2",
|
@@ -10639,8 +10639,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10639
10639
|
"onUpdate:modelValue": u[13] || (u[13] = (o) => n.value.rule.openMeiqia = o),
|
10640
10640
|
label: "是"
|
10641
10641
|
}, null, 8, ["modelValue"])
|
10642
|
-
])) :
|
10643
|
-
n.value.type == cA(
|
10642
|
+
])) : q("", !0),
|
10643
|
+
n.value.type == cA(J).Link || n.value.type == cA(J).Button ? (G(), V("div", bp, [
|
10644
10644
|
u[35] || (u[35] = T("label", { class: "block mt-4" }, "链接", -1)),
|
10645
10645
|
Ce(T("input", {
|
10646
10646
|
"onUpdate:modelValue": u[14] || (u[14] = (o) => n.value.rule.linkUrl = o),
|
@@ -10648,8 +10648,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10648
10648
|
}, null, 512), [
|
10649
10649
|
[ct, n.value.rule.linkUrl]
|
10650
10650
|
])
|
10651
|
-
])) :
|
10652
|
-
n.value.type == cA(
|
10651
|
+
])) : q("", !0),
|
10652
|
+
n.value.type == cA(J).Text ? (G(), V("div", Up, [
|
10653
10653
|
u[36] || (u[36] = T("label", { class: "block mt-4" }, "允许换行(回车/粘贴多段文本等)", -1)),
|
10654
10654
|
Re(It, {
|
10655
10655
|
class: "py-2",
|
@@ -10657,8 +10657,8 @@ const It = /* @__PURE__ */ ot(ep, [["render", ap], ["__scopeId", "data-v-68b8f27
|
|
10657
10657
|
"onUpdate:modelValue": u[15] || (u[15] = (o) => n.value.rule.allowWrap = o),
|
10658
10658
|
label: "是"
|
10659
10659
|
}, null, 8, ["modelValue"])
|
10660
|
-
])) :
|
10661
|
-
])) :
|
10660
|
+
])) : q("", !0)
|
10661
|
+
])) : q("", !0),
|
10662
10662
|
T("button", {
|
10663
10663
|
onClick: s,
|
10664
10664
|
class: "mt-4 p-2 bg-green-500 text-white rounded"
|
@@ -11120,9 +11120,9 @@ function tC(A, e, t, r) {
|
|
11120
11120
|
aspectRatio: n,
|
11121
11121
|
width: lA,
|
11122
11122
|
height: Z
|
11123
|
-
}, "cover"), Ae = Math.min(VA.width, Math.max(HA.width, s)), SA = Math.min(VA.height, Math.max(HA.height, a)),
|
11124
|
-
return iA.width = Gt(jA), iA.height = Gt(yA), fA.fillStyle = v, fA.fillRect(0, 0, jA, yA), fA.save(), fA.translate(jA / 2, yA / 2), fA.rotate(o * Math.PI / 180), fA.scale(l, h), fA.imageSmoothingEnabled = D, fA.imageSmoothingQuality = H, fA.drawImage.apply(fA, [A].concat(el(
|
11125
|
-
return Math.floor(Gt(
|
11123
|
+
}, "cover"), Ae = Math.min(VA.width, Math.max(HA.width, s)), SA = Math.min(VA.height, Math.max(HA.height, a)), S = [-Ae / 2, -SA / 2, Ae, SA];
|
11124
|
+
return iA.width = Gt(jA), iA.height = Gt(yA), fA.fillStyle = v, fA.fillRect(0, 0, jA, yA), fA.save(), fA.translate(jA / 2, yA / 2), fA.rotate(o * Math.PI / 180), fA.scale(l, h), fA.imageSmoothingEnabled = D, fA.imageSmoothingQuality = H, fA.drawImage.apply(fA, [A].concat(el(S.map(function(L) {
|
11125
|
+
return Math.floor(Gt(L));
|
11126
11126
|
})))), fA.restore(), iA;
|
11127
11127
|
}
|
11128
11128
|
var hl = String.fromCharCode;
|
@@ -12174,7 +12174,7 @@ const EC = {
|
|
12174
12174
|
T("div", IC, [
|
12175
12175
|
T("div", vC, [
|
12176
12176
|
T("div", _C, [
|
12177
|
-
c.value.image ?
|
12177
|
+
c.value.image ? q("", !0) : (G(), V("div", yC, " 请上传图片 ")),
|
12178
12178
|
T("img", {
|
12179
12179
|
id: "imgId",
|
12180
12180
|
src: c.value.image,
|
@@ -12205,7 +12205,7 @@ const EC = {
|
|
12205
12205
|
])
|
12206
12206
|
])
|
12207
12207
|
])
|
12208
|
-
])) :
|
12208
|
+
])) : q("", !0);
|
12209
12209
|
};
|
12210
12210
|
}
|
12211
12211
|
}), OC = ye({
|
@@ -12274,7 +12274,7 @@ function GC(A, e, t, r, n, s) {
|
|
12274
12274
|
}, [
|
12275
12275
|
T("div", RC, [
|
12276
12276
|
T("div", MC, [
|
12277
|
-
A.title ? (G(), V("h3", PC, JA(A.title), 1)) :
|
12277
|
+
A.title ? (G(), V("h3", PC, JA(A.title), 1)) : q("", !0),
|
12278
12278
|
mr(A.$slots, "header"),
|
12279
12279
|
A.showCloseButton ? (G(), V("button", {
|
12280
12280
|
key: 1,
|
@@ -12294,7 +12294,7 @@ function GC(A, e, t, r, n, s) {
|
|
12294
12294
|
"clip-rule": "evenodd"
|
12295
12295
|
})
|
12296
12296
|
], -1)
|
12297
|
-
]))) :
|
12297
|
+
]))) : q("", !0)
|
12298
12298
|
]),
|
12299
12299
|
T("div", kC, [
|
12300
12300
|
mr(A.$slots, "default")
|
@@ -12305,16 +12305,16 @@ function GC(A, e, t, r, n, s) {
|
|
12305
12305
|
key: 0,
|
12306
12306
|
class: "px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded hover:bg-gray-200",
|
12307
12307
|
onClick: e[1] || (e[1] = (...a) => A.onCancel && A.onCancel(...a))
|
12308
|
-
}, JA(A.cancelText), 1)) :
|
12308
|
+
}, JA(A.cancelText), 1)) : q("", !0),
|
12309
12309
|
A.showOkButton ? (G(), V("button", {
|
12310
12310
|
key: 1,
|
12311
12311
|
class: "px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded hover:bg-blue-700",
|
12312
12312
|
onClick: e[2] || (e[2] = (...a) => A.onOk && A.onOk(...a))
|
12313
|
-
}, JA(A.okText), 1)) :
|
12313
|
+
}, JA(A.okText), 1)) : q("", !0)
|
12314
12314
|
])
|
12315
|
-
])) :
|
12315
|
+
])) : q("", !0)
|
12316
12316
|
])
|
12317
|
-
])) :
|
12317
|
+
])) : q("", !0);
|
12318
12318
|
}
|
12319
12319
|
const VC = /* @__PURE__ */ ot(OC, [["render", GC]]), YC = { class: "p-4 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]" }, XC = ["onClick"], WC = /* @__PURE__ */ ye({
|
12320
12320
|
__name: "GpIcon",
|
@@ -12468,7 +12468,7 @@ function em(A, e, t, r, n, s) {
|
|
12468
12468
|
T("div", { class: "text-gray-400 text-lg text-center" }, " 点击或拖拽上传图片 ")
|
12469
12469
|
], -1))
|
12470
12470
|
], !0)
|
12471
|
-
])) :
|
12471
|
+
])) : q("", !0),
|
12472
12472
|
T("input", {
|
12473
12473
|
type: "file",
|
12474
12474
|
ref: "inputRef",
|
@@ -12488,7 +12488,7 @@ function em(A, e, t, r, n, s) {
|
|
12488
12488
|
src: a.thumbUrl,
|
12489
12489
|
alt: "preview",
|
12490
12490
|
class: "w-12 h-12 object-cover rounded"
|
12491
|
-
}, null, 8, zC)) :
|
12491
|
+
}, null, 8, zC)) : q("", !0),
|
12492
12492
|
T("span", null, JA(a.name), 1)
|
12493
12493
|
]),
|
12494
12494
|
T("div", null, [
|
@@ -12498,7 +12498,7 @@ function em(A, e, t, r, n, s) {
|
|
12498
12498
|
}, " 删除 ", 8, Am)
|
12499
12499
|
])
|
12500
12500
|
]))), 128))
|
12501
|
-
])) :
|
12501
|
+
])) : q("", !0)
|
12502
12502
|
]);
|
12503
12503
|
}
|
12504
12504
|
const tm = /* @__PURE__ */ ot(JC, [["render", em], ["__scopeId", "data-v-08babff9"]]);
|
@@ -17052,7 +17052,7 @@ var CA = function(A, e, t, r, n) {
|
|
17052
17052
|
switch (c.label) {
|
17053
17053
|
case 0:
|
17054
17054
|
r = t.styles.backgroundImage.length - 1, n = function(l) {
|
17055
|
-
var f, h, C, sA, EA, bA, Z, iA, k, p, sA, EA, bA, Z, iA, w, U, v, I, D, P, H, E, N, k, R, sA, lA, gA, Z, iA, fA, EA, bA, jA, yA, VA, HA, Ae, SA,
|
17055
|
+
var f, h, C, sA, EA, bA, Z, iA, k, p, sA, EA, bA, Z, iA, w, U, v, I, D, P, H, E, N, k, R, sA, lA, gA, Z, iA, fA, EA, bA, jA, yA, VA, HA, Ae, SA, S, L;
|
17056
17056
|
return XA(this, function(z) {
|
17057
17057
|
switch (z.label) {
|
17058
17058
|
case 0:
|
@@ -17079,7 +17079,7 @@ var CA = function(A, e, t, r, n) {
|
|
17079
17079
|
null
|
17080
17080
|
]), sA = R[0], lA = R[1], gA = R[2], Z = R[3], iA = R[4], fA = l.position.length === 0 ? [Si] : l.position, EA = pA(fA[0], Z), bA = pA(fA[fA.length - 1], iA), jA = $1(l, EA, bA, Z, iA), yA = jA[0], VA = jA[1], yA > 0 && VA > 0 && (HA = s.ctx.createRadialGradient(lA + EA, gA + bA, 0, lA + EA, gA + bA, yA), zu(l.stops, yA * 2).forEach(function(AA) {
|
17081
17081
|
return HA.addColorStop(AA.stop, DA(AA.color));
|
17082
|
-
}), s.path(sA), s.ctx.fillStyle = HA, yA !== VA ? (Ae = t.bounds.left + 0.5 * t.bounds.width, SA = t.bounds.top + 0.5 * t.bounds.height,
|
17082
|
+
}), s.path(sA), s.ctx.fillStyle = HA, yA !== VA ? (Ae = t.bounds.left + 0.5 * t.bounds.width, SA = t.bounds.top + 0.5 * t.bounds.height, S = VA / yA, L = 1 / S, s.ctx.save(), s.ctx.translate(Ae, SA), s.ctx.transform(1, 0, 0, S, 0, 0), s.ctx.translate(-Ae, -SA), s.ctx.fillRect(lA, L * (gA - SA) + SA, Z, iA * L), s.ctx.restore()) : s.ctx.fill())), z.label = 6;
|
17083
17083
|
case 6:
|
17084
17084
|
return r--, [
|
17085
17085
|
2
|
@@ -17317,9 +17317,9 @@ var CA = function(A, e, t, r, n) {
|
|
17317
17317
|
typeof window < "u" && l0.setContext(window);
|
17318
17318
|
var FU = function(A, e) {
|
17319
17319
|
return ZA(void 0, void 0, void 0, function() {
|
17320
|
-
var t, r, n, s, a, u, o, c, l, f, h, C, p, w, U, v, I, D, P, H, N, E, N, k, R, sA, lA, gA, Z, iA, fA, EA, bA, jA, yA, VA, HA, Ae, SA,
|
17321
|
-
return XA(this, function(
|
17322
|
-
switch (
|
17320
|
+
var t, r, n, s, a, u, o, c, l, f, h, C, p, w, U, v, I, D, P, H, N, E, N, k, R, sA, lA, gA, Z, iA, fA, EA, bA, jA, yA, VA, HA, Ae, SA, S;
|
17321
|
+
return XA(this, function(L) {
|
17322
|
+
switch (L.label) {
|
17323
17323
|
case 0:
|
17324
17324
|
if (!A || typeof A != "object")
|
17325
17325
|
return [2, Promise.reject("Invalid element provided as first argument")];
|
@@ -17345,7 +17345,7 @@ var FU = function(A, e) {
|
|
17345
17345
|
copyStyles: c
|
17346
17346
|
}, o.logger.debug("Starting document clone with size " + u.width + "x" + u.height + " scrolled to " + -u.left + "," + -u.top), f = new vo(o, A, l), h = f.clonedReferenceElement, h ? [4, f.toIFrame(t, u)] : [2, Promise.reject("Unable to find element in cloned iframe")];
|
17347
17347
|
case 1:
|
17348
|
-
return C =
|
17348
|
+
return C = L.sent(), p = Di(h) || Ib(h) ? rm(h.ownerDocument) : gs(o, h), w = p.width, U = p.height, v = p.left, I = p.top, D = IU(o, h, e.backgroundColor), P = {
|
17349
17349
|
canvas: e.canvas,
|
17350
17350
|
backgroundColor: D,
|
17351
17351
|
scale: (yA = (jA = e.scale) !== null && jA !== void 0 ? jA : r.devicePixelRatio) !== null && yA !== void 0 ? yA : 1,
|
@@ -17355,13 +17355,13 @@ var FU = function(A, e) {
|
|
17355
17355
|
height: (SA = e.height) !== null && SA !== void 0 ? SA : Math.ceil(U)
|
17356
17356
|
}, c ? (o.logger.debug("Document cloned, using foreign object rendering"), N = new wU(o, P), [4, N.render(h)]) : [3, 3];
|
17357
17357
|
case 2:
|
17358
|
-
return H =
|
17358
|
+
return H = L.sent(), [3, 5];
|
17359
17359
|
case 3:
|
17360
17360
|
return o.logger.debug("Document cloned, element located at " + v + "," + I + " with size " + w + "x" + U + " using computed rendering"), o.logger.debug("Starting DOM parsing"), E = r0(o, h), D === E.styles.backgroundColor && (E.styles.backgroundColor = Pe.TRANSPARENT), o.logger.debug("Starting renderer for element at " + P.x + "," + P.y + " with size " + P.width + "x" + P.height), N = new BU(o, P), [4, N.render(E)];
|
17361
17361
|
case 4:
|
17362
|
-
H =
|
17362
|
+
H = L.sent(), L.label = 5;
|
17363
17363
|
case 5:
|
17364
|
-
return (!((
|
17364
|
+
return (!((S = e.removeContainer) !== null && S !== void 0) || S) && (vo.destroy(C) || o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")), o.logger.debug("Finished rendering"), [2, H];
|
17365
17365
|
}
|
17366
17366
|
});
|
17367
17367
|
});
|
@@ -17478,11 +17478,11 @@ function _U(A, e, t, r, n, s) {
|
|
17478
17478
|
return G(), V("div", null, [
|
17479
17479
|
T("iframe", {
|
17480
17480
|
ref: "iframeRef",
|
17481
|
-
style: ua(A.iframeStyle)
|
17481
|
+
style: ua([{ "min-height": "600px" }, A.iframeStyle])
|
17482
17482
|
}, null, 4)
|
17483
17483
|
]);
|
17484
17484
|
}
|
17485
|
-
const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-
|
17485
|
+
const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-e4f74412"]]), yU = { class: "flex gp-dsigner" }, SU = {
|
17486
17486
|
key: 0,
|
17487
17487
|
class: "flex items-center justify-between border-b"
|
17488
17488
|
}, LU = { class: "text-lg font-bold p-2" }, xU = { class: "text-sm font-thin text-gray-500" }, HU = { class: "flex-1 overflow-auto" }, NU = {
|
@@ -17598,7 +17598,7 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17598
17598
|
function R(F) {
|
17599
17599
|
if (U.value.xpath == F.xpath) {
|
17600
17600
|
if (U.value) {
|
17601
|
-
if (F.type ===
|
17601
|
+
if (F.type === J.Block) {
|
17602
17602
|
var x = !0;
|
17603
17603
|
const K = N(
|
17604
17604
|
u.value,
|
@@ -17615,7 +17615,7 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17615
17615
|
return;
|
17616
17616
|
}
|
17617
17617
|
}
|
17618
|
-
if (U.value.rule = F.rule, U.value.type = F.type, U.value.type ===
|
17618
|
+
if (U.value.rule = F.rule, U.value.type = F.type, U.value.type === J.Block) {
|
17619
17619
|
const K = N(
|
17620
17620
|
u.value,
|
17621
17621
|
U.value.parentxpath || ""
|
@@ -17669,7 +17669,7 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17669
17669
|
children: QA,
|
17670
17670
|
xpath: Y,
|
17671
17671
|
parentxpath: x,
|
17672
|
-
type: (ue == null ? void 0 : ue.type) ||
|
17672
|
+
type: (ue == null ? void 0 : ue.type) || J.None,
|
17673
17673
|
rule: (ue == null ? void 0 : ue.rule) || {}
|
17674
17674
|
};
|
17675
17675
|
}
|
@@ -17806,18 +17806,18 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17806
17806
|
Y.success && (x.attrs.src = Y.file.url, f.value = (/* @__PURE__ */ new Date()).getTime().toString());
|
17807
17807
|
}) : (x.attrs.src = K.thumbUrl, f.value = (/* @__PURE__ */ new Date()).getTime().toString()));
|
17808
17808
|
}
|
17809
|
-
const SA = $(r.previewWidth),
|
17810
|
-
let
|
17809
|
+
const SA = $(r.previewWidth), S = $(360);
|
17810
|
+
let L = $(!1), z = $(""), AA = 0, ee = 0;
|
17811
17811
|
function Ke(F) {
|
17812
|
-
z.value = F,
|
17812
|
+
z.value = F, L.value = !0, AA = event.clientX, F === "preview" ? ee = SA.value : F === "structure" && (ee = S.value), window.addEventListener("mousemove", zt), window.addEventListener("mouseup", Ar);
|
17813
17813
|
}
|
17814
17814
|
function zt(F) {
|
17815
|
-
if (!
|
17815
|
+
if (!L.value) return;
|
17816
17816
|
const x = F.clientX - AA;
|
17817
|
-
z.value === "preview" ? SA.value = Math.max(200, ee + x) : z.value === "structure" && (
|
17817
|
+
z.value === "preview" ? SA.value = Math.max(200, ee + x) : z.value === "structure" && (S.value = Math.max(200, ee - x));
|
17818
17818
|
}
|
17819
17819
|
function Ar() {
|
17820
|
-
|
17820
|
+
L.value = !1, z.value = "", window.removeEventListener("mousemove", zt), window.removeEventListener("mouseup", Ar);
|
17821
17821
|
}
|
17822
17822
|
return e({
|
17823
17823
|
generateCover: P
|
@@ -17836,7 +17836,7 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17836
17836
|
onClick: x[0] || (x[0] = () => P()),
|
17837
17837
|
class: "p-2 cursor-pointer text-blue-500"
|
17838
17838
|
}, " 封面 ")
|
17839
|
-
])) :
|
17839
|
+
])) : q("", !0),
|
17840
17840
|
T("div", null, [
|
17841
17841
|
c.value ? (G(), je(xo, {
|
17842
17842
|
key: 0,
|
@@ -17856,12 +17856,12 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17856
17856
|
ref: w
|
17857
17857
|
}, null, 8, ["css-files", "js-files", "html-content"]))
|
17858
17858
|
])
|
17859
|
-
], 4)) :
|
17859
|
+
], 4)) : q("", !0),
|
17860
17860
|
F.preview ? (G(), V("div", {
|
17861
17861
|
key: 1,
|
17862
17862
|
class: "resizer",
|
17863
17863
|
onMousedown: x[1] || (x[1] = (K) => Ke("preview"))
|
17864
|
-
}, null, 32)) :
|
17864
|
+
}, null, 32)) : q("", !0),
|
17865
17865
|
T("div", HU, [
|
17866
17866
|
F.showTitle ? (G(), V("div", NU, [
|
17867
17867
|
x[6] || (x[6] = T("h2", { class: "text-lg font-bold" }, "结构渲染", -1)),
|
@@ -17876,7 +17876,7 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17876
17876
|
]),
|
17877
17877
|
x[5] || (x[5] = T("label", { for: "showMargin" }, "间距", -1))
|
17878
17878
|
])
|
17879
|
-
])) :
|
17879
|
+
])) : q("", !0),
|
17880
17880
|
T("div", OU, [
|
17881
17881
|
u.value ? (G(), je(Ap, {
|
17882
17882
|
key: 0,
|
@@ -17898,33 +17898,33 @@ const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-607ae90
|
|
17898
17898
|
onBlockAction: EA,
|
17899
17899
|
onAddIcon: bA,
|
17900
17900
|
onUpdateElementRule: sA
|
17901
|
-
}, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "show-margin", "element", "selectedElement", "hoveredElement"])) :
|
17901
|
+
}, null, 8, ["upload-by-file", "cropper", "icon", "upload", "mode", "icons", "r", "show-margin", "element", "selectedElement", "hoveredElement"])) : q("", !0)
|
17902
17902
|
])
|
17903
17903
|
]),
|
17904
17904
|
l.value == "design" ? (G(), V("div", {
|
17905
17905
|
key: 2,
|
17906
17906
|
class: "resizer",
|
17907
17907
|
onMousedown: x[3] || (x[3] = (K) => Ke("structure"))
|
17908
|
-
}, null, 32)) :
|
17908
|
+
}, null, 32)) : q("", !0),
|
17909
17909
|
l.value == "design" ? (G(), V("div", {
|
17910
17910
|
key: 3,
|
17911
17911
|
class: "resize-area",
|
17912
|
-
style: ua({ width:
|
17912
|
+
style: ua({ width: S.value + "px" })
|
17913
17913
|
}, [
|
17914
17914
|
T("div", RU, [
|
17915
17915
|
F.showTitle ? (G(), V("h2", MU, [
|
17916
17916
|
x[7] || (x[7] = ia(" 节点属性 ")),
|
17917
|
-
T("span", PU, JA(
|
17918
|
-
])) :
|
17917
|
+
T("span", PU, JA(S.value) + "px", 1)
|
17918
|
+
])) : q("", !0),
|
17919
17919
|
T("div", kU, [
|
17920
17920
|
U.value ? (G(), je(Fp, {
|
17921
17921
|
key: 0,
|
17922
17922
|
element: U.value,
|
17923
17923
|
onUpdateElement: R
|
17924
|
-
}, null, 8, ["element"])) :
|
17924
|
+
}, null, 8, ["element"])) : q("", !0)
|
17925
17925
|
])
|
17926
17926
|
])
|
17927
|
-
], 4)) :
|
17927
|
+
], 4)) : q("", !0),
|
17928
17928
|
Re(DC, {
|
17929
17929
|
ref_key: "cropperRef",
|
17930
17930
|
ref: h,
|