epic-designer-gold 0.0.20 → 0.0.22
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/{attributeView-CBU2cmHF.cjs → attributeView-B8JS7SiW.cjs} +1 -1
- package/dist/{attributeView-ukvra0JR.js → attributeView-oIH3-2FN.js} +1 -1
- package/dist/core/components/designer/src/designer.vue.d.ts +0 -1
- package/dist/{eventView-DPBh2jJb.cjs → eventView-BL4A2PVd.cjs} +1 -1
- package/dist/{eventView-CxT-MCmM.js → eventView-Ed_9JLnx.js} +1 -1
- package/dist/{index-Dz7IFRkI.js → index-05ByfwQb.js} +1 -1
- package/dist/index-BUkdmwKe.cjs +10 -0
- package/dist/{index-DK8A_Wv1.cjs → index-Bt6BXCcr.cjs} +1 -1
- package/dist/{index-DL78CTyg.cjs → index-Bts_xVeS.cjs} +1 -1
- package/dist/{index-jOD8Jnq_.cjs → index-Bwmb5sha.cjs} +1 -1
- package/dist/{index-DMYNC73J.js → index-C5XNe5wE.js} +1 -1
- package/dist/{index-Z9U61tAn.js → index-C5yhSYKA.js} +488 -492
- package/dist/{index-CGN7CLXA.js → index-CjrdkSiN.js} +1 -1
- package/dist/{index-c0bxi-CF.cjs → index-CqdmlJ1d.cjs} +1 -1
- package/dist/{index-Boh9Xc_a.js → index-CrGWYheb.js} +1 -1
- package/dist/{index-Bp5jwkKr.cjs → index-CwXlSYIH.cjs} +1 -1
- package/dist/{index-YMEmD-hy.js → index-DWW8LGvj.js} +1 -1
- package/dist/index-DZIjd60A.js +4 -0
- package/dist/{index-bo3mlsNv.cjs → index-D_CH15dJ.cjs} +1 -1
- package/dist/{index-O79tvUa3.js → index-DiMAGPRY.js} +1 -1
- package/dist/{index-DCLSI4pq.cjs → index-DitKpeDV.cjs} +1 -1
- package/dist/{index-CrK_IhiA.js → index-DskzasEn.js} +1 -1
- package/dist/{index-CYS9fPUv.cjs → index-GJSr_nl7.cjs} +1 -1
- package/dist/{index-aHQ5toGq.js → index-nhr7ps1e.js} +1 -1
- package/dist/{index-D3mt_EWz.cjs → index-rby8nugJ.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-CCzd_7fc.cjs → styleView-BDUqyY8T.cjs} +1 -1
- package/dist/{styleView-OSZZjuEF.js → styleView-CtfATcTc.js} +1 -1
- package/package.json +1 -1
- package/dist/index-C7VIh0HN.js +0 -4
- package/dist/index-CgHkcwzW.cjs +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { p as F, a as be, l as
|
|
1
|
+
import { ref as S, reactive as Z, defineComponent as G, openBlock as M, createBlock as L, unref as _, mergeProps as me, withCtx as P, renderSlot as R, getCurrentInstance as ne, inject as H, watch as V, useAttrs as xe, provide as $, shallowRef as Pe, computed as U, watchEffect as se, onUnmounted as Se, resolveComponent as Ve, resolveDynamicComponent as Oe, createVNode as T, createCommentVNode as Ae, useSlots as Fe, createElementBlock as he, Suspense as De, createElementVNode as J, Fragment as Me, renderList as Re, nextTick as Y, effectScope as $e, isRef as Ne, getCurrentScope as Be, onScopeDispose as Ue, onMounted as ve, normalizeClass as Te, toRaw as we } from "vue";
|
|
2
|
+
import { p as F, a as be, l as q, E as de } from "./axios-ITY6Uw7A.js";
|
|
3
3
|
function le(e = 10) {
|
|
4
4
|
const a = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
5
5
|
let n = "";
|
|
@@ -12,22 +12,22 @@ function le(e = 10) {
|
|
|
12
12
|
function Le(e) {
|
|
13
13
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function N(e, a = /* @__PURE__ */ new WeakMap()) {
|
|
16
16
|
if (typeof e != "object" || e === null)
|
|
17
17
|
return e;
|
|
18
18
|
if (a.has(e))
|
|
19
19
|
return a.get(e);
|
|
20
20
|
if (Array.isArray(e)) {
|
|
21
|
-
const o = e.map((t) =>
|
|
21
|
+
const o = e.map((t) => N(t, a));
|
|
22
22
|
return a.set(e, o), o;
|
|
23
23
|
}
|
|
24
24
|
const n = {};
|
|
25
25
|
return a.set(e, n), Object.keys(e).forEach((o) => {
|
|
26
|
-
n[o] =
|
|
26
|
+
n[o] = N(e[o], a);
|
|
27
27
|
}), n;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const [a] = We([
|
|
29
|
+
function Vt(e) {
|
|
30
|
+
const [a] = We([N(e)], (n) => {
|
|
31
31
|
var t, r;
|
|
32
32
|
const o = {
|
|
33
33
|
...n,
|
|
@@ -37,10 +37,10 @@ function Ot(e) {
|
|
|
37
37
|
});
|
|
38
38
|
return a;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function z(e, a, n = !0) {
|
|
41
41
|
for (const [o, t] of Object.entries(a)) {
|
|
42
42
|
let r = e == null ? void 0 : e[o];
|
|
43
|
-
r && t && typeof r == "object" && typeof t == "object" ? (Array.isArray(r) && !Array.isArray(t) ? r = e[o] = {} : !Array.isArray(r) && Array.isArray(t) && (r = e[o] = []),
|
|
43
|
+
r && t && typeof r == "object" && typeof t == "object" ? (Array.isArray(r) && !Array.isArray(t) ? r = e[o] = {} : !Array.isArray(r) && Array.isArray(t) && (r = e[o] = []), z(r, t, n)) : e[o] = t;
|
|
44
44
|
}
|
|
45
45
|
n && Object.keys(e).reverse().forEach((o) => {
|
|
46
46
|
a.hasOwnProperty(o) || (Array.isArray(e) ? e.splice(Number(o), 1) : delete e[o]);
|
|
@@ -55,15 +55,15 @@ function Ee(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
|
|
|
55
55
|
return "[Circular]";
|
|
56
56
|
o.set(r, !0);
|
|
57
57
|
const l = Object.keys(r).sort(), i = {};
|
|
58
|
-
return l.forEach((
|
|
59
|
-
n.includes(
|
|
58
|
+
return l.forEach((c) => {
|
|
59
|
+
n.includes(c) || (i[c] = t(r[c]));
|
|
60
60
|
}), o.delete(r), i;
|
|
61
61
|
} else
|
|
62
62
|
return r;
|
|
63
63
|
};
|
|
64
64
|
return JSON.stringify(t(e)) === JSON.stringify(t(a));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Je(e, a) {
|
|
67
67
|
const n = [];
|
|
68
68
|
let o = !1;
|
|
69
69
|
function t(r) {
|
|
@@ -78,7 +78,7 @@ function ze(e, a) {
|
|
|
78
78
|
}
|
|
79
79
|
return e.forEach(t), o || console.error(`没有查询到id为${a}的节点`), n;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Ot(e, a, n) {
|
|
82
82
|
const o = a.split(".");
|
|
83
83
|
let t = e;
|
|
84
84
|
for (let r = 0; r < o.length; r++) {
|
|
@@ -98,10 +98,10 @@ function Ft(e, a, n) {
|
|
|
98
98
|
return t[o[o.length - 1]] = n, e;
|
|
99
99
|
}
|
|
100
100
|
function Mt(e, a = "default") {
|
|
101
|
-
return
|
|
101
|
+
return ze(e, a).map((o) => o.field);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
const n =
|
|
103
|
+
function ze(e, a = "default") {
|
|
104
|
+
const n = te(
|
|
105
105
|
e,
|
|
106
106
|
(t) => {
|
|
107
107
|
var r;
|
|
@@ -109,14 +109,14 @@ function Je(e, a = "default") {
|
|
|
109
109
|
},
|
|
110
110
|
!0
|
|
111
111
|
);
|
|
112
|
-
return
|
|
112
|
+
return te(
|
|
113
113
|
(n == null ? void 0 : n.children) ?? [],
|
|
114
114
|
(t) => !!t.input,
|
|
115
115
|
!1,
|
|
116
116
|
(t) => t.type !== "subform"
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function te(e, a, n = !1, o) {
|
|
120
120
|
const t = [], r = [...e];
|
|
121
121
|
for (; r.length; ) {
|
|
122
122
|
const l = r.pop();
|
|
@@ -135,12 +135,12 @@ function We(e, a, n) {
|
|
|
135
135
|
if (t != null && t.children && (!n || n(t)) && o.push(...t.children), t != null && t.slots && (!n || n(t)))
|
|
136
136
|
for (let r in t.slots)
|
|
137
137
|
o.push(...t.slots[r]);
|
|
138
|
-
|
|
138
|
+
z(t, a(t));
|
|
139
139
|
}
|
|
140
140
|
return e;
|
|
141
141
|
}
|
|
142
142
|
function Rt(e, a) {
|
|
143
|
-
const n =
|
|
143
|
+
const n = te(
|
|
144
144
|
e,
|
|
145
145
|
(o) => o.id === a,
|
|
146
146
|
!0
|
|
@@ -152,7 +152,7 @@ function Rt(e, a) {
|
|
|
152
152
|
function $t(e, a) {
|
|
153
153
|
const n = [{ type: "", children: e }];
|
|
154
154
|
let o = 0, t = null;
|
|
155
|
-
if (
|
|
155
|
+
if (te(
|
|
156
156
|
n,
|
|
157
157
|
(r) => {
|
|
158
158
|
if (t = r.children ?? null, !t) {
|
|
@@ -217,18 +217,18 @@ function Nt(e) {
|
|
|
217
217
|
],
|
|
218
218
|
script: e.script || ""
|
|
219
219
|
};
|
|
220
|
-
return a.schemas[0].children[0].children =
|
|
220
|
+
return a.schemas[0].children[0].children = ee(e.list), a;
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function ee(e, a) {
|
|
223
223
|
return e.map((n) => {
|
|
224
|
-
var
|
|
224
|
+
var c, w, h;
|
|
225
225
|
let o = n.type ?? "";
|
|
226
|
-
const t = n.options ?? {}, r = (s,
|
|
227
|
-
o === s && (o =
|
|
226
|
+
const t = n.options ?? {}, r = (s, y) => {
|
|
227
|
+
o === s && (o = y, t.defaultValue && (t.defaultValue = JSON.parse(t.defaultValue)));
|
|
228
228
|
};
|
|
229
229
|
if (r("uploadImg", "upload-image"), r("uploadFile", "upload-file"), o === "date" && t.range && (t.type = "daterange", delete t.range), (o === "date" || o === "time") && (t.valueFormat = t.format), o === "textarea") {
|
|
230
|
-
const { minRows: s, maxRows:
|
|
231
|
-
t.autoSize = { minRows: s, maxRows:
|
|
230
|
+
const { minRows: s, maxRows: y } = t;
|
|
231
|
+
t.autoSize = { minRows: s, maxRows: y }, delete t.minRows, delete t.maxRows;
|
|
232
232
|
}
|
|
233
233
|
o === "number" && !t.precision && delete t.precision, t.width && (t.style = { width: t.width }, delete t.width), o === "grid" && (o = "row"), a && a.type === "grid" && (o = "col", t.span = n.span, n.key = le());
|
|
234
234
|
const l = {
|
|
@@ -255,7 +255,7 @@ function ne(e, a) {
|
|
|
255
255
|
"color-picker",
|
|
256
256
|
"upload-file",
|
|
257
257
|
"upload-image"
|
|
258
|
-
].includes(o) && (l.input = !0, ((w = (
|
|
258
|
+
].includes(o) && (l.input = !0, ((w = (c = n.rules) == null ? void 0 : c[0]) == null ? void 0 : w.required) === !1 && n.rules.shift(), ((h = n.rules) == null ? void 0 : h.length) > 0 && (l.rules = n.rules)), n.list && (l.children = ee(n.list, n)), n.columns && (l.children = ee(n.columns, n)), n.trs && (l.children = ee(n.trs, n)), n.tds && (l.children = ee(n.tds, n)), l;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function Bt(e, a) {
|
|
@@ -266,8 +266,8 @@ function Bt(e, a) {
|
|
|
266
266
|
}, a);
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
const e =
|
|
269
|
+
function Ie() {
|
|
270
|
+
const e = S({}), a = S({}), n = S(!1), o = S([]), t = Z({});
|
|
271
271
|
function r(m) {
|
|
272
272
|
return e.value[m];
|
|
273
273
|
}
|
|
@@ -277,18 +277,18 @@ function ke() {
|
|
|
277
277
|
function i(m) {
|
|
278
278
|
delete e.value[m];
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const
|
|
282
|
-
(E, [
|
|
280
|
+
function c(m, g = !1) {
|
|
281
|
+
const v = Object.entries(F.publicMethods).reduce(
|
|
282
|
+
(E, [O, B]) => (E[O] = B.handler, E),
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
285
|
try {
|
|
286
286
|
new Function(`const epic = this;${m}`).bind({
|
|
287
|
-
...
|
|
287
|
+
...v,
|
|
288
288
|
getComponent: r,
|
|
289
289
|
find: r,
|
|
290
290
|
defineExpose: w,
|
|
291
|
-
publicMethods:
|
|
291
|
+
publicMethods: v,
|
|
292
292
|
pluginManager: F
|
|
293
293
|
})();
|
|
294
294
|
} catch (E) {
|
|
@@ -298,74 +298,74 @@ function ke() {
|
|
|
298
298
|
function w(m) {
|
|
299
299
|
m != null && (a.value = m);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function h(m, ...g) {
|
|
302
302
|
if (!m || m.length === 0) {
|
|
303
303
|
console.warn("未提供任何动作");
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
|
-
m.forEach((
|
|
307
|
-
const E =
|
|
308
|
-
switch (
|
|
306
|
+
m.forEach((v) => {
|
|
307
|
+
const E = v.args ? JSON.parse(v.args) : g;
|
|
308
|
+
switch (v.type) {
|
|
309
309
|
case "public":
|
|
310
|
-
s(
|
|
310
|
+
s(v, E);
|
|
311
311
|
break;
|
|
312
312
|
case "custom":
|
|
313
|
-
|
|
313
|
+
y(v, E);
|
|
314
314
|
break;
|
|
315
315
|
case "component":
|
|
316
|
-
|
|
316
|
+
d(v, E);
|
|
317
317
|
break;
|
|
318
318
|
default:
|
|
319
|
-
console.warn(`未知的动作类型: ${
|
|
319
|
+
console.warn(`未知的动作类型: ${v.type}`);
|
|
320
320
|
break;
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
function s(m, g) {
|
|
325
|
-
var
|
|
325
|
+
var v;
|
|
326
326
|
try {
|
|
327
|
-
(
|
|
327
|
+
(v = F.publicMethods[m.methodName]) == null || v.handler(...g);
|
|
328
328
|
} catch (E) {
|
|
329
329
|
console.error(`[Epic:公共函数(${m.methodName})]执行异常:`, E);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
332
|
+
function y(m, g) {
|
|
333
|
+
var v, E;
|
|
334
334
|
try {
|
|
335
|
-
(E = (
|
|
336
|
-
} catch (
|
|
337
|
-
console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`,
|
|
335
|
+
(E = (v = a.value)[m.methodName]) == null || E.call(v, ...g);
|
|
336
|
+
} catch (O) {
|
|
337
|
+
console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`, O);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
340
|
+
function d(m, g) {
|
|
341
|
+
const v = m.componentId != null && r(m.componentId);
|
|
342
|
+
if (!v) {
|
|
343
343
|
console.warn(`[Epic:组件${m.componentId}]未找到`);
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
try {
|
|
347
|
-
|
|
347
|
+
v[m.methodName](...g);
|
|
348
348
|
} catch (E) {
|
|
349
349
|
console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`, E);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function f(m = !0) {
|
|
353
353
|
n.value = m;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const g =
|
|
357
|
-
o.value = g.map((
|
|
355
|
+
function u(m) {
|
|
356
|
+
const g = te(m, () => !0);
|
|
357
|
+
o.value = g.map((v) => v.id);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function A(m, g = "default") {
|
|
360
360
|
if (t[g]) {
|
|
361
|
-
const
|
|
362
|
-
|
|
361
|
+
const v = t[g];
|
|
362
|
+
z(m, v);
|
|
363
363
|
}
|
|
364
364
|
t[g] = m;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function C(m, g = "default") {
|
|
367
367
|
if (t[g]) {
|
|
368
|
-
|
|
368
|
+
z(t[g], m, !1);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
371
|
t[g] = m;
|
|
@@ -376,40 +376,40 @@ function ke() {
|
|
|
376
376
|
isDesignMode: n,
|
|
377
377
|
defaultComponentIds: o,
|
|
378
378
|
forms: t,
|
|
379
|
-
addFormData:
|
|
380
|
-
setFormData:
|
|
379
|
+
addFormData: A,
|
|
380
|
+
setFormData: C,
|
|
381
381
|
getComponentInstance: r,
|
|
382
382
|
// 简化查询函数, 推荐使用
|
|
383
383
|
find: r,
|
|
384
384
|
addComponentInstance: l,
|
|
385
385
|
removeComponentInstance: i,
|
|
386
|
-
setMethods:
|
|
387
|
-
doActions:
|
|
388
|
-
setDesignMode:
|
|
389
|
-
setDefaultComponentIds:
|
|
386
|
+
setMethods: c,
|
|
387
|
+
doActions: h,
|
|
388
|
+
setDesignMode: f,
|
|
389
|
+
setDefaultComponentIds: u
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function He() {
|
|
393
|
-
const e =
|
|
393
|
+
const e = S([]), a = S([]), n = S(null);
|
|
394
394
|
let o = 0;
|
|
395
|
-
function t(
|
|
396
|
-
const
|
|
397
|
-
o + 150 >
|
|
395
|
+
function t(c, w = "插入组件") {
|
|
396
|
+
const h = Date.now();
|
|
397
|
+
o + 150 > h || (o = h, n.value != null && (e.value.push(n.value), a.value.splice(0, a.value.length)), n.value = {
|
|
398
398
|
type: w,
|
|
399
|
-
componentSchema: JSON.stringify(
|
|
399
|
+
componentSchema: JSON.stringify(c)
|
|
400
400
|
}, e.value.length > 60 && e.value.unshift());
|
|
401
401
|
}
|
|
402
402
|
function r() {
|
|
403
403
|
if (e.value.length === 0)
|
|
404
404
|
return !1;
|
|
405
|
-
const
|
|
406
|
-
return n.value != null && a.value.push(n.value), n.value =
|
|
405
|
+
const c = e.value.pop();
|
|
406
|
+
return n.value != null && a.value.push(n.value), n.value = c, JSON.parse(c.componentSchema);
|
|
407
407
|
}
|
|
408
408
|
function l() {
|
|
409
409
|
if (a.value.length === 0)
|
|
410
410
|
return !1;
|
|
411
|
-
const
|
|
412
|
-
return n.value != null && e.value.push(n.value), n.value =
|
|
411
|
+
const c = a.value.pop();
|
|
412
|
+
return n.value != null && e.value.push(n.value), n.value = c, JSON.parse(c.componentSchema);
|
|
413
413
|
}
|
|
414
414
|
function i() {
|
|
415
415
|
e.value = [], a.value = [], n.value = null;
|
|
@@ -424,7 +424,7 @@ function He() {
|
|
|
424
424
|
reset: i
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
const Ke = /* @__PURE__ */
|
|
427
|
+
const Ke = /* @__PURE__ */ G({
|
|
428
428
|
__name: "dynamicFormItem",
|
|
429
429
|
props: {
|
|
430
430
|
hasFormItem: { type: Boolean },
|
|
@@ -432,22 +432,22 @@ const Ke = /* @__PURE__ */ Y({
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["updateFormItemRef"],
|
|
434
434
|
setup(e, { emit: a }) {
|
|
435
|
-
const n = F.getComponent("form-item"), o = e, t = a, r =
|
|
435
|
+
const n = F.getComponent("form-item"), o = e, t = a, r = S(), l = () => {
|
|
436
436
|
t("updateFormItemRef", r.value);
|
|
437
437
|
};
|
|
438
|
-
return (i,
|
|
438
|
+
return (i, c) => o.hasFormItem ? (M(), L(_(n), me({
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "formItemRef",
|
|
441
441
|
ref: r,
|
|
442
442
|
onVnodeMounted: l
|
|
443
443
|
}, o.formItemProps), {
|
|
444
444
|
default: P(() => [
|
|
445
|
-
|
|
445
|
+
R(i.$slots, "default")
|
|
446
446
|
]),
|
|
447
447
|
_: 3
|
|
448
|
-
}, 16, ["onVnodeMounted"])) :
|
|
448
|
+
}, 16, ["onVnodeMounted"])) : R(i.$slots, "default", { key: 1 });
|
|
449
449
|
}
|
|
450
|
-
}), qe = /* @__PURE__ */
|
|
450
|
+
}), qe = /* @__PURE__ */ G({
|
|
451
451
|
name: "ENode",
|
|
452
452
|
__name: "node",
|
|
453
453
|
props: {
|
|
@@ -461,22 +461,22 @@ const Ke = /* @__PURE__ */ Y({
|
|
|
461
461
|
},
|
|
462
462
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
463
463
|
setup(e, { emit: a }) {
|
|
464
|
-
const { proxy: n } =
|
|
465
|
-
let r =
|
|
466
|
-
const l =
|
|
467
|
-
let s =
|
|
468
|
-
|
|
469
|
-
async function
|
|
470
|
-
if (["cascader", "checkbox", "select", "radio"].includes(
|
|
464
|
+
const { proxy: n } = ne(), o = e, t = S(null);
|
|
465
|
+
let r = H("formData", Z({}));
|
|
466
|
+
const l = H("slots", {}), i = H("pageManager", {}), c = H("disabled", { value: !1 }), w = H("ruleFieldPrefix", null), h = H("resetFormData", !1);
|
|
467
|
+
let s = Z(N(o.componentSchema));
|
|
468
|
+
f();
|
|
469
|
+
async function y(p) {
|
|
470
|
+
if (["cascader", "checkbox", "select", "radio"].includes(p.type) && p.componentProps.dynamicId && o.sourceDateUrl) {
|
|
471
471
|
const D = (await be({
|
|
472
472
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
473
473
|
url: o.sourceDateUrl,
|
|
474
474
|
method: "get",
|
|
475
475
|
params: {
|
|
476
|
-
id:
|
|
476
|
+
id: p.componentProps.dynamicId
|
|
477
477
|
}
|
|
478
478
|
})).data.data;
|
|
479
|
-
let
|
|
479
|
+
let k = await be({
|
|
480
480
|
url: D.url,
|
|
481
481
|
method: D.method,
|
|
482
482
|
data: JSON.parse(D.body),
|
|
@@ -484,107 +484,107 @@ const Ke = /* @__PURE__ */ Y({
|
|
|
484
484
|
headers: JSON.parse(D.headers)
|
|
485
485
|
});
|
|
486
486
|
if (D && (D != null && D.dataPath)) {
|
|
487
|
-
const
|
|
488
|
-
|
|
487
|
+
const Ce = D.dataPath.split(".").reduce((re, _e) => re[_e], k.data);
|
|
488
|
+
p.componentProps.options = d(Ce).map((re) => ({
|
|
489
489
|
label: re[D.dataKey],
|
|
490
490
|
value: re[D.dataValue]
|
|
491
491
|
}));
|
|
492
492
|
} else
|
|
493
|
-
|
|
494
|
-
label:
|
|
495
|
-
value:
|
|
493
|
+
p.componentProps.options = d(k.data).map((j) => ({
|
|
494
|
+
label: j[D.dataKey],
|
|
495
|
+
value: j[D.dataValue]
|
|
496
496
|
}));
|
|
497
|
-
return
|
|
497
|
+
return p;
|
|
498
498
|
}
|
|
499
|
-
return
|
|
499
|
+
return p;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
return
|
|
501
|
+
function d(p) {
|
|
502
|
+
return p && Object.prototype.toString.call(p) === "[object Array]" ? p : [];
|
|
503
503
|
}
|
|
504
|
-
|
|
504
|
+
V(
|
|
505
505
|
() => o.componentSchema,
|
|
506
|
-
(
|
|
507
|
-
Ee(s,
|
|
506
|
+
(p) => {
|
|
507
|
+
Ee(s, p, ["children"]) || (z(s, N(p)), f());
|
|
508
508
|
},
|
|
509
509
|
{
|
|
510
510
|
deep: !0
|
|
511
511
|
}
|
|
512
512
|
);
|
|
513
|
-
function
|
|
513
|
+
function f() {
|
|
514
514
|
i.isDesignMode.value && typeof s.field == "string" && (s.field += "-design-mode");
|
|
515
515
|
}
|
|
516
|
-
(o.resetFormData ||
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
}, g =
|
|
520
|
-
Object.keys(g).length &&
|
|
521
|
-
const
|
|
522
|
-
var
|
|
523
|
-
return (
|
|
524
|
-
}),
|
|
516
|
+
(o.resetFormData || h) && (r = {});
|
|
517
|
+
const u = a, A = S(), C = S(), m = (p) => {
|
|
518
|
+
C.value = p;
|
|
519
|
+
}, g = xe();
|
|
520
|
+
Object.keys(g).length && $("nodeAttrs", g);
|
|
521
|
+
const v = Pe(null), E = U(() => {
|
|
522
|
+
var p, I;
|
|
523
|
+
return (p = s.componentProps) != null && p.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((I = s.show) == null ? void 0 : I.call(s, { values: r })) ?? !0;
|
|
524
|
+
}), O = U(() => {
|
|
525
525
|
var D;
|
|
526
|
-
const
|
|
527
|
-
...
|
|
528
|
-
validator:
|
|
526
|
+
const p = E.value && ((D = s.rules) == null ? void 0 : D.map((k) => ({
|
|
527
|
+
...k,
|
|
528
|
+
validator: k.validator && i.funcs.value[k.validator]
|
|
529
529
|
// 自定义校验函数
|
|
530
530
|
})));
|
|
531
|
-
let
|
|
532
|
-
o.ruleField ?
|
|
533
|
-
const
|
|
531
|
+
let I = s.field;
|
|
532
|
+
o.ruleField ? I = o.ruleField : w && s.field && (I = N(w), I.push(s.field));
|
|
533
|
+
const x = {
|
|
534
534
|
...s,
|
|
535
|
-
rules:
|
|
536
|
-
rule:
|
|
537
|
-
field:
|
|
535
|
+
rules: p,
|
|
536
|
+
rule: p,
|
|
537
|
+
field: I
|
|
538
538
|
};
|
|
539
|
-
return
|
|
540
|
-
}),
|
|
541
|
-
var
|
|
542
|
-
const
|
|
543
|
-
return s.on && Object.keys(s.on).forEach((
|
|
544
|
-
|
|
539
|
+
return x.children && delete x.children, x;
|
|
540
|
+
}), B = U(() => {
|
|
541
|
+
var x, D;
|
|
542
|
+
const p = ((x = W.value) == null ? void 0 : x.bindModel) ?? "modelValue", I = {};
|
|
543
|
+
return s.on && Object.keys(s.on).forEach((k) => {
|
|
544
|
+
I[`on${Le(k)}`] = (...j) => i.doActions(s.on[k], ...j);
|
|
545
545
|
}), {
|
|
546
546
|
...o,
|
|
547
547
|
...s.componentProps,
|
|
548
|
-
disabled: (
|
|
549
|
-
bindModel:
|
|
550
|
-
...
|
|
548
|
+
disabled: (c == null ? void 0 : c.value) || ((D = s.componentProps) == null ? void 0 : D.disabled),
|
|
549
|
+
bindModel: p,
|
|
550
|
+
...I
|
|
551
551
|
};
|
|
552
|
-
}),
|
|
552
|
+
}), W = U(() => F.getComponentConfingByType(s.type) ?? null);
|
|
553
553
|
se(() => {
|
|
554
554
|
t.value = o.modelValue ?? r[s.field ?? ""];
|
|
555
|
-
}),
|
|
555
|
+
}), V(
|
|
556
556
|
() => t.value,
|
|
557
557
|
() => {
|
|
558
|
-
t.value !== (o.modelValue ?? r[s.field ?? ""]) &&
|
|
558
|
+
t.value !== (o.modelValue ?? r[s.field ?? ""]) && b(t.value);
|
|
559
559
|
}
|
|
560
|
-
),
|
|
561
|
-
() =>
|
|
560
|
+
), V(
|
|
561
|
+
() => A.value,
|
|
562
562
|
() => {
|
|
563
|
-
|
|
563
|
+
oe();
|
|
564
564
|
},
|
|
565
565
|
{ immediate: !0 }
|
|
566
566
|
);
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
const
|
|
570
|
-
s.id &&
|
|
567
|
+
function oe() {
|
|
568
|
+
var I;
|
|
569
|
+
const p = A.value || n;
|
|
570
|
+
s.id && p && (s.input && (p.setValue = b, p.getValue = () => r[s.field] || o.modelValue), p.setAttr = (x, D) => (s.componentProps || (s.componentProps = {}), s.componentProps[x] = D), p.getAttr = (x) => s.componentProps[x], i.addComponentInstance(s.id, p), (I = W.value) != null && I.defaultSchema.input && s.noFormItem !== !0 && C.value && i.addComponentInstance(s.id + "formItem", C.value));
|
|
571
571
|
}
|
|
572
572
|
function ue() {
|
|
573
|
-
var
|
|
574
|
-
s.id && (i.removeComponentInstance(s.id), (
|
|
573
|
+
var p;
|
|
574
|
+
s.id && (i.removeComponentInstance(s.id), (p = W.value) != null && p.defaultSchema.input && s.noFormItem !== !0 && i.removeComponentInstance(s.id + "formItem"));
|
|
575
575
|
}
|
|
576
|
-
async function
|
|
577
|
-
var
|
|
578
|
-
if (s = await
|
|
579
|
-
const
|
|
580
|
-
|
|
576
|
+
async function ae() {
|
|
577
|
+
var I, x, D;
|
|
578
|
+
if (s = await y(s), typeof ((I = s.componentProps) == null ? void 0 : I.defaultValue) < "u") {
|
|
579
|
+
const k = i.isDesignMode.value ? (x = s.componentProps) == null ? void 0 : x.defaultValue : r[s.field] ?? ((D = s.componentProps) == null ? void 0 : D.defaultValue);
|
|
580
|
+
b(N(k));
|
|
581
581
|
}
|
|
582
582
|
if (s.type === "slot") {
|
|
583
|
-
const
|
|
584
|
-
if (!
|
|
585
|
-
|
|
583
|
+
const k = s.slotName;
|
|
584
|
+
if (!k) return;
|
|
585
|
+
v.value = G({
|
|
586
586
|
setup() {
|
|
587
|
-
return () =>
|
|
587
|
+
return () => R(l, k, {
|
|
588
588
|
componentSchema: s,
|
|
589
589
|
model: r
|
|
590
590
|
});
|
|
@@ -592,71 +592,71 @@ const Ke = /* @__PURE__ */ Y({
|
|
|
592
592
|
});
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
if (!
|
|
595
|
+
const p = F.getComponent(s.type);
|
|
596
|
+
if (!p) {
|
|
597
597
|
console.error(`组件${s.type}未注册`);
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
|
-
if (typeof
|
|
601
|
-
const
|
|
602
|
-
|
|
600
|
+
if (typeof p == "function") {
|
|
601
|
+
const k = await p();
|
|
602
|
+
v.value = k.default ?? k;
|
|
603
603
|
} else
|
|
604
|
-
|
|
604
|
+
v.value = p;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
606
|
+
function b(p) {
|
|
607
|
+
u("update:modelValue", p), u("change", p), s.field && (r[s.field] = p);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
|
|
609
|
+
function X(p) {
|
|
610
|
+
u("update:dynamicId", p);
|
|
611
611
|
}
|
|
612
|
-
let
|
|
613
|
-
return
|
|
612
|
+
let ge = null;
|
|
613
|
+
return V(
|
|
614
614
|
() => s,
|
|
615
|
-
async (
|
|
616
|
-
const
|
|
617
|
-
...
|
|
615
|
+
async (p) => {
|
|
616
|
+
const I = JSON.stringify({
|
|
617
|
+
...p,
|
|
618
618
|
children: void 0,
|
|
619
619
|
componentProps: {
|
|
620
|
-
...
|
|
620
|
+
...p.componentProps,
|
|
621
621
|
options: null
|
|
622
622
|
}
|
|
623
623
|
});
|
|
624
|
-
if (
|
|
624
|
+
if (I === ge)
|
|
625
625
|
return !1;
|
|
626
|
-
|
|
626
|
+
ge = I, ae();
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
629
|
immediate: !0,
|
|
630
630
|
deep: !0
|
|
631
631
|
}
|
|
632
|
-
), Se(ue), (
|
|
632
|
+
), Se(ue), (p, I) => {
|
|
633
633
|
var D;
|
|
634
|
-
const
|
|
635
|
-
return
|
|
634
|
+
const x = Ve("ENode");
|
|
635
|
+
return v.value && E.value ? (M(), L(Ke, {
|
|
636
636
|
key: 0,
|
|
637
|
-
hasFormItem:
|
|
638
|
-
formItemProps:
|
|
637
|
+
hasFormItem: _(s).noFormItem !== !0 && ((D = W.value) == null ? void 0 : D.defaultSchema.input),
|
|
638
|
+
formItemProps: O.value,
|
|
639
639
|
onUpdateFormItemRef: m
|
|
640
640
|
}, {
|
|
641
641
|
default: P(() => [
|
|
642
|
-
(
|
|
642
|
+
(M(), L(Oe(v.value), me({
|
|
643
643
|
ref_key: "componentInstance",
|
|
644
|
-
ref:
|
|
645
|
-
onVnodeMounted:
|
|
646
|
-
model:
|
|
647
|
-
}, { ...
|
|
648
|
-
[
|
|
649
|
-
["onUpdate:" +
|
|
650
|
-
[`onUpdate:${
|
|
651
|
-
"onUpdate:dynamicId":
|
|
644
|
+
ref: A,
|
|
645
|
+
onVnodeMounted: oe,
|
|
646
|
+
model: _(r)
|
|
647
|
+
}, { ...B.value }, {
|
|
648
|
+
[B.value.bindModel]: t.value,
|
|
649
|
+
["onUpdate:" + B.value.bindModel]: I[0] || (I[0] = (k) => t.value = k),
|
|
650
|
+
[`onUpdate:${B.value.bindModel}` || ""]: b,
|
|
651
|
+
"onUpdate:dynamicId": X
|
|
652
652
|
}), {
|
|
653
|
-
node: P((
|
|
654
|
-
|
|
653
|
+
node: P((k) => [
|
|
654
|
+
T(x, me(k, {
|
|
655
655
|
sourceDateUrl: o.sourceDateUrl
|
|
656
656
|
}), null, 16, ["sourceDateUrl"])
|
|
657
657
|
]),
|
|
658
658
|
"edit-node": P(() => [
|
|
659
|
-
|
|
659
|
+
R(p.$slots, "edit-node")
|
|
660
660
|
]),
|
|
661
661
|
_: 3
|
|
662
662
|
}, 16, ["model"]))
|
|
@@ -667,59 +667,59 @@ const Ke = /* @__PURE__ */ Y({
|
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
function Ze() {
|
|
670
|
-
const e =
|
|
670
|
+
const e = S(!1), a = Ie(), n = S({});
|
|
671
671
|
function o() {
|
|
672
|
-
return new Promise((
|
|
672
|
+
return new Promise((d) => {
|
|
673
673
|
if (e.value)
|
|
674
|
-
|
|
674
|
+
d();
|
|
675
675
|
else {
|
|
676
|
-
const
|
|
677
|
-
|
|
676
|
+
const f = V(e, () => {
|
|
677
|
+
f(), d();
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
async function t(
|
|
683
|
-
var
|
|
682
|
+
async function t(d = "default") {
|
|
683
|
+
var u;
|
|
684
684
|
await o();
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
return
|
|
685
|
+
const f = (u = n.value) == null ? void 0 : u[d];
|
|
686
|
+
if (!f) throw new Error(`表单 [name=${d}] 不存在`);
|
|
687
|
+
return f;
|
|
688
688
|
}
|
|
689
|
-
async function r(
|
|
690
|
-
const
|
|
691
|
-
return
|
|
689
|
+
async function r(d, f) {
|
|
690
|
+
const u = await t(d);
|
|
691
|
+
return N(await f(u));
|
|
692
692
|
}
|
|
693
|
-
async function l(
|
|
694
|
-
return await r(
|
|
693
|
+
async function l(d = "default") {
|
|
694
|
+
return await r(d, (f) => f.getData());
|
|
695
695
|
}
|
|
696
|
-
function i(
|
|
697
|
-
var
|
|
698
|
-
a.setFormData(
|
|
699
|
-
const
|
|
700
|
-
|
|
696
|
+
function i(d, f = "default") {
|
|
697
|
+
var A;
|
|
698
|
+
a.setFormData(d, f);
|
|
699
|
+
const u = (A = n.value) == null ? void 0 : A[f];
|
|
700
|
+
u == null || u.clearValidate();
|
|
701
701
|
}
|
|
702
|
-
async function
|
|
703
|
-
return await r(
|
|
702
|
+
async function c(d = "default") {
|
|
703
|
+
return await r(d, async (f) => (await f.validate(), await f.getData()));
|
|
704
704
|
}
|
|
705
|
-
async function w(
|
|
705
|
+
async function w(d) {
|
|
706
706
|
await o();
|
|
707
|
-
const
|
|
708
|
-
for (const
|
|
709
|
-
const
|
|
710
|
-
|
|
707
|
+
const f = {};
|
|
708
|
+
for (const u in n.value) {
|
|
709
|
+
const A = n.value[u];
|
|
710
|
+
A && (f[u] = N(await d(A)));
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return f;
|
|
713
713
|
}
|
|
714
|
-
async function
|
|
715
|
-
return await w((
|
|
714
|
+
async function h() {
|
|
715
|
+
return await w((d) => d.getData());
|
|
716
716
|
}
|
|
717
|
-
function s(
|
|
718
|
-
for (const
|
|
719
|
-
i(
|
|
717
|
+
function s(d) {
|
|
718
|
+
for (const f in d)
|
|
719
|
+
i(d[f], f);
|
|
720
720
|
}
|
|
721
|
-
async function
|
|
722
|
-
return await w(async (
|
|
721
|
+
async function y() {
|
|
722
|
+
return await w(async (d) => (await d.validate(), await d.getData()));
|
|
723
723
|
}
|
|
724
724
|
return {
|
|
725
725
|
ready: e,
|
|
@@ -727,17 +727,17 @@ function Ze() {
|
|
|
727
727
|
forms: n,
|
|
728
728
|
getData: l,
|
|
729
729
|
setData: i,
|
|
730
|
-
validate:
|
|
731
|
-
getForms:
|
|
730
|
+
validate: c,
|
|
731
|
+
getForms: h,
|
|
732
732
|
setForms: s,
|
|
733
|
-
validateAll:
|
|
733
|
+
validateAll: y,
|
|
734
734
|
getFormInstance: t
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
const Ge = {
|
|
738
738
|
key: 0,
|
|
739
739
|
class: "epic-loading-box"
|
|
740
|
-
}, Qe = { class: "epic-builder-main" }, Ye = { class: "epic-loading-box" }, Xe = /* @__PURE__ */
|
|
740
|
+
}, Qe = { class: "epic-builder-main" }, Ye = { class: "epic-loading-box" }, Xe = /* @__PURE__ */ G({
|
|
741
741
|
__name: "builder",
|
|
742
742
|
props: {
|
|
743
743
|
pageSchema: {},
|
|
@@ -747,78 +747,78 @@ const Ge = {
|
|
|
747
747
|
},
|
|
748
748
|
emits: ["ready"],
|
|
749
749
|
setup(e, { expose: a, emit: n }) {
|
|
750
|
-
const o =
|
|
750
|
+
const o = q(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: i, getData: c, setData: w, validate: h, getForms: s, setForms: y, validateAll: d, getFormInstance: f } = Ze(), u = e, A = Z({
|
|
751
751
|
schemas: []
|
|
752
752
|
});
|
|
753
|
-
|
|
754
|
-
() =>
|
|
755
|
-
(
|
|
756
|
-
|
|
753
|
+
V(
|
|
754
|
+
() => u.pageSchema,
|
|
755
|
+
(v) => {
|
|
756
|
+
z(A, v);
|
|
757
757
|
},
|
|
758
758
|
{
|
|
759
759
|
immediate: !0,
|
|
760
760
|
deep: !0
|
|
761
761
|
}
|
|
762
|
-
),
|
|
763
|
-
() =>
|
|
764
|
-
(
|
|
765
|
-
|
|
762
|
+
), V(
|
|
763
|
+
() => u.formData,
|
|
764
|
+
(v) => {
|
|
765
|
+
v && w(v);
|
|
766
766
|
},
|
|
767
767
|
{
|
|
768
768
|
immediate: !0,
|
|
769
769
|
deep: !0
|
|
770
770
|
}
|
|
771
|
-
),
|
|
772
|
-
() =>
|
|
773
|
-
(
|
|
774
|
-
|
|
771
|
+
), V(
|
|
772
|
+
() => A.script,
|
|
773
|
+
(v) => {
|
|
774
|
+
v && l.setMethods(v, !0);
|
|
775
775
|
},
|
|
776
776
|
{
|
|
777
777
|
immediate: !0
|
|
778
778
|
}
|
|
779
|
-
),
|
|
779
|
+
), $("slots", Fe()), $("pageManager", l), $("forms", i), $("pageSchema", A), $(
|
|
780
780
|
"disabled",
|
|
781
|
-
|
|
781
|
+
U(() => u.disabled)
|
|
782
782
|
);
|
|
783
|
-
const
|
|
783
|
+
const C = ne(), m = C == null ? void 0 : C.proxy;
|
|
784
784
|
function g() {
|
|
785
|
-
|
|
785
|
+
Y(() => {
|
|
786
786
|
r.value = !0, t("ready", l), m && l.addComponentInstance("builder", m);
|
|
787
787
|
});
|
|
788
788
|
}
|
|
789
789
|
return a({
|
|
790
790
|
ready: r,
|
|
791
791
|
pageManager: l,
|
|
792
|
-
getData:
|
|
792
|
+
getData: c,
|
|
793
793
|
setData: w,
|
|
794
|
-
validate:
|
|
794
|
+
validate: h,
|
|
795
795
|
getForms: s,
|
|
796
|
-
setForms:
|
|
797
|
-
validateAll:
|
|
798
|
-
getFormInstance:
|
|
799
|
-
}), (
|
|
796
|
+
setForms: y,
|
|
797
|
+
validateAll: d,
|
|
798
|
+
getFormInstance: f
|
|
799
|
+
}), (v, E) => _(F).initialized.value ? (M(), L(De, {
|
|
800
800
|
key: 1,
|
|
801
801
|
onResolve: g
|
|
802
802
|
}, {
|
|
803
803
|
default: P(() => [
|
|
804
804
|
J("div", Qe, [
|
|
805
|
-
(
|
|
806
|
-
key:
|
|
807
|
-
sourceDateUrl:
|
|
808
|
-
componentSchema:
|
|
805
|
+
(M(!0), he(Me, null, Re(A.schemas, (O, B) => (M(), L(_(qe), {
|
|
806
|
+
key: B,
|
|
807
|
+
sourceDateUrl: u.sourceDateUrl,
|
|
808
|
+
componentSchema: O
|
|
809
809
|
}, null, 8, ["sourceDateUrl", "componentSchema"]))), 128))
|
|
810
810
|
])
|
|
811
811
|
]),
|
|
812
812
|
fallback: P(() => [
|
|
813
813
|
J("div", Ye, [
|
|
814
|
-
|
|
814
|
+
T(_(o))
|
|
815
815
|
])
|
|
816
816
|
]),
|
|
817
817
|
_: 1
|
|
818
|
-
})) : (
|
|
818
|
+
})) : (M(), he("div", Ge));
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
|
-
function
|
|
821
|
+
function ye(e) {
|
|
822
822
|
return Be() ? (Ue(e), !0) : !1;
|
|
823
823
|
}
|
|
824
824
|
function je(e) {
|
|
@@ -826,44 +826,44 @@ function je(e) {
|
|
|
826
826
|
const t = () => {
|
|
827
827
|
a -= 1, o && a <= 0 && (o.stop(), n = void 0, o = void 0);
|
|
828
828
|
};
|
|
829
|
-
return (...r) => (a += 1, o || (o = $e(!0), n = o.run(() => e(...r))),
|
|
829
|
+
return (...r) => (a += 1, o || (o = $e(!0), n = o.run(() => e(...r))), ye(t), n);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
return typeof e == "function" ? e() :
|
|
831
|
+
function Q(e) {
|
|
832
|
+
return typeof e == "function" ? e() : _(e);
|
|
833
833
|
}
|
|
834
834
|
const et = typeof window < "u" && typeof document < "u";
|
|
835
835
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
836
836
|
const tt = (e) => typeof e < "u", nt = Object.prototype.toString, ot = (e) => nt.call(e) === "[object Object]", at = () => {
|
|
837
837
|
};
|
|
838
838
|
function rt(e) {
|
|
839
|
-
return
|
|
839
|
+
return ne();
|
|
840
840
|
}
|
|
841
841
|
function st(e, a = !0, n) {
|
|
842
|
-
rt() ?
|
|
842
|
+
rt() ? ve(e, n) : a ? e() : Y(e);
|
|
843
843
|
}
|
|
844
844
|
function lt(e = !1, a = {}) {
|
|
845
845
|
const {
|
|
846
846
|
truthyValue: n = !0,
|
|
847
847
|
falsyValue: o = !1
|
|
848
|
-
} = a, t = Ne(e), r =
|
|
848
|
+
} = a, t = Ne(e), r = S(e);
|
|
849
849
|
function l(i) {
|
|
850
850
|
if (arguments.length)
|
|
851
851
|
return r.value = i, r.value;
|
|
852
852
|
{
|
|
853
|
-
const
|
|
854
|
-
return r.value = r.value ===
|
|
853
|
+
const c = Q(n);
|
|
854
|
+
return r.value = r.value === c ? Q(o) : c, r.value;
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
return t ? l : [r, l];
|
|
858
858
|
}
|
|
859
859
|
function Ut(e, a, n) {
|
|
860
|
-
const o =
|
|
860
|
+
const o = V(e, (...t) => (Y(() => o()), a(...t)), n);
|
|
861
861
|
return o;
|
|
862
862
|
}
|
|
863
863
|
const ie = et ? window : void 0;
|
|
864
|
-
function
|
|
864
|
+
function K(e) {
|
|
865
865
|
var a;
|
|
866
|
-
const n =
|
|
866
|
+
const n = Q(e);
|
|
867
867
|
return (a = n == null ? void 0 : n.$el) != null ? a : n;
|
|
868
868
|
}
|
|
869
869
|
function it(...e) {
|
|
@@ -872,27 +872,27 @@ function it(...e) {
|
|
|
872
872
|
return at;
|
|
873
873
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
874
874
|
const r = [], l = () => {
|
|
875
|
-
r.forEach((
|
|
876
|
-
}, i = (
|
|
877
|
-
() => [
|
|
878
|
-
([
|
|
879
|
-
if (l(), !
|
|
875
|
+
r.forEach((h) => h()), r.length = 0;
|
|
876
|
+
}, i = (h, s, y, d) => (h.addEventListener(s, y, d), () => h.removeEventListener(s, y, d)), c = V(
|
|
877
|
+
() => [K(a), Q(t)],
|
|
878
|
+
([h, s]) => {
|
|
879
|
+
if (l(), !h)
|
|
880
880
|
return;
|
|
881
|
-
const
|
|
881
|
+
const y = ot(s) ? { ...s } : s;
|
|
882
882
|
r.push(
|
|
883
|
-
...n.flatMap((
|
|
883
|
+
...n.flatMap((d) => o.map((f) => i(h, d, f, y)))
|
|
884
884
|
);
|
|
885
885
|
},
|
|
886
886
|
{ immediate: !0, flush: "post" }
|
|
887
887
|
), w = () => {
|
|
888
|
-
|
|
888
|
+
c(), l();
|
|
889
889
|
};
|
|
890
|
-
return
|
|
890
|
+
return ye(w), w;
|
|
891
891
|
}
|
|
892
892
|
function ct(e) {
|
|
893
893
|
return typeof e == "function" ? e : typeof e == "string" ? (a) => a.key === e : Array.isArray(e) ? (a) => e.includes(a.key) : () => !0;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function ke(...e) {
|
|
896
896
|
let a, n, o = {};
|
|
897
897
|
e.length === 3 ? (a = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (a = !0, n = e[0], o = e[1]) : (a = e[0], n = e[1]) : (a = !0, n = e[0]);
|
|
898
898
|
const {
|
|
@@ -900,26 +900,26 @@ function Ie(...e) {
|
|
|
900
900
|
eventName: r = "keydown",
|
|
901
901
|
passive: l = !1,
|
|
902
902
|
dedupe: i = !1
|
|
903
|
-
} = o,
|
|
904
|
-
return it(t, r, (
|
|
905
|
-
|
|
903
|
+
} = o, c = ct(a);
|
|
904
|
+
return it(t, r, (h) => {
|
|
905
|
+
h.repeat && Q(i) || c(h) && n(h);
|
|
906
906
|
}, l);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
908
|
+
function fe(e, a, n = {}) {
|
|
909
|
+
return ke(e, a, { ...n, eventName: "keydown" });
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
return
|
|
911
|
+
function pe(e, a, n = {}) {
|
|
912
|
+
return ke(e, a, { ...n, eventName: "keyup" });
|
|
913
913
|
}
|
|
914
914
|
function ut() {
|
|
915
|
-
const e =
|
|
916
|
-
return a &&
|
|
915
|
+
const e = S(!1), a = ne();
|
|
916
|
+
return a && ve(() => {
|
|
917
917
|
e.value = !0;
|
|
918
918
|
}, a), e;
|
|
919
919
|
}
|
|
920
920
|
function dt(e) {
|
|
921
921
|
const a = ut();
|
|
922
|
-
return
|
|
922
|
+
return U(() => (a.value, !!e()));
|
|
923
923
|
}
|
|
924
924
|
function ft(e) {
|
|
925
925
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -929,109 +929,109 @@ function pt(e, a, n = {}) {
|
|
|
929
929
|
let r;
|
|
930
930
|
const l = dt(() => o && "ResizeObserver" in o), i = () => {
|
|
931
931
|
r && (r.disconnect(), r = void 0);
|
|
932
|
-
},
|
|
933
|
-
const s =
|
|
934
|
-
return Array.isArray(s) ? s.map((
|
|
935
|
-
}), w =
|
|
936
|
-
|
|
932
|
+
}, c = U(() => {
|
|
933
|
+
const s = Q(e);
|
|
934
|
+
return Array.isArray(s) ? s.map((y) => K(y)) : [K(s)];
|
|
935
|
+
}), w = V(
|
|
936
|
+
c,
|
|
937
937
|
(s) => {
|
|
938
938
|
if (i(), l.value && o) {
|
|
939
939
|
r = new ResizeObserver(a);
|
|
940
|
-
for (const
|
|
941
|
-
|
|
940
|
+
for (const y of s)
|
|
941
|
+
y && r.observe(y, t);
|
|
942
942
|
}
|
|
943
943
|
},
|
|
944
944
|
{ immediate: !0, flush: "post" }
|
|
945
|
-
),
|
|
945
|
+
), h = () => {
|
|
946
946
|
i(), w();
|
|
947
947
|
};
|
|
948
|
-
return
|
|
948
|
+
return ye(h), {
|
|
949
949
|
isSupported: l,
|
|
950
|
-
stop:
|
|
950
|
+
stop: h
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
953
|
function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
954
|
-
const { window: o = ie, box: t = "content-box" } = n, r =
|
|
955
|
-
var s,
|
|
956
|
-
return (
|
|
957
|
-
}), l =
|
|
954
|
+
const { window: o = ie, box: t = "content-box" } = n, r = U(() => {
|
|
955
|
+
var s, y;
|
|
956
|
+
return (y = (s = K(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : y.includes("svg");
|
|
957
|
+
}), l = S(a.width), i = S(a.height), { stop: c } = pt(
|
|
958
958
|
e,
|
|
959
959
|
([s]) => {
|
|
960
|
-
const
|
|
960
|
+
const y = t === "border-box" ? s.borderBoxSize : t === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
961
961
|
if (o && r.value) {
|
|
962
|
-
const
|
|
963
|
-
if (
|
|
964
|
-
const
|
|
965
|
-
l.value =
|
|
962
|
+
const d = K(e);
|
|
963
|
+
if (d) {
|
|
964
|
+
const f = d.getBoundingClientRect();
|
|
965
|
+
l.value = f.width, i.value = f.height;
|
|
966
966
|
}
|
|
967
|
-
} else if (
|
|
968
|
-
const
|
|
969
|
-
l.value =
|
|
967
|
+
} else if (y) {
|
|
968
|
+
const d = Array.isArray(y) ? y : [y];
|
|
969
|
+
l.value = d.reduce((f, { inlineSize: u }) => f + u, 0), i.value = d.reduce((f, { blockSize: u }) => f + u, 0);
|
|
970
970
|
} else
|
|
971
971
|
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
972
972
|
},
|
|
973
973
|
n
|
|
974
974
|
);
|
|
975
975
|
st(() => {
|
|
976
|
-
const s =
|
|
976
|
+
const s = K(e);
|
|
977
977
|
s && (l.value = "offsetWidth" in s ? s.offsetWidth : a.width, i.value = "offsetHeight" in s ? s.offsetHeight : a.height);
|
|
978
978
|
});
|
|
979
|
-
const w =
|
|
980
|
-
() =>
|
|
979
|
+
const w = V(
|
|
980
|
+
() => K(e),
|
|
981
981
|
(s) => {
|
|
982
982
|
l.value = s ? a.width : 0, i.value = s ? a.height : 0;
|
|
983
983
|
}
|
|
984
984
|
);
|
|
985
|
-
function
|
|
986
|
-
|
|
985
|
+
function h() {
|
|
986
|
+
c(), w();
|
|
987
987
|
}
|
|
988
988
|
return {
|
|
989
989
|
width: l,
|
|
990
990
|
height: i,
|
|
991
|
-
stop:
|
|
991
|
+
stop: h
|
|
992
992
|
};
|
|
993
993
|
}
|
|
994
994
|
function Lt(e, a, n, o = {}) {
|
|
995
995
|
var t, r, l;
|
|
996
996
|
const {
|
|
997
997
|
clone: i = !1,
|
|
998
|
-
passive:
|
|
998
|
+
passive: c = !1,
|
|
999
999
|
eventName: w,
|
|
1000
|
-
deep:
|
|
1000
|
+
deep: h = !1,
|
|
1001
1001
|
defaultValue: s,
|
|
1002
|
-
shouldEmit:
|
|
1003
|
-
} = o,
|
|
1004
|
-
let
|
|
1005
|
-
a || (a = "modelValue"),
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1002
|
+
shouldEmit: y
|
|
1003
|
+
} = o, d = ne(), f = n || (d == null ? void 0 : d.emit) || ((t = d == null ? void 0 : d.$emit) == null ? void 0 : t.bind(d)) || ((l = (r = d == null ? void 0 : d.proxy) == null ? void 0 : r.$emit) == null ? void 0 : l.bind(d == null ? void 0 : d.proxy));
|
|
1004
|
+
let u = w;
|
|
1005
|
+
a || (a = "modelValue"), u = u || `update:${a.toString()}`;
|
|
1006
|
+
const A = (g) => i ? typeof i == "function" ? i(g) : ft(g) : g, C = () => tt(e[a]) ? A(e[a]) : s, m = (g) => {
|
|
1007
|
+
y ? y(g) && f(u, g) : f(u, g);
|
|
1008
1008
|
};
|
|
1009
|
-
if (
|
|
1010
|
-
const g =
|
|
1009
|
+
if (c) {
|
|
1010
|
+
const g = C(), v = S(g);
|
|
1011
1011
|
let E = !1;
|
|
1012
|
-
return
|
|
1012
|
+
return V(
|
|
1013
1013
|
() => e[a],
|
|
1014
|
-
(
|
|
1015
|
-
E || (E = !0,
|
|
1014
|
+
(O) => {
|
|
1015
|
+
E || (E = !0, v.value = A(O), Y(() => E = !1));
|
|
1016
1016
|
}
|
|
1017
|
-
),
|
|
1018
|
-
|
|
1019
|
-
(
|
|
1020
|
-
!E && (
|
|
1017
|
+
), V(
|
|
1018
|
+
v,
|
|
1019
|
+
(O) => {
|
|
1020
|
+
!E && (O !== e[a] || h) && m(O);
|
|
1021
1021
|
},
|
|
1022
|
-
{ deep:
|
|
1023
|
-
),
|
|
1022
|
+
{ deep: h }
|
|
1023
|
+
), v;
|
|
1024
1024
|
} else
|
|
1025
|
-
return
|
|
1025
|
+
return U({
|
|
1026
1026
|
get() {
|
|
1027
|
-
return
|
|
1027
|
+
return C();
|
|
1028
1028
|
},
|
|
1029
1029
|
set(g) {
|
|
1030
1030
|
m(g);
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function Jt() {
|
|
1035
1035
|
const { isDark: e } = ce(), a = lt(e);
|
|
1036
1036
|
return {
|
|
1037
1037
|
isDark: e,
|
|
@@ -1039,10 +1039,10 @@ function zt() {
|
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
function mt() {
|
|
1042
|
-
const e =
|
|
1043
|
-
return
|
|
1042
|
+
const e = S(!1);
|
|
1043
|
+
return ve(() => {
|
|
1044
1044
|
ht(e), vt(e);
|
|
1045
|
-
}),
|
|
1045
|
+
}), V(
|
|
1046
1046
|
() => e.value,
|
|
1047
1047
|
() => {
|
|
1048
1048
|
e.value ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
@@ -1071,7 +1071,7 @@ function vt(e) {
|
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
function yt() {
|
|
1074
|
-
const e =
|
|
1074
|
+
const e = S(1), a = S(!1), { isDark: n } = mt(), { pressSpace: o, pressShift: t, pressCtrl: r } = gt();
|
|
1075
1075
|
return {
|
|
1076
1076
|
canvasScale: e,
|
|
1077
1077
|
pressSpace: o,
|
|
@@ -1083,34 +1083,34 @@ function yt() {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
const ce = je(yt);
|
|
1085
1085
|
function gt() {
|
|
1086
|
-
const e =
|
|
1087
|
-
return
|
|
1086
|
+
const e = S(!1), a = S(!1), n = S(!1);
|
|
1087
|
+
return fe(" ", () => {
|
|
1088
1088
|
e.value = !0;
|
|
1089
|
-
}),
|
|
1089
|
+
}), pe(" ", () => {
|
|
1090
1090
|
e.value = !1;
|
|
1091
|
-
}),
|
|
1091
|
+
}), fe("Shift", (o) => {
|
|
1092
1092
|
o.preventDefault(), a.value = !0;
|
|
1093
|
-
}),
|
|
1093
|
+
}), pe("Shift", () => {
|
|
1094
1094
|
a.value = !1;
|
|
1095
|
-
}),
|
|
1095
|
+
}), fe("Control", (o) => {
|
|
1096
1096
|
o.preventDefault(), n.value = !0;
|
|
1097
|
-
}),
|
|
1097
|
+
}), pe("Control", () => {
|
|
1098
1098
|
n.value = !1;
|
|
1099
1099
|
}), { pressSpace: e, pressShift: a, pressCtrl: n };
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function zt(e) {
|
|
1102
1102
|
const { pressSpace: a } = ce(), n = new Image(1, 1);
|
|
1103
1103
|
n.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
1104
1104
|
let o = 0, t = 0;
|
|
1105
|
-
function r(
|
|
1105
|
+
function r(c) {
|
|
1106
1106
|
var w;
|
|
1107
|
-
a.value && (o =
|
|
1107
|
+
a.value && (o = c.x, t = c.y, (w = c.dataTransfer) == null || w.setDragImage(document.createElement("div"), 0, 0));
|
|
1108
1108
|
}
|
|
1109
|
-
function l(
|
|
1110
|
-
if (
|
|
1109
|
+
function l(c) {
|
|
1110
|
+
if (c.preventDefault(), !c.x || !c.y || !a.value)
|
|
1111
1111
|
return;
|
|
1112
|
-
const w =
|
|
1113
|
-
o =
|
|
1112
|
+
const w = c.x - o, h = c.y - t;
|
|
1113
|
+
o = c.x, t = c.y, e.value && (e.value.scrollTop -= h, e.value.scrollLeft -= w);
|
|
1114
1114
|
}
|
|
1115
1115
|
function i() {
|
|
1116
1116
|
a.value = !1;
|
|
@@ -1126,7 +1126,7 @@ function Wt(e) {
|
|
|
1126
1126
|
let l = 0;
|
|
1127
1127
|
r.deltaY < 0 ? l = n.value + 0.05 : l = n.value - 0.05, !(l > 150 || l < 0.5) && (n.value = l);
|
|
1128
1128
|
}
|
|
1129
|
-
return
|
|
1129
|
+
return V(
|
|
1130
1130
|
() => n.value,
|
|
1131
1131
|
(r) => {
|
|
1132
1132
|
e.value && !o.value && (e.value.style.transform = `scale(${r})`);
|
|
@@ -1146,57 +1146,57 @@ function Ht(e, a = 16.66) {
|
|
|
1146
1146
|
stopTimedQuery: t
|
|
1147
1147
|
};
|
|
1148
1148
|
}
|
|
1149
|
-
const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, St = /* @__PURE__ */
|
|
1149
|
+
const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, St = /* @__PURE__ */ G({
|
|
1150
1150
|
__name: "index",
|
|
1151
1151
|
setup(e, { expose: a }) {
|
|
1152
|
-
const n = F.getComponent("monacoEditor"), o = F.getComponent("modal"), t =
|
|
1152
|
+
const n = F.getComponent("monacoEditor"), o = F.getComponent("modal"), t = S(null), r = S(!1), l = S(!1), i = S({}), c = H("pageSchema"), w = S(null), h = S("");
|
|
1153
1153
|
function s() {
|
|
1154
1154
|
l.value = !1;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function y() {
|
|
1157
1157
|
r.value = !1;
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1160
|
-
r.value = !0,
|
|
1159
|
+
function d() {
|
|
1160
|
+
r.value = !0, h.value = le();
|
|
1161
1161
|
}
|
|
1162
|
-
async function
|
|
1162
|
+
async function f() {
|
|
1163
1163
|
try {
|
|
1164
|
-
let
|
|
1165
|
-
if (!Object.keys(
|
|
1164
|
+
let u = await w.value.validateAll();
|
|
1165
|
+
if (!Object.keys(u).length) {
|
|
1166
1166
|
alert("请添加表单组件后再尝试!");
|
|
1167
1167
|
return;
|
|
1168
1168
|
}
|
|
1169
|
-
Object.keys(
|
|
1170
|
-
var
|
|
1171
|
-
(
|
|
1169
|
+
Object.keys(u).length === 1 && (u = u.default), i.value = JSON.stringify(u, null, 2), Y(() => {
|
|
1170
|
+
var A;
|
|
1171
|
+
(A = t.value) == null || A.setValue(i.value);
|
|
1172
1172
|
}), l.value = !0;
|
|
1173
|
-
} catch (
|
|
1174
|
-
console.error(
|
|
1173
|
+
} catch (u) {
|
|
1174
|
+
console.error(u);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
return a({
|
|
1178
|
-
handleOpen:
|
|
1179
|
-
}), (
|
|
1178
|
+
handleOpen: d
|
|
1179
|
+
}), (u, A) => (M(), L(_(o), {
|
|
1180
1180
|
modelValue: r.value,
|
|
1181
|
-
"onUpdate:modelValue":
|
|
1181
|
+
"onUpdate:modelValue": A[1] || (A[1] = (C) => r.value = C),
|
|
1182
1182
|
title: "预览",
|
|
1183
1183
|
class: "w-900px",
|
|
1184
1184
|
width: "900px",
|
|
1185
|
-
onClose:
|
|
1186
|
-
onOk:
|
|
1185
|
+
onClose: y,
|
|
1186
|
+
onOk: f,
|
|
1187
1187
|
okText: "表单数据"
|
|
1188
1188
|
}, {
|
|
1189
1189
|
default: P(() => [
|
|
1190
1190
|
J("div", wt, [
|
|
1191
|
-
(
|
|
1192
|
-
key:
|
|
1191
|
+
(M(), L(_(Xe), {
|
|
1192
|
+
key: h.value,
|
|
1193
1193
|
ref_key: "kb",
|
|
1194
1194
|
ref: w,
|
|
1195
|
-
"page-schema":
|
|
1195
|
+
"page-schema": _(c)
|
|
1196
1196
|
}, null, 8, ["page-schema"])),
|
|
1197
|
-
|
|
1197
|
+
T(_(o), {
|
|
1198
1198
|
modelValue: l.value,
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1199
|
+
"onUpdate:modelValue": A[0] || (A[0] = (C) => l.value = C),
|
|
1200
1200
|
title: "表单数据",
|
|
1201
1201
|
class: "w-860px",
|
|
1202
1202
|
width: "860px",
|
|
@@ -1205,7 +1205,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1205
1205
|
}, {
|
|
1206
1206
|
default: P(() => [
|
|
1207
1207
|
J("div", bt, [
|
|
1208
|
-
|
|
1208
|
+
T(_(n), {
|
|
1209
1209
|
ref_key: "monacoEditorRef",
|
|
1210
1210
|
ref: t,
|
|
1211
1211
|
autoToggleTheme: "",
|
|
@@ -1225,7 +1225,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1225
1225
|
}), At = {
|
|
1226
1226
|
key: 0,
|
|
1227
1227
|
class: "epic-loading-box"
|
|
1228
|
-
}, Dt = { class: "epic-designer-main" }, Et = { class: "epic-header-container" },
|
|
1228
|
+
}, Dt = { class: "epic-designer-main" }, Et = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ G({
|
|
1229
1229
|
__name: "designer",
|
|
1230
1230
|
props: {
|
|
1231
1231
|
disabledZoom: { type: Boolean, default: !1 },
|
|
@@ -1236,7 +1236,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1236
1236
|
defaultSchema: {},
|
|
1237
1237
|
sourceCodeReadOnly: { type: Boolean },
|
|
1238
1238
|
source: { default: [] },
|
|
1239
|
-
updateSourceId: {
|
|
1239
|
+
updateSourceId: {}
|
|
1240
1240
|
},
|
|
1241
1241
|
emits: [
|
|
1242
1242
|
"ready",
|
|
@@ -1248,7 +1248,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1248
1248
|
"updateSourceData"
|
|
1249
1249
|
],
|
|
1250
1250
|
setup(e, { expose: a, emit: n }) {
|
|
1251
|
-
const o =
|
|
1251
|
+
const o = q(() => import("./index-C-XUgjda.js")), t = q(() => import("./index-ASoFJnMl.js")), r = q(() => import("./index-CjrdkSiN.js")), l = q(() => import("./index-ooVzYa5L.js")), i = q(() => import("./index-DgcFxYFp.js")), c = Ie(), w = He(), h = e;
|
|
1252
1252
|
let s = {
|
|
1253
1253
|
schemas: [
|
|
1254
1254
|
{
|
|
@@ -1295,152 +1295,148 @@ defineExpose({
|
|
|
1295
1295
|
test
|
|
1296
1296
|
})`
|
|
1297
1297
|
};
|
|
1298
|
-
se(
|
|
1299
|
-
if (
|
|
1300
|
-
s =
|
|
1298
|
+
se(() => {
|
|
1299
|
+
if (h.defaultSchema) {
|
|
1300
|
+
s = h.defaultSchema;
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
|
|
1304
|
-
});
|
|
1305
|
-
|
|
1306
|
-
return S.map(async (M) => (console.log("%c [ el ]-158", "font-size:13px; background:pink; color:#bf2c9f;", M), M && M.children && M.children.length && b(M.children), M));
|
|
1307
|
-
}
|
|
1308
|
-
u.setDesignMode(), u.setDefaultComponentIds(s.schemas);
|
|
1309
|
-
const c = n, v = A(null), p = Q({
|
|
1303
|
+
h.source && F.setSourceData(h.source), h.formMode && (s.schemas = F.formSchemas);
|
|
1304
|
+
}), c.setDesignMode(), c.setDefaultComponentIds(s.schemas);
|
|
1305
|
+
const y = n, d = S(null), f = Z({
|
|
1310
1306
|
checkedNode: null,
|
|
1311
1307
|
hoverNode: null,
|
|
1312
1308
|
disableHover: !1,
|
|
1313
1309
|
matched: []
|
|
1314
|
-
}),
|
|
1310
|
+
}), u = Z({
|
|
1315
1311
|
schemas: [],
|
|
1316
1312
|
script: s.script
|
|
1317
|
-
}), { disabledZoom:
|
|
1313
|
+
}), { disabledZoom: A } = ce();
|
|
1318
1314
|
se(() => {
|
|
1319
|
-
|
|
1315
|
+
A.value = h.disabledZoom;
|
|
1320
1316
|
}), se(() => {
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
}),
|
|
1317
|
+
const b = u.script;
|
|
1318
|
+
b && b !== "" && c.setMethods(b);
|
|
1319
|
+
}), $("pageSchema", u), $("revoke", w), $("pageManager", c), $(
|
|
1324
1320
|
"designerProps",
|
|
1325
|
-
|
|
1326
|
-
),
|
|
1327
|
-
setCheckedNode:
|
|
1328
|
-
setHoverNode:
|
|
1329
|
-
setDisableHover:
|
|
1330
|
-
handleToggleDeviceMode:
|
|
1331
|
-
reset:
|
|
1332
|
-
state:
|
|
1333
|
-
}),
|
|
1334
|
-
|
|
1335
|
-
}),
|
|
1336
|
-
|
|
1337
|
-
}),
|
|
1338
|
-
|
|
1321
|
+
U(() => h)
|
|
1322
|
+
), $("designer", {
|
|
1323
|
+
setCheckedNode: m,
|
|
1324
|
+
setHoverNode: g,
|
|
1325
|
+
setDisableHover: E,
|
|
1326
|
+
handleToggleDeviceMode: ue,
|
|
1327
|
+
reset: W,
|
|
1328
|
+
state: f
|
|
1329
|
+
}), de.on("saveSourceData", (b) => {
|
|
1330
|
+
y("saveSourceData", b);
|
|
1331
|
+
}), de.on("deleteSourceData", (b) => {
|
|
1332
|
+
y("deleteSourceData", b);
|
|
1333
|
+
}), de.on("updateSourceData", (b) => {
|
|
1334
|
+
y("updateSourceData", b);
|
|
1339
1335
|
});
|
|
1340
|
-
function
|
|
1341
|
-
|
|
1336
|
+
function C() {
|
|
1337
|
+
u.schemas = N(s.schemas), m(u.schemas[0]), w.push(u.schemas, "初始化撤销功能");
|
|
1342
1338
|
}
|
|
1343
|
-
async function
|
|
1344
|
-
|
|
1339
|
+
async function m(b = u.schemas[0]) {
|
|
1340
|
+
f.checkedNode = b, f.matched = Je(u.schemas, b.id);
|
|
1345
1341
|
}
|
|
1346
|
-
async function
|
|
1347
|
-
var
|
|
1348
|
-
if (!
|
|
1349
|
-
return
|
|
1350
|
-
if ((
|
|
1342
|
+
async function g(b = null) {
|
|
1343
|
+
var X;
|
|
1344
|
+
if (!b || f.disableHover)
|
|
1345
|
+
return f.hoverNode = null, !1;
|
|
1346
|
+
if ((b == null ? void 0 : b.id) === ((X = f.hoverNode) == null ? void 0 : X.id))
|
|
1351
1347
|
return !1;
|
|
1352
|
-
|
|
1348
|
+
f.hoverNode = b;
|
|
1353
1349
|
}
|
|
1354
|
-
function
|
|
1355
|
-
|
|
1356
|
-
|
|
1350
|
+
function v() {
|
|
1351
|
+
Y(() => {
|
|
1352
|
+
y("ready", { pageManager: c });
|
|
1357
1353
|
});
|
|
1358
1354
|
}
|
|
1359
|
-
async function
|
|
1360
|
-
|
|
1355
|
+
async function E(b = !1) {
|
|
1356
|
+
f.disableHover = b;
|
|
1361
1357
|
}
|
|
1362
|
-
function
|
|
1363
|
-
|
|
1358
|
+
function O(b) {
|
|
1359
|
+
z(u, N(b));
|
|
1364
1360
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return we(
|
|
1361
|
+
function B() {
|
|
1362
|
+
return we(u);
|
|
1367
1363
|
}
|
|
1368
|
-
function
|
|
1369
|
-
Ee(
|
|
1364
|
+
function W() {
|
|
1365
|
+
Ee(u.schemas, s.schemas) && u.script === s.script || (z(u.schemas, s.schemas), u.script = s.script, m(u.schemas[0]), w.push(u.schemas, "重置操作"), y("reset", u));
|
|
1370
1366
|
}
|
|
1371
|
-
function
|
|
1372
|
-
|
|
1367
|
+
function oe() {
|
|
1368
|
+
y("save", we(u));
|
|
1373
1369
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1370
|
+
function ue(b) {
|
|
1371
|
+
y("toggleDeviceMode", b);
|
|
1376
1372
|
}
|
|
1377
|
-
function
|
|
1378
|
-
|
|
1373
|
+
function ae() {
|
|
1374
|
+
d.value.handleOpen();
|
|
1379
1375
|
}
|
|
1380
|
-
return
|
|
1376
|
+
return C(), a({
|
|
1381
1377
|
revoke: w,
|
|
1382
|
-
setData:
|
|
1383
|
-
getData:
|
|
1384
|
-
reset:
|
|
1385
|
-
preview:
|
|
1386
|
-
}), (
|
|
1378
|
+
setData: O,
|
|
1379
|
+
getData: B,
|
|
1380
|
+
reset: W,
|
|
1381
|
+
preview: ae
|
|
1382
|
+
}), (b, X) => _(F).initialized.value ? (M(), L(De, {
|
|
1387
1383
|
key: 1,
|
|
1388
|
-
onResolve:
|
|
1384
|
+
onResolve: v
|
|
1389
1385
|
}, {
|
|
1390
1386
|
default: P(() => [
|
|
1391
1387
|
J("div", Dt, [
|
|
1392
1388
|
J("div", Et, [
|
|
1393
|
-
|
|
1394
|
-
|
|
1389
|
+
R(b.$slots, "header", {}, () => [
|
|
1390
|
+
h.hiddenHeader ? Ae("", !0) : (M(), L(_(o), {
|
|
1395
1391
|
key: 0,
|
|
1396
|
-
onPreview:
|
|
1397
|
-
onSave:
|
|
1392
|
+
onPreview: ae,
|
|
1393
|
+
onSave: oe
|
|
1398
1394
|
}, {
|
|
1399
1395
|
header: P(() => [
|
|
1400
|
-
|
|
1396
|
+
R(b.$slots, "header-prefix")
|
|
1401
1397
|
]),
|
|
1402
1398
|
prefix: P(() => [
|
|
1403
|
-
|
|
1399
|
+
R(b.$slots, "header-prefix")
|
|
1404
1400
|
]),
|
|
1405
1401
|
title: P(() => [
|
|
1406
|
-
|
|
1402
|
+
R(b.$slots, "header-title")
|
|
1407
1403
|
]),
|
|
1408
1404
|
"right-prefix": P(() => [
|
|
1409
|
-
|
|
1405
|
+
R(b.$slots, "header-right-prefix")
|
|
1410
1406
|
]),
|
|
1411
1407
|
"right-action": P(() => [
|
|
1412
|
-
|
|
1408
|
+
R(b.$slots, "header-right-action")
|
|
1413
1409
|
]),
|
|
1414
1410
|
"right-suffix": P(() => [
|
|
1415
|
-
|
|
1411
|
+
R(b.$slots, "header-right-suffix")
|
|
1416
1412
|
]),
|
|
1417
1413
|
_: 3
|
|
1418
1414
|
}))
|
|
1419
1415
|
])
|
|
1420
1416
|
]),
|
|
1421
1417
|
J("div", {
|
|
1422
|
-
class: Te(["epic-split-view-container", { "hidden-header":
|
|
1418
|
+
class: Te(["epic-split-view-container", { "hidden-header": b.hiddenHeader }])
|
|
1423
1419
|
}, [
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1420
|
+
T(_(t)),
|
|
1421
|
+
T(_(r)),
|
|
1422
|
+
T(_(l))
|
|
1427
1423
|
], 2),
|
|
1428
|
-
|
|
1424
|
+
T(St, {
|
|
1429
1425
|
ref_key: "previewRef",
|
|
1430
|
-
ref:
|
|
1426
|
+
ref: d
|
|
1431
1427
|
}, null, 512)
|
|
1432
1428
|
])
|
|
1433
1429
|
]),
|
|
1434
1430
|
fallback: P(() => [
|
|
1435
|
-
J("div",
|
|
1436
|
-
|
|
1431
|
+
J("div", It, [
|
|
1432
|
+
T(_(i))
|
|
1437
1433
|
])
|
|
1438
1434
|
]),
|
|
1439
1435
|
_: 3
|
|
1440
|
-
})) : (
|
|
1436
|
+
})) : (M(), he("div", At));
|
|
1441
1437
|
}
|
|
1442
|
-
}),
|
|
1443
|
-
component: async () => await import("./index-
|
|
1438
|
+
}), kt = {
|
|
1439
|
+
component: async () => await import("./index-DiMAGPRY.js"),
|
|
1444
1440
|
defaultSchema: {
|
|
1445
1441
|
label: "代码编辑器",
|
|
1446
1442
|
type: "monacoEditor",
|
|
@@ -1468,7 +1464,7 @@ defineExpose({
|
|
|
1468
1464
|
]
|
|
1469
1465
|
},
|
|
1470
1466
|
bindModel: "model-value"
|
|
1471
|
-
},
|
|
1467
|
+
}, Ct = {
|
|
1472
1468
|
component: async () => await import("./index-DiDIFoTk.js"),
|
|
1473
1469
|
defaultSchema: {
|
|
1474
1470
|
label: "页面",
|
|
@@ -1489,17 +1485,17 @@ defineExpose({
|
|
|
1489
1485
|
]
|
|
1490
1486
|
}
|
|
1491
1487
|
};
|
|
1492
|
-
function
|
|
1493
|
-
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-
|
|
1488
|
+
function _t(e) {
|
|
1489
|
+
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-C5XNe5wE.js")), e.component("EActionEditor", async () => await import("./index-05ByfwQb.js")), e.component("ERuleEditor", async () => await import("./index-CrGWYheb.js")), e.component("EOptionsEditor", async () => await import("./index-DskzasEn.js")), e.component("ENode", async () => await import("./index-DZIjd60A.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
|
|
1494
1490
|
id: "component_view",
|
|
1495
1491
|
title: "组件",
|
|
1496
1492
|
icon: "icon--epic--extension-outline",
|
|
1497
|
-
component: async () => await import("./index-
|
|
1493
|
+
component: async () => await import("./index-nhr7ps1e.js")
|
|
1498
1494
|
}), e.registerActivitybar({
|
|
1499
1495
|
id: "sound_code_view",
|
|
1500
1496
|
title: "源码",
|
|
1501
1497
|
icon: "icon--epic--sdk-outline-rounded",
|
|
1502
|
-
component: async () => await import("./index-
|
|
1498
|
+
component: async () => await import("./index-DWW8LGvj.js")
|
|
1503
1499
|
}), e.registerActivitybar({
|
|
1504
1500
|
id: "outline_view",
|
|
1505
1501
|
title: "大纲",
|
|
@@ -1508,25 +1504,25 @@ function Ct(e) {
|
|
|
1508
1504
|
}), e.registerRightSidebar({
|
|
1509
1505
|
id: "attribute_view",
|
|
1510
1506
|
title: "属性",
|
|
1511
|
-
component: async () => await import("./attributeView-
|
|
1507
|
+
component: async () => await import("./attributeView-oIH3-2FN.js")
|
|
1512
1508
|
}), e.registerRightSidebar({
|
|
1513
1509
|
id: "style_view",
|
|
1514
1510
|
title: "样式",
|
|
1515
|
-
component: async () => await import("./styleView-
|
|
1511
|
+
component: async () => await import("./styleView-CtfATcTc.js")
|
|
1516
1512
|
}), e.registerRightSidebar({
|
|
1517
1513
|
id: "event_view",
|
|
1518
1514
|
title: "事件",
|
|
1519
|
-
component: async () => await import("./eventView-
|
|
1520
|
-
}), [
|
|
1515
|
+
component: async () => await import("./eventView-Ed_9JLnx.js")
|
|
1516
|
+
}), [kt, Ct].forEach((n) => {
|
|
1521
1517
|
e.registerComponent(n);
|
|
1522
1518
|
});
|
|
1523
1519
|
}
|
|
1524
|
-
|
|
1520
|
+
_t(F);
|
|
1525
1521
|
export {
|
|
1526
|
-
|
|
1527
|
-
|
|
1522
|
+
ze as A,
|
|
1523
|
+
te as B,
|
|
1528
1524
|
We as C,
|
|
1529
|
-
|
|
1525
|
+
ee as D,
|
|
1530
1526
|
Le as E,
|
|
1531
1527
|
gt as F,
|
|
1532
1528
|
mt as G,
|
|
@@ -1536,27 +1532,27 @@ export {
|
|
|
1536
1532
|
Ht as a,
|
|
1537
1533
|
pt as b,
|
|
1538
1534
|
Nt as c,
|
|
1539
|
-
|
|
1540
|
-
|
|
1535
|
+
z as d,
|
|
1536
|
+
zt as e,
|
|
1541
1537
|
$t as f,
|
|
1542
|
-
|
|
1538
|
+
Vt as g,
|
|
1543
1539
|
Tt as h,
|
|
1544
1540
|
Wt as i,
|
|
1545
1541
|
Bt as j,
|
|
1546
1542
|
le as k,
|
|
1547
1543
|
Rt as l,
|
|
1548
|
-
|
|
1544
|
+
N as m,
|
|
1549
1545
|
Lt as n,
|
|
1550
1546
|
Ee as o,
|
|
1551
|
-
|
|
1552
|
-
|
|
1547
|
+
Ot as p,
|
|
1548
|
+
Jt as q,
|
|
1553
1549
|
Xe as r,
|
|
1554
1550
|
Ft as s,
|
|
1555
1551
|
Kt as t,
|
|
1556
1552
|
ce as u,
|
|
1557
|
-
|
|
1553
|
+
Ie as v,
|
|
1558
1554
|
Ut as w,
|
|
1559
1555
|
He as x,
|
|
1560
|
-
|
|
1556
|
+
Je as y,
|
|
1561
1557
|
Mt as z
|
|
1562
1558
|
};
|