epic-designer-gold 1.0.6 → 1.0.7
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/ETable-adkZzXhI.cjs +1 -0
- package/dist/ETable-ogvH56w7.js +50 -0
- package/dist/ETd-BCM7zA8V.cjs +1 -0
- package/dist/{row-DAy14ve9.js → ETd-CRUvOVnZ.js} +13 -13
- package/dist/ETr-BqGghav2.cjs +1 -0
- package/dist/ETr-nIjGkdzO.js +43 -0
- package/dist/attributeView-BCjRZKcy.cjs +1 -0
- package/dist/{attributeView-C_rnFDGo.js → attributeView-CcnkUeu9.js} +7 -7
- package/dist/axios-CXDYiOMX.js +1704 -0
- package/dist/axios-tuVKNgv9.cjs +6 -0
- package/dist/card-C9ua0f7r.cjs +1 -0
- package/dist/card-CI6L3YKU.js +33 -0
- package/dist/cell-AML-qIH9.cjs +1 -0
- package/dist/cell-B_q5hgzb.js +35 -0
- package/dist/col-C4lVVBzC.cjs +1 -0
- package/dist/col-DcVPBKEc.js +31 -0
- package/dist/core/components/builder/src/builder.vue.d.ts +2 -2
- package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +2 -0
- package/dist/core/components/node/src/node.vue.d.ts +3 -2
- package/dist/core/extensions/EColumnEditor/columnItem.vue.d.ts +10 -0
- package/dist/core/extensions/EColumnEditor/index.vue.d.ts +18 -0
- package/dist/core/extensions/PaddingMarginControl/index.vue.d.ts +10 -0
- package/dist/eventView-5fa6mfSD.cjs +1 -0
- package/dist/eventView-C2wKhfU_.js +63 -0
- package/dist/{form-CthzLIgs.cjs → form-Bofkrmkd.cjs} +1 -1
- package/dist/{form-6cUK-Ari.js → form-VbfBmb63.js} +5 -5
- package/dist/iframe-CRF3GSRv.cjs +1 -0
- package/dist/iframe-Fgbk3vqJ.js +48 -0
- package/dist/index-0WmqAKuy.js +4 -0
- package/dist/index-5yjG3fiB.cjs +1 -0
- package/dist/{index-CoCyrWM2.js → index-B0OgKtuT.js} +72 -71
- package/dist/{index-DWxy0GSJ.js → index-B1s67XDZ.js} +11 -15
- package/dist/index-BEUYVwRA.cjs +1 -0
- package/dist/{index-DaJuXp0q.cjs → index-BHEw6RsQ.cjs} +1 -1
- package/dist/index-BHZbtFEF.cjs +1 -0
- package/dist/index-BU05X44j.cjs +1 -0
- package/dist/index-BY37Ndo7.cjs +10 -0
- package/dist/{index-BpROfyMH.cjs → index-BoL2PSBk.cjs} +1 -1
- package/dist/index-BvfkMKTv.cjs +1 -0
- package/dist/{index-Ce470l1n.js → index-BvvGezNc.js} +3 -3
- package/dist/{index-CeVV_SOj.js → index-BydHABbW.js} +3 -3
- package/dist/index-C2s4IuAR.cjs +1 -0
- package/dist/index-CCCx1tbF.cjs +1 -0
- package/dist/index-CD00bJyK.js +839 -0
- package/dist/{index-DpF9E6J8.js → index-CG0UEELU.js} +1 -1
- package/dist/index-CdnV7DS4.js +265 -0
- package/dist/{index-BfdYrl-Q.js → index-Cln9MN7u.js} +1 -1
- package/dist/index-CpBfljmg.cjs +1 -0
- package/dist/{index-BEMPXyNN.js → index-CpTA2IRB.js} +2 -2
- package/dist/index-CpevxZqj.cjs +1 -0
- package/dist/{index-AH-Lj15r.js → index-CraRg8wh.js} +6 -6
- package/dist/{index-cElDeAm2.js → index-Cx7gKpkD.js} +2 -2
- package/dist/index-DYQi05p8.cjs +1 -0
- package/dist/{index-P13z5c0g.js → index-E8jDNKrc.js} +3 -3
- package/dist/index-FgdbKgb5.cjs +1 -0
- package/dist/index-GIYb626z.js +1422 -0
- package/dist/{index-CFZioB1O.js → index-IGxCNti8.js} +48 -28
- package/dist/{index-DK4PrvRF.cjs → index-IPz4bbk7.cjs} +1 -1
- package/dist/index-R2r9Rw5O.cjs +1 -0
- package/dist/{index-DENcRmIy.js → index-WkZdU_zw.js} +2 -2
- package/dist/index-v2u1WTMm.cjs +1 -0
- package/dist/index-vCJWgHu-.js +142 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/modal-DCBqsiP2.cjs +1 -0
- package/dist/modal-DZRBS-Mt.js +58 -0
- package/dist/outline-BE98qFHQ.cjs +1 -0
- package/dist/{outline-DQ8wgGyH.js → outline-Ch5PHy3c.js} +2 -2
- package/dist/pluginManager-BCnrHPYv.js +660 -0
- package/dist/pluginManager-DWHAX8kP.cjs +1 -0
- package/dist/sign-BS-9u6is.cjs +1 -0
- package/dist/{sign-Dfqcv4Fg.js → sign-l63EYvVo.js} +21 -20
- package/dist/style.css +1 -1
- package/dist/styleView-Dhj1GDqf.js +140 -0
- package/dist/styleView-DocskQJQ.cjs +1 -0
- package/dist/tabPanel-CXZYMEwi.cjs +1 -0
- package/dist/{col-D4hvKfJ6.js → tabPanel-DAw7ENrC.js} +7 -7
- package/dist/table-75K2lqjD.js +65 -0
- package/dist/table-CN2LNWqY.cjs +1 -0
- package/dist/tabs-CYH9lAUk.cjs +1 -0
- package/dist/tabs-DCyifACM.js +41 -0
- package/dist/text-B92ioaoV.cjs +1 -0
- package/dist/text-C-b94tBH.js +47 -0
- package/dist/{tree.vue_vue_type_script_setup_true_lang-B-8wkdQS.js → tree.vue_vue_type_script_setup_true_lang-BsVyMb-n.js} +2 -2
- package/dist/tree.vue_vue_type_script_setup_true_lang-VGvT-OYl.cjs +1 -0
- package/dist/ui/elementPlus/ETable/ETable.d.ts +20 -0
- package/dist/ui/elementPlus/ETd/ETd.d.ts +20 -0
- package/dist/ui/elementPlus/ETr/ETr.d.ts +20 -0
- package/dist/ui/elementPlus/ETr/index.d.ts +3 -0
- package/dist/ui/elementPlus/iframe/iframe.d.ts +29 -0
- package/dist/ui/elementPlus/iframe/index.d.ts +3 -0
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +904 -403
- package/dist/ui/elementPlus/rate/index.d.ts +3 -0
- package/dist/ui/elementPlus/tab-panel/index.d.ts +3 -0
- package/dist/ui/elementPlus/table/table.d.ts +9 -0
- package/dist/ui/elementPlus/table-cell/index.d.ts +3 -0
- package/dist/ui/elementPlus/tabs/index.d.ts +2 -0
- package/dist/ui/elementPlus/tabs/tabs.d.ts +29 -0
- package/dist/ui/elementPlus/text/text.d.ts +9 -0
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +1 -1
- package/dist/uploadFile-pgvj4Lm9.cjs +1 -0
- package/dist/uploadFile-qCbXuHfd.js +81 -0
- package/dist/uploadImage-B3sOX-5F.cjs +1 -0
- package/dist/{uploadImage-B3tV49Mm.cjs → uploadImage-CNMsK4Lh.cjs} +1 -1
- package/dist/uploadImage-DQmVV0jl.js +121 -0
- package/dist/{uploadImage-Z6Y6KN1R.js → uploadImage-VFICaVgX.js} +1 -1
- package/package.json +1 -1
- package/dist/attributeView-CEFjPemt.cjs +0 -1
- package/dist/axios-B5oA4AjJ.cjs +0 -6
- package/dist/axios-awtfJhsA.js +0 -2362
- package/dist/card-BowzD9vN.cjs +0 -1
- package/dist/card-CNGNDzPp.js +0 -31
- package/dist/col-B1GUMkMK.cjs +0 -1
- package/dist/col-BNNn9Yx8.cjs +0 -1
- package/dist/col-u5YiB-UK.js +0 -41
- package/dist/index-B0rUZfG_.js +0 -742
- package/dist/index-BOUKAGKU.cjs +0 -1
- package/dist/index-B_BKVTct.cjs +0 -1
- package/dist/index-Ba8KVYrQ.cjs +0 -1
- package/dist/index-BnLI5N3M.cjs +0 -1
- package/dist/index-BxCrqMkz.cjs +0 -1
- package/dist/index-CBBK4Aze.cjs +0 -1
- package/dist/index-CDTcUcwY.cjs +0 -1
- package/dist/index-Cq5wbnmA.cjs +0 -1
- package/dist/index-D8olMR4m.cjs +0 -10
- package/dist/index-DfRZtELz.js +0 -4
- package/dist/index-J9twEwWw.cjs +0 -1
- package/dist/index-oMkqg9Zb.js +0 -1367
- package/dist/index-tR-Y01R8.cjs +0 -1
- package/dist/index-vzxiD3pz.cjs +0 -1
- package/dist/modal-BLOgN3us.cjs +0 -1
- package/dist/modal-UFu4bD6x.js +0 -57
- package/dist/outline-JJ0IbSzs.cjs +0 -1
- package/dist/row-BWnbt6dh.cjs +0 -1
- package/dist/sign-BBoshwS_.cjs +0 -1
- package/dist/styleView-CZEOSq2l.cjs +0 -1
- package/dist/styleView-CajgzMOm.js +0 -106
- package/dist/table-CnBJm7Bx.js +0 -43
- package/dist/table-DM2-xHlv.cjs +0 -1
- package/dist/text-C-52xLjs.js +0 -33
- package/dist/text-X9fl5oe8.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BS6Anq-8.cjs +0 -1
- package/dist/uploadFile-BHn9oVA8.cjs +0 -1
- package/dist/uploadFile-D_0_6ghp.js +0 -77
- package/dist/uploadImage-4U4YGGfK.js +0 -96
- package/dist/uploadImage-C-OyUMFn.cjs +0 -1
- /package/dist/ui/elementPlus/{table-col → ETable}/index.d.ts +0 -0
- /package/dist/ui/elementPlus/{table-row → ETd}/index.d.ts +0 -0
- /package/dist/ui/elementPlus/{table-col/col.d.ts → tab-panel/tabPanel.d.ts} +0 -0
- /package/dist/ui/elementPlus/{table-row/row.d.ts → table-cell/cell.d.ts} +0 -0
package/dist/index-B0rUZfG_.js
DELETED
|
@@ -1,742 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, inject as M, ref as C, computed as A, watch as te, openBlock as N, createElementBlock as D, Fragment as G, withDirectives as fe, createElementVNode as R, normalizeClass as oe, toDisplayString as Ne, unref as u, createVNode as z, createCommentVNode as Q, vShow as ve, createBlock as le, mergeProps as $e, withCtx as se, useAttrs as Te, provide as Re, onUnmounted as Be, resolveComponent as Oe, createSlots as Me, renderList as pe, shallowRef as Le, watchEffect as De, nextTick as ye, normalizeStyle as re, renderSlot as He, onMounted as Ve } from "vue";
|
|
2
|
-
import { p as J, q as ie, i as ue, d as he, r as Ee } from "./axios-awtfJhsA.js";
|
|
3
|
-
import { u as me, a as ze, b as ce, _ as Pe, c as We, d as Ae, e as Ie, w as je, f as Fe } from "./index-oMkqg9Zb.js";
|
|
4
|
-
import { _ as ee } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { d as Ue } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
6
|
-
const Je = { class: "epic-widget-action-item whitespace-nowrap" }, Ze = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "flex items-center"
|
|
9
|
-
}, Qe = /* @__PURE__ */ Y({
|
|
10
|
-
__name: "previewWidgets",
|
|
11
|
-
setup(Z, { expose: H }) {
|
|
12
|
-
const f = M("pageManager", {}), g = M("pageSchema"), n = M("designer"), _ = M("designerProps"), i = M("revoke"), v = C(null), T = C(null), k = C(null), V = C(!1), l = C(!1), s = C(!0), r = C("top"), { canvasScale: a, disabledZoom: w } = me();
|
|
13
|
-
let o = null;
|
|
14
|
-
const P = A(() => {
|
|
15
|
-
const e = n.state.checkedNode;
|
|
16
|
-
return !(!(e != null && e.id) || _.value.lockDefaultSchemaEdit && f.defaultComponentIds.value.includes(e == null ? void 0 : e.id) || e.type === "table-col");
|
|
17
|
-
}), I = A(() => {
|
|
18
|
-
const e = n.state.checkedNode;
|
|
19
|
-
return (e == null ? void 0 : e.type) === "table-col";
|
|
20
|
-
}), B = A(() => {
|
|
21
|
-
const e = n.state.checkedNode;
|
|
22
|
-
return (e == null ? void 0 : e.type) === "table";
|
|
23
|
-
}), p = A(() => {
|
|
24
|
-
var m, S, b, d, E, W;
|
|
25
|
-
const e = f.componentInstances.value, c = (m = n.state.checkedNode) == null ? void 0 : m.id;
|
|
26
|
-
if ((b = (S = n.state.checkedNode) == null ? void 0 : S.componentProps) != null && b.hidden)
|
|
27
|
-
return null;
|
|
28
|
-
const h = J.getComponentConfingByType((d = n.state.checkedNode) == null ? void 0 : d.type) ?? null;
|
|
29
|
-
if (!c || !(e != null && e[c]))
|
|
30
|
-
return null;
|
|
31
|
-
if (h != null && h.defaultSchema.input && ((E = n.state.checkedNode) == null ? void 0 : E.noFormItem) !== !0)
|
|
32
|
-
return (W = e[c + "formItem"]) == null ? void 0 : W.$el;
|
|
33
|
-
const t = e[c];
|
|
34
|
-
return !(t != null && t.$el) || (t == null ? void 0 : t.$el.nodeName) === "#text" || !(t != null && t.$el.getBoundingClientRect) ? null : t == null ? void 0 : t.$el;
|
|
35
|
-
}), y = A(() => {
|
|
36
|
-
var m, S, b, d;
|
|
37
|
-
const e = f.componentInstances.value, c = (m = n.state.hoverNode) == null ? void 0 : m.id, h = J.getComponentConfingByType((S = n.state.hoverNode) == null ? void 0 : S.type) ?? null;
|
|
38
|
-
if (!c || !(e != null && e[c]))
|
|
39
|
-
return null;
|
|
40
|
-
if (h != null && h.defaultSchema.input && ((b = n.state.hoverNode) == null ? void 0 : b.noFormItem) !== !0)
|
|
41
|
-
return (d = e[c + "formItem"]) == null ? void 0 : d.$el;
|
|
42
|
-
const t = e[c];
|
|
43
|
-
return (t == null ? void 0 : t.$el.nodeName) === "#text" ? null : t == null ? void 0 : t.$el;
|
|
44
|
-
}), { mutationObserver: x, observerConfig: j } = ge(ne), { startTimedQuery: q, stopTimedQuery: O } = ze(ne);
|
|
45
|
-
te(
|
|
46
|
-
() => p.value,
|
|
47
|
-
(e) => {
|
|
48
|
-
if (e) {
|
|
49
|
-
V.value = !0, x.observe(e, j);
|
|
50
|
-
const c = e.parentNode;
|
|
51
|
-
c && (c.ondragstart = () => {
|
|
52
|
-
s.value = !1, q();
|
|
53
|
-
}, c.ondragend = () => {
|
|
54
|
-
s.value = !0, O();
|
|
55
|
-
}), ne();
|
|
56
|
-
} else
|
|
57
|
-
V.value = !1;
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
const { mutationObserver: $, observerConfig: L } = ge(de);
|
|
61
|
-
te(
|
|
62
|
-
() => y.value,
|
|
63
|
-
(e) => {
|
|
64
|
-
e && ($.observe(e, L), de());
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
let F = 0;
|
|
68
|
-
te(
|
|
69
|
-
() => {
|
|
70
|
-
var e;
|
|
71
|
-
return (e = n.state.hoverNode) == null ? void 0 : e.id;
|
|
72
|
-
},
|
|
73
|
-
(e) => {
|
|
74
|
-
if (e) {
|
|
75
|
-
l.value = !0, clearTimeout(F);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
F = setTimeout(() => {
|
|
79
|
-
l.value = !1;
|
|
80
|
-
}, 300);
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
let K = 0, U = 0;
|
|
84
|
-
function ne() {
|
|
85
|
-
const e = p.value;
|
|
86
|
-
if (!e || !o) return;
|
|
87
|
-
const { top: c, left: h } = o == null ? void 0 : o.getBoundingClientRect(), { top: t, left: m, width: S, height: b } = e.getBoundingClientRect(), d = w.value ? 1 : a.value, E = t - c + ((o == null ? void 0 : o.scrollTop) ?? 0) * d, W = m - h + ((o == null ? void 0 : o.scrollLeft) ?? 0) * d, X = b / d;
|
|
88
|
-
v.value && (v.value.style.width = `${S / d}px`, v.value.style.height = `${X}px`, v.value.style.top = `${E / d}px`, v.value.style.left = `${W / d}px`, be(E, W)), k.value && (E < 45 && X < 100 ? (k.value.style.top = "", k.value.style.bottom = "-30px", k.value.style["border-radius"] = "0px 0px 4px 4px", r.value = "bottom") : E < 45 ? (k.value.style.top = "0px", k.value.style["border-radius"] = "0px 0px 4px 0", r.value = "center") : (k.value.style.top = "-30px", k.value.style["border-radius"] = "4px 4px 0px 0px", r.value = "top"));
|
|
89
|
-
}
|
|
90
|
-
function be(e, c) {
|
|
91
|
-
const h = p.value;
|
|
92
|
-
if (!o || !h) return;
|
|
93
|
-
const t = o.getBoundingClientRect(), { width: m } = h.getBoundingClientRect(), S = w.value ? 1 : a.value, b = e / S - t.top;
|
|
94
|
-
let d = c / S - t.left + m / S;
|
|
95
|
-
d < t.width && (d = 0);
|
|
96
|
-
const E = o.scrollTop - t.height / 3 + 60, W = o.scrollTop + t.height / 3 * 2, X = o.scrollLeft - t.width + 200, ae = o.scrollLeft + t.width - 200;
|
|
97
|
-
Math.abs(b - K) < 10 && Math.abs(d - U) < 10 || (K = b, U = d, !(b > E && b < W && d > X && d < ae) && (o.scrollTop = b, o.scrollLeft = d));
|
|
98
|
-
}
|
|
99
|
-
function de() {
|
|
100
|
-
var X, ae;
|
|
101
|
-
const e = y.value;
|
|
102
|
-
if (!e) return;
|
|
103
|
-
const { top: c, left: h } = (o == null ? void 0 : o.getBoundingClientRect()) ?? { top: 0, left: 0 }, { top: t, left: m, width: S, height: b } = ((X = e.getBoundingClientRect) == null ? void 0 : X.call(e)) ?? ((ae = e.nextElementSibling) == null ? void 0 : ae.getBoundingClientRect()), d = w.value ? 1 : a.value, E = t - c + ((o == null ? void 0 : o.scrollTop) ?? 0) * d, W = m - h + ((o == null ? void 0 : o.scrollLeft) ?? 0) * d;
|
|
104
|
-
T.value && (T.value.style.width = `${S / d}px`, T.value.style.height = `${b / d}px`, T.value.style.top = `${E / d}px`, T.value.style.left = `${W / d}px`);
|
|
105
|
-
}
|
|
106
|
-
function ge(e) {
|
|
107
|
-
const c = window.MutationObserver, h = {
|
|
108
|
-
childList: !0,
|
|
109
|
-
attributes: !0,
|
|
110
|
-
subtree: !0
|
|
111
|
-
};
|
|
112
|
-
return {
|
|
113
|
-
mutationObserver: new c(e),
|
|
114
|
-
observerConfig: h
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
function _e() {
|
|
118
|
-
var t, m;
|
|
119
|
-
const e = ie(g.schemas, ((t = n.state.checkedNode) == null ? void 0 : t.id) ?? "root");
|
|
120
|
-
if (!e || !e.list || !e.list.length || !e.list[0].children || !e.list[0].children.length)
|
|
121
|
-
return !1;
|
|
122
|
-
let c = JSON.parse(JSON.stringify((m = e.list[0]) == null ? void 0 : m.children[0]));
|
|
123
|
-
c.children.forEach((S, b) => {
|
|
124
|
-
c.children[b].children = [];
|
|
125
|
-
});
|
|
126
|
-
const h = ue(c);
|
|
127
|
-
e.list[0].children.push(h), n.setCheckedNode(h), i.push(g.schemas, "表格增加一行");
|
|
128
|
-
}
|
|
129
|
-
function Se() {
|
|
130
|
-
var h, t, m, S;
|
|
131
|
-
const e = ie(g.schemas, ((h = n.state.checkedNode) == null ? void 0 : h.id) ?? "root");
|
|
132
|
-
if (!((t = e == null ? void 0 : e.list) != null && t.length) || !((S = (m = e.list[0]) == null ? void 0 : m.children) != null && S.length))
|
|
133
|
-
return !1;
|
|
134
|
-
e.list[0].children.forEach((b) => {
|
|
135
|
-
const d = b.children.length + 1, E = Math.floor(24 / d);
|
|
136
|
-
b.children.forEach((W) => {
|
|
137
|
-
W.componentProps.span = E;
|
|
138
|
-
}), b.children.push(
|
|
139
|
-
ue({
|
|
140
|
-
type: "table-col",
|
|
141
|
-
children: [],
|
|
142
|
-
componentProps: {
|
|
143
|
-
span: E
|
|
144
|
-
}
|
|
145
|
-
})
|
|
146
|
-
);
|
|
147
|
-
}), i.push(g.schemas, "表格增加一列");
|
|
148
|
-
}
|
|
149
|
-
function ke() {
|
|
150
|
-
var S;
|
|
151
|
-
const e = ie(g.schemas, ((S = n.state.checkedNode) == null ? void 0 : S.id) ?? "root");
|
|
152
|
-
if (!e)
|
|
153
|
-
return !1;
|
|
154
|
-
const { list: c, schema: h, index: t } = e, m = ue(h);
|
|
155
|
-
c.splice(t + 1, 0, m), n.setCheckedNode(m), i.push(g.schemas, "复制组件");
|
|
156
|
-
}
|
|
157
|
-
function we() {
|
|
158
|
-
var m;
|
|
159
|
-
const e = ie(g.schemas, ((m = n.state.checkedNode) == null ? void 0 : m.id) ?? "root");
|
|
160
|
-
if (!e)
|
|
161
|
-
return !1;
|
|
162
|
-
let { list: c, schema: h, index: t } = e;
|
|
163
|
-
c.splice(t, 1), t === c.length && t--, n.setCheckedNode(c[t]), i.push(g.schemas, "删除组件");
|
|
164
|
-
}
|
|
165
|
-
function Ce(e) {
|
|
166
|
-
o = e, o == null || o.addEventListener("scroll", () => {
|
|
167
|
-
ne();
|
|
168
|
-
}), ce(p, ne), ce(y, de);
|
|
169
|
-
}
|
|
170
|
-
return H({
|
|
171
|
-
handleInit: Ce
|
|
172
|
-
}), (e, c) => {
|
|
173
|
-
var h, t, m, S, b;
|
|
174
|
-
return N(), D(G, null, [
|
|
175
|
-
fe(R("div", {
|
|
176
|
-
ref_key: "selectorRef",
|
|
177
|
-
ref: v,
|
|
178
|
-
class: oe(["epic-checked-widget absolute pointer-events-none z-20", r.value + " " + (s.value ? "transition-all" : "")])
|
|
179
|
-
}, [
|
|
180
|
-
R("div", {
|
|
181
|
-
class: "epic-widget-action-box",
|
|
182
|
-
ref_key: "actionBoxRef",
|
|
183
|
-
ref: k
|
|
184
|
-
}, [
|
|
185
|
-
R("div", Je, Ne((t = u(J).getComponentConfingByType(((h = u(n).state.checkedNode) == null ? void 0 : h.type) ?? "")) == null ? void 0 : t.defaultSchema.label), 1),
|
|
186
|
-
P.value || B.value || I.value ? (N(), D("div", Ze, [
|
|
187
|
-
P.value ? (N(), D("div", {
|
|
188
|
-
key: 0,
|
|
189
|
-
title: "复制",
|
|
190
|
-
class: "epic-widget-action-item pointer-events-auto",
|
|
191
|
-
onClick: ke
|
|
192
|
-
}, [
|
|
193
|
-
z(u(ee), { name: "icon--epic--copy-all-outline-rounded" })
|
|
194
|
-
])) : Q("", !0),
|
|
195
|
-
B.value ? (N(), D("div", {
|
|
196
|
-
key: 1,
|
|
197
|
-
title: "插入新行",
|
|
198
|
-
class: "epic-widget-action-item pointer-events-auto",
|
|
199
|
-
onClick: _e
|
|
200
|
-
}, [
|
|
201
|
-
z(u(ee), { name: "icon--epic--account-tree-outline-rounded" })
|
|
202
|
-
])) : Q("", !0),
|
|
203
|
-
B.value ? (N(), D("div", {
|
|
204
|
-
key: 2,
|
|
205
|
-
title: "插入新列",
|
|
206
|
-
class: "epic-widget-action-item pointer-events-auto",
|
|
207
|
-
onClick: Se,
|
|
208
|
-
style: { transform: "rotate(270deg)" }
|
|
209
|
-
}, [
|
|
210
|
-
z(u(ee), { name: "icon--epic--account-tree-outline-rounded" })
|
|
211
|
-
])) : Q("", !0),
|
|
212
|
-
P.value ? (N(), D("div", {
|
|
213
|
-
key: 3,
|
|
214
|
-
title: "删除",
|
|
215
|
-
class: "epic-widget-action-item pointer-events-auto",
|
|
216
|
-
onClick: we
|
|
217
|
-
}, [
|
|
218
|
-
z(u(ee), { name: "icon--epic--delete-outline-rounded" })
|
|
219
|
-
])) : Q("", !0)
|
|
220
|
-
])) : Q("", !0)
|
|
221
|
-
], 512)
|
|
222
|
-
], 2), [
|
|
223
|
-
[ve, V.value && ((m = u(n).state.checkedNode) == null ? void 0 : m.id) !== "root"]
|
|
224
|
-
]),
|
|
225
|
-
fe(R("div", {
|
|
226
|
-
ref_key: "hoverWidgetRef",
|
|
227
|
-
ref: T,
|
|
228
|
-
class: "epic-hover-widget absolute transition-all pointer-events-none z-998"
|
|
229
|
-
}, null, 512), [
|
|
230
|
-
[ve, l.value && ((S = u(n).state.checkedNode) == null ? void 0 : S.id) !== ((b = u(n).state.hoverNode) == null ? void 0 : b.id)]
|
|
231
|
-
])
|
|
232
|
-
], 64);
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
}), Ke = /* @__PURE__ */ Y({
|
|
236
|
-
name: "EditNodeItem",
|
|
237
|
-
__name: "editNodeItem",
|
|
238
|
-
props: {
|
|
239
|
-
schemas: {}
|
|
240
|
-
},
|
|
241
|
-
emits: ["update:schemas"],
|
|
242
|
-
setup(Z, { emit: H }) {
|
|
243
|
-
const f = M("designer"), g = M("pageSchema"), n = M("revoke"), _ = Z, i = H, v = A({
|
|
244
|
-
get() {
|
|
245
|
-
return _.schemas;
|
|
246
|
-
},
|
|
247
|
-
set(s) {
|
|
248
|
-
i("update:schemas", s);
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
function T(s) {
|
|
252
|
-
f.setCheckedNode(v.value[s]), f.setDisableHover(!0);
|
|
253
|
-
}
|
|
254
|
-
function k() {
|
|
255
|
-
f.setDisableHover(), n.push(g.schemas, "拖拽组件");
|
|
256
|
-
}
|
|
257
|
-
function V() {
|
|
258
|
-
n.push(g.schemas, "插入组件");
|
|
259
|
-
}
|
|
260
|
-
function l(s) {
|
|
261
|
-
var r, a, w;
|
|
262
|
-
return s.id === ((r = g.schemas[0]) == null ? void 0 : r.id) || (w = (a = J.getComponentConfingByType(s.type)) == null ? void 0 : a.editConstraints) != null && w.immovable ? "unmover-item" : "draggable-item";
|
|
263
|
-
}
|
|
264
|
-
return (s, r) => (N(), le(u(Ue), $e({
|
|
265
|
-
modelValue: v.value,
|
|
266
|
-
"onUpdate:modelValue": r[0] || (r[0] = (a) => v.value = a),
|
|
267
|
-
"item-key": "id",
|
|
268
|
-
"component-data": {
|
|
269
|
-
type: "transition-group"
|
|
270
|
-
},
|
|
271
|
-
class: "epic-draggable-range"
|
|
272
|
-
}, {
|
|
273
|
-
animation: 200,
|
|
274
|
-
group: "edit-draggable",
|
|
275
|
-
handle: ".draggable-item",
|
|
276
|
-
ghostClass: "moveing"
|
|
277
|
-
}, {
|
|
278
|
-
onStart: r[1] || (r[1] = (a) => T(a.oldIndex)),
|
|
279
|
-
onEnd: r[2] || (r[2] = (a) => k()),
|
|
280
|
-
onAdd: r[3] || (r[3] = (a) => {
|
|
281
|
-
T(a.newIndex), V();
|
|
282
|
-
})
|
|
283
|
-
}), {
|
|
284
|
-
item: se(({ element: a, index: w }) => [
|
|
285
|
-
(N(), D("div", {
|
|
286
|
-
class: oe(["widget-box", l(a)]),
|
|
287
|
-
key: w
|
|
288
|
-
}, [
|
|
289
|
-
z(xe, { schema: a }, null, 8, ["schema"])
|
|
290
|
-
], 2))
|
|
291
|
-
]),
|
|
292
|
-
_: 1
|
|
293
|
-
}, 16, ["modelValue"]));
|
|
294
|
-
}
|
|
295
|
-
}), xe = /* @__PURE__ */ Y({
|
|
296
|
-
name: "ENodeItem",
|
|
297
|
-
__name: "nodeItem",
|
|
298
|
-
props: {
|
|
299
|
-
schema: {},
|
|
300
|
-
name: {}
|
|
301
|
-
},
|
|
302
|
-
setup(Z) {
|
|
303
|
-
const H = Te(), f = M("designer"), g = M("pageManager", {}), n = M("pageSchema", {}), _ = C(null);
|
|
304
|
-
Re("nodeAttrs", H);
|
|
305
|
-
const i = Z, v = A(() => {
|
|
306
|
-
var w, o, P, I, B;
|
|
307
|
-
const l = g.componentInstances.value, s = (w = i.schema) == null ? void 0 : w.id, r = J.getComponentConfingByType((o = i.schema) == null ? void 0 : o.type) ?? null;
|
|
308
|
-
if (!s || !(l != null && l[s]))
|
|
309
|
-
return null;
|
|
310
|
-
if (r != null && r.defaultSchema.input && ((P = i.schema) == null ? void 0 : P.noFormItem) !== !0)
|
|
311
|
-
return (I = l[s + "formItem"]) == null ? void 0 : I.$el;
|
|
312
|
-
const a = l[s];
|
|
313
|
-
return ((B = a == null ? void 0 : a.$el) == null ? void 0 : B.nodeName) === "#text" ? null : a == null ? void 0 : a.$el;
|
|
314
|
-
});
|
|
315
|
-
te(() => v.value, (l) => {
|
|
316
|
-
l == null || l.addEventListener("click", T, !1), l == null || l.addEventListener("mouseover", k, !1), l == null || l.addEventListener("mouseout", V, !1);
|
|
317
|
-
}), Be(() => {
|
|
318
|
-
var l, s, r;
|
|
319
|
-
(l = v.value) == null || l.removeEventListener("click", T, !1), (s = v.value) == null || s.removeEventListener("mouseover", k, !1), (r = v.value) == null || r.removeEventListener("mouseout", V, !1);
|
|
320
|
-
});
|
|
321
|
-
function T(l) {
|
|
322
|
-
l.stopPropagation(), f.setCheckedNode(i.schema);
|
|
323
|
-
}
|
|
324
|
-
function k(l) {
|
|
325
|
-
var s;
|
|
326
|
-
i.schema.id !== ((s = n.schemas[0]) == null ? void 0 : s.id) && (l.stopPropagation(), f.setHoverNode(i.schema));
|
|
327
|
-
}
|
|
328
|
-
function V(l) {
|
|
329
|
-
l.stopPropagation(), f.setHoverNode(null);
|
|
330
|
-
}
|
|
331
|
-
return (l, s) => {
|
|
332
|
-
var a, w;
|
|
333
|
-
const r = Oe("ENodeItem");
|
|
334
|
-
return N(), le(u(Pe), {
|
|
335
|
-
ref_key: "nodeRef",
|
|
336
|
-
ref: _,
|
|
337
|
-
componentSchema: i.schema
|
|
338
|
-
}, Me({ _: 2 }, [
|
|
339
|
-
(w = (a = u(J).getComponentConfingByType(i.schema.type)) == null ? void 0 : a.editConstraints) != null && w.childImmovable ? {
|
|
340
|
-
name: "edit-node",
|
|
341
|
-
fn: se(() => [
|
|
342
|
-
(N(!0), D(G, null, pe(i.schema.children, (o) => (N(), le(r, {
|
|
343
|
-
key: o.id,
|
|
344
|
-
schema: o
|
|
345
|
-
}, null, 8, ["schema"]))), 128))
|
|
346
|
-
]),
|
|
347
|
-
key: "0"
|
|
348
|
-
} : {
|
|
349
|
-
name: "edit-node",
|
|
350
|
-
fn: se(() => [
|
|
351
|
-
i.schema.children ? (N(), le(Ke, {
|
|
352
|
-
key: 0,
|
|
353
|
-
schemas: i.schema.children,
|
|
354
|
-
"onUpdate:schemas": s[0] || (s[0] = (o) => i.schema.children = o)
|
|
355
|
-
}, null, 8, ["schemas"])) : Q("", !0)
|
|
356
|
-
]),
|
|
357
|
-
key: "1"
|
|
358
|
-
}
|
|
359
|
-
]), 1032, ["componentSchema"]);
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
}), Xe = { class: "min-w-750px rounded h-full" }, Ye = /* @__PURE__ */ Y({
|
|
363
|
-
__name: "previewJson",
|
|
364
|
-
setup(Z, { expose: H }) {
|
|
365
|
-
const f = J.getComponent("modal"), g = J.getComponent("monacoEditor"), n = {
|
|
366
|
-
theme: "vs-light",
|
|
367
|
-
selectOnLineNumbers: !0,
|
|
368
|
-
minimap: {
|
|
369
|
-
enabled: !1
|
|
370
|
-
},
|
|
371
|
-
readOnly: !0
|
|
372
|
-
}, _ = C(null), i = C(!1), v = M("pageSchema");
|
|
373
|
-
function T() {
|
|
374
|
-
i.value = !1;
|
|
375
|
-
}
|
|
376
|
-
function k() {
|
|
377
|
-
i.value = !0, _.value ? _.value.setValue(JSON.stringify(v, null, 2)) : setTimeout(() => {
|
|
378
|
-
k();
|
|
379
|
-
}, 300);
|
|
380
|
-
}
|
|
381
|
-
function V(l = "epic-data.json") {
|
|
382
|
-
const s = JSON.stringify(v, null, 2);
|
|
383
|
-
var r = `data:text/json;charset=utf-8,${encodeURIComponent(s)}`, a = document.createElement("a");
|
|
384
|
-
a.setAttribute("href", r), a.setAttribute("download", l), a.click();
|
|
385
|
-
}
|
|
386
|
-
return H({
|
|
387
|
-
handleOpen: k
|
|
388
|
-
}), (l, s) => (N(), le(u(f), {
|
|
389
|
-
modelValue: i.value,
|
|
390
|
-
"onUpdate:modelValue": s[0] || (s[0] = (r) => i.value = r),
|
|
391
|
-
title: "查看数据",
|
|
392
|
-
class: "w-900px",
|
|
393
|
-
width: "900px",
|
|
394
|
-
onClose: T,
|
|
395
|
-
onOk: V,
|
|
396
|
-
okText: "导出数据"
|
|
397
|
-
}, {
|
|
398
|
-
default: se(() => [
|
|
399
|
-
R("div", Xe, [
|
|
400
|
-
z(u(g), {
|
|
401
|
-
ref_key: "monacoEditorRef",
|
|
402
|
-
ref: _,
|
|
403
|
-
class: "editor h-full",
|
|
404
|
-
autoToggleTheme: "",
|
|
405
|
-
readOnly: "",
|
|
406
|
-
config: n,
|
|
407
|
-
language: "json"
|
|
408
|
-
}, null, 512)
|
|
409
|
-
])
|
|
410
|
-
]),
|
|
411
|
-
_: 1
|
|
412
|
-
}, 8, ["modelValue"]));
|
|
413
|
-
}
|
|
414
|
-
}), qe = { class: "epic-edit-toolbar flex items-center justify-between px-2" }, Ge = { class: "flex-1 h-full flex items-center" }, et = {
|
|
415
|
-
key: 0,
|
|
416
|
-
class: "epic-divider"
|
|
417
|
-
}, tt = ["title", "onClick"], ot = { class: "flex-1 h-full flex items-center justify-end" }, nt = {
|
|
418
|
-
key: 0,
|
|
419
|
-
class: "flex items-center ml-12px"
|
|
420
|
-
}, lt = { class: "pr-8px w-82px cursor-pointer" }, st = { class: "epic-device h-28px items-center gap-1 rounded-md border p-2px flex" }, at = ["title", "onClick"], it = /* @__PURE__ */ Y({
|
|
421
|
-
__name: "toolbar",
|
|
422
|
-
setup(Z) {
|
|
423
|
-
const H = J.getComponent("select"), { canvasScale: f, disabledZoom: g } = me(), n = C("pc"), _ = M("pageSchema"), i = M("designer"), v = M("revoke"), T = C(null), k = [
|
|
424
|
-
{
|
|
425
|
-
icon: "icon--epic--computer-outline-rounded",
|
|
426
|
-
title: "pc",
|
|
427
|
-
key: "pc"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
icon: "icon--epic--tablet-android-outline-rounded",
|
|
431
|
-
title: "平板",
|
|
432
|
-
key: "pad"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
icon: "icon--epic--phone-iphone-outline-sharp",
|
|
436
|
-
title: "手机",
|
|
437
|
-
key: "mobile"
|
|
438
|
-
}
|
|
439
|
-
], V = A(() => [
|
|
440
|
-
// {
|
|
441
|
-
// icon: "icon--epic--code",
|
|
442
|
-
// title: "查看数据",
|
|
443
|
-
// on: () => handlePreview(),
|
|
444
|
-
// },
|
|
445
|
-
// {
|
|
446
|
-
// icon: "icon--epic--exit-to-app-rounded",
|
|
447
|
-
// title: "导入数据",
|
|
448
|
-
// on: handleOpenFileSelector,
|
|
449
|
-
// },
|
|
450
|
-
{
|
|
451
|
-
icon: "icon--epic--trash",
|
|
452
|
-
title: "清空",
|
|
453
|
-
on: o
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
icon: "icon--epic--undo",
|
|
457
|
-
title: "撤销",
|
|
458
|
-
on: a,
|
|
459
|
-
disabled: !v.recordList.value.length,
|
|
460
|
-
divider: !0
|
|
461
|
-
},
|
|
462
|
-
{
|
|
463
|
-
icon: "icon--epic--redo",
|
|
464
|
-
title: "重做",
|
|
465
|
-
on: w,
|
|
466
|
-
disabled: !v.undoList.value.length
|
|
467
|
-
}
|
|
468
|
-
]), l = C(null), s = A({
|
|
469
|
-
get() {
|
|
470
|
-
return `${(f.value * 100).toFixed(0)}%`;
|
|
471
|
-
},
|
|
472
|
-
set(p) {
|
|
473
|
-
const y = parseFloat(p);
|
|
474
|
-
f.value = y / 100;
|
|
475
|
-
}
|
|
476
|
-
}), r = [
|
|
477
|
-
{
|
|
478
|
-
label: "60%",
|
|
479
|
-
value: "60%"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
label: "80%",
|
|
483
|
-
value: "80%"
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
label: "100%",
|
|
487
|
-
value: "100%"
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
label: "120%",
|
|
491
|
-
value: "120%"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
label: "140%",
|
|
495
|
-
value: "140%"
|
|
496
|
-
}
|
|
497
|
-
];
|
|
498
|
-
function a() {
|
|
499
|
-
const p = v.undo();
|
|
500
|
-
p && (he(_.schemas, p), i.setCheckedNode(_.schemas[0]));
|
|
501
|
-
}
|
|
502
|
-
function w() {
|
|
503
|
-
const p = v.redo();
|
|
504
|
-
p && (he(_.schemas, p), i.setCheckedNode(_.schemas[0]));
|
|
505
|
-
}
|
|
506
|
-
function o() {
|
|
507
|
-
i.reset();
|
|
508
|
-
}
|
|
509
|
-
function P(p) {
|
|
510
|
-
var j;
|
|
511
|
-
const y = (j = p.target.files) == null ? void 0 : j[0];
|
|
512
|
-
if (!y) return;
|
|
513
|
-
p.target.value = null;
|
|
514
|
-
const x = new FileReader();
|
|
515
|
-
x.readAsText(y), x.onload = (q) => {
|
|
516
|
-
var O;
|
|
517
|
-
I((O = q.target) == null ? void 0 : O.result);
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
function I(p) {
|
|
521
|
-
try {
|
|
522
|
-
let y = JSON.parse(p ?? "");
|
|
523
|
-
y.schemas || (y = Ee(y)), he(_, y);
|
|
524
|
-
} catch (y) {
|
|
525
|
-
console.error(y);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
function B(p) {
|
|
529
|
-
i.handleToggleDeviceMode(p), n.value = p;
|
|
530
|
-
const y = {
|
|
531
|
-
pc: {},
|
|
532
|
-
pad: {
|
|
533
|
-
width: "780px",
|
|
534
|
-
mode: p
|
|
535
|
-
},
|
|
536
|
-
mobile: {
|
|
537
|
-
width: "390px",
|
|
538
|
-
height: "844px",
|
|
539
|
-
mode: p
|
|
540
|
-
}
|
|
541
|
-
};
|
|
542
|
-
_.canvas = y[p], console.log("%c [ pageSchema ]-248", "font-size:13px; background:pink; color:#bf2c9f;", _);
|
|
543
|
-
}
|
|
544
|
-
return (p, y) => (N(), D(G, null, [
|
|
545
|
-
R("div", qe, [
|
|
546
|
-
R("div", Ge, [
|
|
547
|
-
(N(!0), D(G, null, pe(V.value, (x, j) => (N(), D(G, { key: j }, [
|
|
548
|
-
x.divider ? (N(), D("div", et)) : Q("", !0),
|
|
549
|
-
R("div", {
|
|
550
|
-
title: x.title,
|
|
551
|
-
class: oe(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer", { disabled: x.disabled }]),
|
|
552
|
-
onClick: x.on
|
|
553
|
-
}, [
|
|
554
|
-
z(u(ee), {
|
|
555
|
-
name: x.icon
|
|
556
|
-
}, null, 8, ["name"])
|
|
557
|
-
], 10, tt)
|
|
558
|
-
], 64))), 128))
|
|
559
|
-
]),
|
|
560
|
-
fe(R("input", {
|
|
561
|
-
type: "file",
|
|
562
|
-
ref_key: "fileRef",
|
|
563
|
-
ref: l,
|
|
564
|
-
accept: ".json,.txt",
|
|
565
|
-
onChange: P
|
|
566
|
-
}, null, 544), [
|
|
567
|
-
[ve, !1]
|
|
568
|
-
]),
|
|
569
|
-
R("div", ot, [
|
|
570
|
-
u(g) ? Q("", !0) : (N(), D("div", nt, [
|
|
571
|
-
R("div", lt, [
|
|
572
|
-
z(u(H), {
|
|
573
|
-
value: s.value,
|
|
574
|
-
"onUpdate:value": y[0] || (y[0] = (x) => s.value = x),
|
|
575
|
-
modelValue: s.value,
|
|
576
|
-
"onUpdate:modelValue": y[1] || (y[1] = (x) => s.value = x),
|
|
577
|
-
options: r,
|
|
578
|
-
size: "small"
|
|
579
|
-
}, null, 8, ["value", "modelValue"])
|
|
580
|
-
])
|
|
581
|
-
])),
|
|
582
|
-
R("div", st, [
|
|
583
|
-
(N(), D(G, null, pe(k, (x) => R("div", {
|
|
584
|
-
key: x.key,
|
|
585
|
-
title: x.title,
|
|
586
|
-
class: oe(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm", { checked: x.key === n.value }]),
|
|
587
|
-
onClick: (j) => B(x.key)
|
|
588
|
-
}, [
|
|
589
|
-
z(u(ee), {
|
|
590
|
-
name: x.icon
|
|
591
|
-
}, null, 8, ["name"])
|
|
592
|
-
], 10, at)), 64))
|
|
593
|
-
])
|
|
594
|
-
])
|
|
595
|
-
]),
|
|
596
|
-
z(Ye, {
|
|
597
|
-
ref_key: "previewJson",
|
|
598
|
-
ref: T
|
|
599
|
-
}, null, 512)
|
|
600
|
-
], 64));
|
|
601
|
-
}
|
|
602
|
-
}), rt = { class: "h-full flex flex-col relative" }, ct = ["draggable"], dt = /* @__PURE__ */ Y({
|
|
603
|
-
__name: "editScreenContainer",
|
|
604
|
-
setup(Z) {
|
|
605
|
-
const H = M("pageSchema"), f = C(null), g = C(null), n = C(null), { pressSpace: _, disabledZoom: i } = me(), {
|
|
606
|
-
handleElementDragStart: v,
|
|
607
|
-
handleElementDrag: T,
|
|
608
|
-
handleElementDragEnd: k
|
|
609
|
-
} = We(f), { width: V, height: l } = Ae(f), { canvasScale: s, handleZoom: r } = Ie(g);
|
|
610
|
-
let a = 0, w = 0;
|
|
611
|
-
const o = C({}), P = C({}), I = C({}), B = Le({ width: 0, height: 0 });
|
|
612
|
-
De(y), te(I, () => {
|
|
613
|
-
ye(p);
|
|
614
|
-
});
|
|
615
|
-
function p() {
|
|
616
|
-
n.value && (B.value = {
|
|
617
|
-
width: n.value.clientWidth,
|
|
618
|
-
height: n.value.clientHeight
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
function y() {
|
|
622
|
-
var O, $;
|
|
623
|
-
I.value = {
|
|
624
|
-
width: ((O = H.canvas) == null ? void 0 : O.width) ?? "0",
|
|
625
|
-
height: (($ = H.canvas) == null ? void 0 : $.height) ?? "0"
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
je(V, x), te(B, x);
|
|
629
|
-
function x() {
|
|
630
|
-
let O = B.value.width || a, $ = B.value.height || w;
|
|
631
|
-
o.value = {
|
|
632
|
-
width: V.value + O + "px",
|
|
633
|
-
// 滚动框宽度,包含额外的宽度
|
|
634
|
-
height: l.value + $ + "px"
|
|
635
|
-
// 滚动框高度,包含额外的高度
|
|
636
|
-
}, P.value = {
|
|
637
|
-
width: O + "px",
|
|
638
|
-
// 画布宽度
|
|
639
|
-
height: $ + "px"
|
|
640
|
-
// 画布高度
|
|
641
|
-
}, j();
|
|
642
|
-
}
|
|
643
|
-
function j() {
|
|
644
|
-
ye(() => {
|
|
645
|
-
var K;
|
|
646
|
-
let O = B.value.width || a;
|
|
647
|
-
const L = (B.value.height || w) / 2, F = O / 2;
|
|
648
|
-
(K = f.value) == null || K.scrollTo(F, L);
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
ce(f, q), ce(g, q);
|
|
652
|
-
function q() {
|
|
653
|
-
var $;
|
|
654
|
-
if (!f.value) return;
|
|
655
|
-
const O = f.value.getBoundingClientRect();
|
|
656
|
-
if (a = O.width - 60, w = O.height - 80, !i.value)
|
|
657
|
-
if (B.value.width === 0)
|
|
658
|
-
s.value = 1;
|
|
659
|
-
else {
|
|
660
|
-
const L = (a - 20) / B.value.width, F = w / (B.value.height || (($ = g.value) == null ? void 0 : $.clientHeight) || 1), K = Math.abs(L - 1) < Math.abs(F - 1);
|
|
661
|
-
let U = 1;
|
|
662
|
-
K ? U = L : U = F, (L < 1 || F < 1) && (U = Math.min(L, F)), U < 1.4 && U > 0.5 && (s.value = U);
|
|
663
|
-
}
|
|
664
|
-
Fe(x, 50)();
|
|
665
|
-
}
|
|
666
|
-
return (O, $) => (N(), D("div", rt, [
|
|
667
|
-
z(it),
|
|
668
|
-
R("div", {
|
|
669
|
-
ref_key: "editScreenContainerRef",
|
|
670
|
-
ref: f,
|
|
671
|
-
class: oe(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container", { "cursor-grab": u(_) }]),
|
|
672
|
-
draggable: u(_),
|
|
673
|
-
onWheel: $[0] || ($[0] = //@ts-ignore
|
|
674
|
-
(...L) => u(r) && u(r)(...L)),
|
|
675
|
-
onDragstart: $[1] || ($[1] = //@ts-ignore
|
|
676
|
-
(...L) => u(v) && u(v)(...L)),
|
|
677
|
-
onDragend: $[2] || ($[2] = //@ts-ignore
|
|
678
|
-
(...L) => u(k) && u(k)(...L)),
|
|
679
|
-
onDrag: $[3] || ($[3] = //@ts-ignore
|
|
680
|
-
(...L) => u(T) && u(T)(...L))
|
|
681
|
-
}, [
|
|
682
|
-
R("div", {
|
|
683
|
-
id: "canvasContainer",
|
|
684
|
-
class: "flex items-center justify-center",
|
|
685
|
-
style: re(o.value)
|
|
686
|
-
}, [
|
|
687
|
-
R("div", {
|
|
688
|
-
ref_key: "draggableElRef",
|
|
689
|
-
ref: g,
|
|
690
|
-
class: "transition-all"
|
|
691
|
-
}, [
|
|
692
|
-
R("div", {
|
|
693
|
-
class: oe({ "pointer-events-none": u(_) }),
|
|
694
|
-
style: re(P.value)
|
|
695
|
-
}, [
|
|
696
|
-
He(O.$slots, "default")
|
|
697
|
-
], 6)
|
|
698
|
-
], 512)
|
|
699
|
-
], 4)
|
|
700
|
-
], 42, ct),
|
|
701
|
-
R("div", {
|
|
702
|
-
ref_key: "sizeBoxRef",
|
|
703
|
-
ref: n,
|
|
704
|
-
class: "absolute top-0 pointer-events-none",
|
|
705
|
-
style: re(I.value)
|
|
706
|
-
}, null, 4)
|
|
707
|
-
]));
|
|
708
|
-
}
|
|
709
|
-
}), ut = { class: "epic-edit-canvas" }, gt = /* @__PURE__ */ Y({
|
|
710
|
-
__name: "index",
|
|
711
|
-
setup(Z) {
|
|
712
|
-
const H = C(null), f = C(null), g = M("pageSchema"), n = A(() => g.schemas[0]), _ = A(() => ({
|
|
713
|
-
width: "100%",
|
|
714
|
-
height: "100%"
|
|
715
|
-
}));
|
|
716
|
-
return Ve(() => {
|
|
717
|
-
var i;
|
|
718
|
-
(i = f.value) == null || i.handleInit(H.value);
|
|
719
|
-
}), (i, v) => (N(), D("section", ut, [
|
|
720
|
-
z(dt, null, {
|
|
721
|
-
default: se(() => [
|
|
722
|
-
R("div", {
|
|
723
|
-
ref_key: "epicEditRangeRef",
|
|
724
|
-
ref: H,
|
|
725
|
-
class: "epic-edit-range rounded-md overflow-auto relative",
|
|
726
|
-
style: re(_.value)
|
|
727
|
-
}, [
|
|
728
|
-
z(xe, { schema: n.value }, null, 8, ["schema"]),
|
|
729
|
-
z(Qe, {
|
|
730
|
-
ref_key: "ePreviewWidgetsRef",
|
|
731
|
-
ref: f
|
|
732
|
-
}, null, 512)
|
|
733
|
-
], 4)
|
|
734
|
-
]),
|
|
735
|
-
_: 1
|
|
736
|
-
})
|
|
737
|
-
]));
|
|
738
|
-
}
|
|
739
|
-
});
|
|
740
|
-
export {
|
|
741
|
-
gt as default
|
|
742
|
-
};
|