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