epic-designer-gold 0.0.16 → 0.0.18
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-DaKcfxYS.js → attributeView-B9F_UkWB.js} +1 -1
- package/dist/{attributeView-DZseOPbA.cjs → attributeView-xFHazPhU.cjs} +1 -1
- package/dist/{eventView-BFaz-0Gd.js → eventView-B17FncUM.js} +1 -1
- package/dist/{eventView-DMdS5tNd.cjs → eventView-DcUUt0wC.cjs} +1 -1
- package/dist/{index-CIHXNeLh.cjs → index-5T_iXdMV.cjs} +1 -1
- package/dist/{index-Bo7Wv18B.js → index-BPJ67Apd.js} +1 -1
- package/dist/{index-DaGkNfvy.cjs → index-BmnjsvG9.cjs} +1 -1
- package/dist/{index-BzE8aBGI.cjs → index-BvgsMQ0r.cjs} +1 -1
- package/dist/{index-C23zgjw8.js → index-CBD1g29V.js} +1 -1
- package/dist/{index-LuEk_rsN.cjs → index-CILvmkry.cjs} +1 -1
- package/dist/{index-C3SntaaD.cjs → index-Cm3Jcpcv.cjs} +1 -1
- package/dist/{index-DsZL9gYb.js → index-Cn31n9Ni.js} +1 -1
- package/dist/{index-D2KcZm16.js → index-CqegmH7K.js} +1 -1
- package/dist/{index-B0Zx7BFr.js → index-Cs7FieAs.js} +476 -471
- package/dist/index-Cy_xP_CE.js +4 -0
- package/dist/{index-ji8WAXwM.js → index-D38KoL_8.js} +1 -1
- package/dist/{index-wccisfiH.cjs → index-D7JjJy3L.cjs} +1 -1
- package/dist/{index-CecS9Ywo.js → index-DJ9FhHey.js} +1 -1
- package/dist/{index-UhAkLhp5.js → index-LveNbnCD.js} +1 -1
- package/dist/{index-DAucrTY2.cjs → index-QM5lUp_E.cjs} +1 -1
- package/dist/{index-Bg5w6ttO.cjs → index-X5HbU9iP.cjs} +1 -1
- package/dist/{index-CwopQ1ii.js → index-Z9miUEWt.js} +1 -1
- package/dist/{index-CYvxg3TX.cjs → index-h3vbgf9-.cjs} +1 -1
- package/dist/index-w0VNJWNM.cjs +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-DIACFMk_.js → styleView-B_GTo5jT.js} +1 -1
- package/dist/{styleView-Dti52JEQ.cjs → styleView-CGX70aZc.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B14JQGo7.js +0 -4
- package/dist/index-C4_h1__K.cjs +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { p as F, a as
|
|
3
|
-
function
|
|
1
|
+
import { ref as I, reactive as X, defineComponent as j, openBlock as M, createBlock as z, unref as _, mergeProps as ve, withCtx as P, renderSlot as R, getCurrentInstance as ae, inject as H, watch as O, useAttrs as _e, provide as $, shallowRef as Pe, computed as U, watchEffect as ie, onUnmounted as Ae, resolveComponent as Oe, resolveDynamicComponent as Ve, createVNode as T, createCommentVNode as De, useSlots as Fe, createElementBlock as ye, Suspense as ke, createElementVNode as L, Fragment as Me, renderList as Re, nextTick as te, effectScope as $e, isRef as Ne, getCurrentScope as Be, onScopeDispose as Ue, onMounted as we, normalizeClass as Te, toRaw as Se } from "vue";
|
|
2
|
+
import { p as F, a as ge, l as Y, E as pe } from "./axios-ITY6Uw7A.js";
|
|
3
|
+
function ce(e = 10) {
|
|
4
4
|
const a = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
5
5
|
let n = "";
|
|
6
6
|
for (let o = 0; o < e; o++) {
|
|
@@ -9,7 +9,7 @@ function le(e = 10) {
|
|
|
9
9
|
}
|
|
10
10
|
return n;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ze(e) {
|
|
13
13
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
14
|
}
|
|
15
15
|
function N(e, a = /* @__PURE__ */ new WeakMap()) {
|
|
@@ -31,7 +31,7 @@ function Ot(e) {
|
|
|
31
31
|
var t, r;
|
|
32
32
|
const o = {
|
|
33
33
|
...n,
|
|
34
|
-
id: `${n.type}_${
|
|
34
|
+
id: `${n.type}_${ce(8)}`
|
|
35
35
|
};
|
|
36
36
|
return (o.field || o.input) && !((r = (t = F.getComponentConfingByType(o.type)) == null ? void 0 : t.editConstraints) != null && r.fixedField) && (o.field = o.id), o;
|
|
37
37
|
});
|
|
@@ -46,7 +46,7 @@ function J(e, a, n = !0) {
|
|
|
46
46
|
a.hasOwnProperty(o) || (Array.isArray(e) ? e.splice(Number(o), 1) : delete e[o]);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ie(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
|
|
50
50
|
const t = (r) => {
|
|
51
51
|
if (Array.isArray(r))
|
|
52
52
|
return r.map(t);
|
|
@@ -55,15 +55,15 @@ function ke(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(), c = {};
|
|
58
|
-
return l.forEach((
|
|
59
|
-
n.includes(
|
|
58
|
+
return l.forEach((u) => {
|
|
59
|
+
n.includes(u) || (c[u] = t(r[u]));
|
|
60
60
|
}), o.delete(r), c;
|
|
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 Le(e, a) {
|
|
67
67
|
const n = [];
|
|
68
68
|
let o = !1;
|
|
69
69
|
function t(r) {
|
|
@@ -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_" + ce()
|
|
209
209
|
}
|
|
210
210
|
],
|
|
211
211
|
componentProps: {
|
|
@@ -221,16 +221,16 @@ function Nt(e) {
|
|
|
221
221
|
}
|
|
222
222
|
function ne(e, a) {
|
|
223
223
|
return e.map((n) => {
|
|
224
|
-
var
|
|
224
|
+
var u, w, f;
|
|
225
225
|
let o = n.type ?? "";
|
|
226
|
-
const t = n.options ?? {}, r = (s,
|
|
227
|
-
o === s && (o =
|
|
226
|
+
const t = n.options ?? {}, r = (s, b) => {
|
|
227
|
+
o === s && (o = b, 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: b } = t;
|
|
231
|
+
t.autoSize = { minRows: s, maxRows: b }, delete t.minRows, delete t.maxRows;
|
|
232
232
|
}
|
|
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 =
|
|
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 = ce());
|
|
234
234
|
const l = {
|
|
235
235
|
label: n.label,
|
|
236
236
|
type: o,
|
|
@@ -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, ((
|
|
258
|
+
].includes(o) && (l.input = !0, ((w = (u = n.rules) == null ? void 0 : u[0]) == null ? void 0 : w.required) === !1 && n.rules.shift(), ((f = n.rules) == null ? void 0 : f.length) > 0 && (l.rules = n.rules)), n.list && (l.children = ne(n.list, n)), n.columns && (l.children = ne(n.columns, n)), n.trs && (l.children = ne(n.trs, n)), n.tds && (l.children = ne(n.tds, n)), l;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function Bt(e, a) {
|
|
@@ -266,109 +266,109 @@ function Bt(e, a) {
|
|
|
266
266
|
}, a);
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
const e =
|
|
269
|
+
function Ee() {
|
|
270
|
+
const e = I({}), a = I({}), n = I(!1), o = I([]), t = X({});
|
|
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, g) {
|
|
275
|
+
e.value[m] = g;
|
|
276
276
|
}
|
|
277
277
|
function c(m) {
|
|
278
278
|
delete e.value[m];
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const
|
|
282
|
-
(
|
|
280
|
+
function u(m, g = !1) {
|
|
281
|
+
const h = Object.entries(F.publicMethods).reduce(
|
|
282
|
+
(x, [V, B]) => (x[V] = B.handler, x),
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
285
|
try {
|
|
286
286
|
new Function(`const epic = this;${m}`).bind({
|
|
287
|
-
...
|
|
287
|
+
...h,
|
|
288
288
|
getComponent: r,
|
|
289
289
|
find: r,
|
|
290
|
-
defineExpose:
|
|
291
|
-
publicMethods:
|
|
290
|
+
defineExpose: w,
|
|
291
|
+
publicMethods: h,
|
|
292
292
|
pluginManager: F
|
|
293
293
|
})();
|
|
294
|
-
} catch (
|
|
295
|
-
|
|
294
|
+
} catch (x) {
|
|
295
|
+
g && console.error("[epic:自定义函数]异常:", x);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function w(m) {
|
|
299
299
|
m != null && (a.value = m);
|
|
300
300
|
}
|
|
301
|
-
function f(m, ...
|
|
301
|
+
function f(m, ...g) {
|
|
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((h) => {
|
|
307
|
+
const x = h.args ? JSON.parse(h.args) : g;
|
|
308
|
+
switch (h.type) {
|
|
309
309
|
case "public":
|
|
310
|
-
s(
|
|
310
|
+
s(h, x);
|
|
311
311
|
break;
|
|
312
312
|
case "custom":
|
|
313
|
-
|
|
313
|
+
b(h, x);
|
|
314
314
|
break;
|
|
315
315
|
case "component":
|
|
316
|
-
|
|
316
|
+
d(h, x);
|
|
317
317
|
break;
|
|
318
318
|
default:
|
|
319
|
-
console.warn(`未知的动作类型: ${
|
|
319
|
+
console.warn(`未知的动作类型: ${h.type}`);
|
|
320
320
|
break;
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
function s(m,
|
|
325
|
-
var
|
|
324
|
+
function s(m, g) {
|
|
325
|
+
var h;
|
|
326
326
|
try {
|
|
327
|
-
(
|
|
328
|
-
} catch (
|
|
329
|
-
console.error(`[Epic:公共函数(${m.methodName})]执行异常:`,
|
|
327
|
+
(h = F.publicMethods[m.methodName]) == null || h.handler(...g);
|
|
328
|
+
} catch (x) {
|
|
329
|
+
console.error(`[Epic:公共函数(${m.methodName})]执行异常:`, x);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
332
|
+
function b(m, g) {
|
|
333
|
+
var h, x;
|
|
334
334
|
try {
|
|
335
|
-
(
|
|
335
|
+
(x = (h = a.value)[m.methodName]) == null || x.call(h, ...g);
|
|
336
336
|
} catch (V) {
|
|
337
337
|
console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`, V);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
340
|
+
function d(m, g) {
|
|
341
|
+
const h = m.componentId != null && r(m.componentId);
|
|
342
|
+
if (!h) {
|
|
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
|
+
h[m.methodName](...g);
|
|
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
|
n.value = m;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
o.value =
|
|
355
|
+
function v(m) {
|
|
356
|
+
const g = oe(m, () => !0);
|
|
357
|
+
o.value = g.map((h) => h.id);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
if (t[
|
|
361
|
-
const
|
|
362
|
-
J(m,
|
|
359
|
+
function S(m, g = "default") {
|
|
360
|
+
if (t[g]) {
|
|
361
|
+
const h = t[g];
|
|
362
|
+
J(m, h);
|
|
363
363
|
}
|
|
364
|
-
t[
|
|
364
|
+
t[g] = m;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
if (t[
|
|
368
|
-
J(t[
|
|
366
|
+
function A(m, g = "default") {
|
|
367
|
+
if (t[g]) {
|
|
368
|
+
J(t[g], m, !1);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
-
t[
|
|
371
|
+
t[g] = m;
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
374
|
componentInstances: e,
|
|
@@ -376,40 +376,40 @@ function Ie() {
|
|
|
376
376
|
isDesignMode: n,
|
|
377
377
|
defaultComponentIds: o,
|
|
378
378
|
forms: t,
|
|
379
|
-
addFormData:
|
|
380
|
-
setFormData:
|
|
379
|
+
addFormData: S,
|
|
380
|
+
setFormData: A,
|
|
381
381
|
getComponentInstance: r,
|
|
382
382
|
// 简化查询函数, 推荐使用
|
|
383
383
|
find: r,
|
|
384
384
|
addComponentInstance: l,
|
|
385
385
|
removeComponentInstance: c,
|
|
386
|
-
setMethods:
|
|
386
|
+
setMethods: u,
|
|
387
387
|
doActions: f,
|
|
388
|
-
setDesignMode:
|
|
389
|
-
setDefaultComponentIds:
|
|
388
|
+
setDesignMode: p,
|
|
389
|
+
setDefaultComponentIds: v
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function He() {
|
|
393
|
-
const e =
|
|
393
|
+
const e = I([]), a = I([]), n = I(null);
|
|
394
394
|
let o = 0;
|
|
395
|
-
function t(
|
|
395
|
+
function t(u, w = "插入组件") {
|
|
396
396
|
const f = Date.now();
|
|
397
397
|
o + 150 > f || (o = f, n.value != null && (e.value.push(n.value), a.value.splice(0, a.value.length)), n.value = {
|
|
398
|
-
type:
|
|
399
|
-
componentSchema: JSON.stringify(
|
|
398
|
+
type: w,
|
|
399
|
+
componentSchema: JSON.stringify(u)
|
|
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 u = e.value.pop();
|
|
406
|
+
return n.value != null && a.value.push(n.value), n.value = u, JSON.parse(u.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 u = a.value.pop();
|
|
412
|
+
return n.value != null && e.value.push(n.value), n.value = u, JSON.parse(u.componentSchema);
|
|
413
413
|
}
|
|
414
414
|
function c() {
|
|
415
415
|
e.value = [], a.value = [], n.value = null;
|
|
@@ -424,7 +424,7 @@ function He() {
|
|
|
424
424
|
reset: c
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
const Ke = /* @__PURE__ */
|
|
427
|
+
const Ke = /* @__PURE__ */ j({
|
|
428
428
|
__name: "dynamicFormItem",
|
|
429
429
|
props: {
|
|
430
430
|
hasFormItem: { type: Boolean },
|
|
@@ -432,10 +432,10 @@ const Ke = /* @__PURE__ */ X({
|
|
|
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 = I(), l = () => {
|
|
436
436
|
t("updateFormItemRef", r.value);
|
|
437
437
|
};
|
|
438
|
-
return (c,
|
|
438
|
+
return (c, u) => o.hasFormItem ? (M(), z(_(n), ve({
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "formItemRef",
|
|
441
441
|
ref: r,
|
|
@@ -447,7 +447,7 @@ const Ke = /* @__PURE__ */ X({
|
|
|
447
447
|
_: 3
|
|
448
448
|
}, 16, ["onVnodeMounted"])) : R(c.$slots, "default", { key: 1 });
|
|
449
449
|
}
|
|
450
|
-
}), qe = /* @__PURE__ */
|
|
450
|
+
}), qe = /* @__PURE__ */ j({
|
|
451
451
|
name: "ENode",
|
|
452
452
|
__name: "node",
|
|
453
453
|
props: {
|
|
@@ -461,14 +461,14 @@ const Ke = /* @__PURE__ */ X({
|
|
|
461
461
|
},
|
|
462
462
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
463
463
|
setup(e, { emit: a }) {
|
|
464
|
-
const { proxy: n } = ae(), o = e, t =
|
|
465
|
-
let r =
|
|
466
|
-
const l =
|
|
467
|
-
let s =
|
|
468
|
-
|
|
469
|
-
async function
|
|
464
|
+
const { proxy: n } = ae(), o = e, t = I(null);
|
|
465
|
+
let r = H("formData", X({}));
|
|
466
|
+
const l = H("slots", {}), c = H("pageManager", {}), u = H("disabled", { value: !1 }), w = H("ruleFieldPrefix", null), f = H("resetFormData", !1);
|
|
467
|
+
let s = X(N(o.componentSchema));
|
|
468
|
+
p();
|
|
469
|
+
async function b(i) {
|
|
470
470
|
if (["cascader", "checkbox", "select", "radio"].includes(i.type) && i.componentProps.dynamicId && o.sourceDateUrl) {
|
|
471
|
-
const
|
|
471
|
+
const k = (await ge({
|
|
472
472
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
473
473
|
url: o.sourceDateUrl,
|
|
474
474
|
method: "get",
|
|
@@ -476,113 +476,113 @@ const Ke = /* @__PURE__ */ X({
|
|
|
476
476
|
id: i.componentProps.dynamicId
|
|
477
477
|
}
|
|
478
478
|
})).data.data;
|
|
479
|
-
let E = await
|
|
480
|
-
url:
|
|
481
|
-
method:
|
|
482
|
-
data: JSON.parse(
|
|
483
|
-
params: JSON.parse(
|
|
484
|
-
headers: JSON.parse(
|
|
479
|
+
let E = await ge({
|
|
480
|
+
url: k.url,
|
|
481
|
+
method: k.method,
|
|
482
|
+
data: JSON.parse(k.body),
|
|
483
|
+
params: JSON.parse(k.params),
|
|
484
|
+
headers: JSON.parse(k.headers)
|
|
485
485
|
});
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
488
|
-
i.componentProps.options =
|
|
489
|
-
label:
|
|
490
|
-
value:
|
|
486
|
+
if (k && (k != null && k.dataPath)) {
|
|
487
|
+
const G = k.dataPath.split(".").reduce((Q, Ce) => Q[Ce], E.data);
|
|
488
|
+
i.componentProps.options = d(G).map((Q) => ({
|
|
489
|
+
label: Q[k.dataKey],
|
|
490
|
+
value: Q[k.dataValue]
|
|
491
491
|
}));
|
|
492
492
|
} else
|
|
493
|
-
i.componentProps.options =
|
|
494
|
-
label:
|
|
495
|
-
value:
|
|
493
|
+
i.componentProps.options = d(E.data).map((W) => ({
|
|
494
|
+
label: W[k.dataKey],
|
|
495
|
+
value: W[k.dataValue]
|
|
496
496
|
}));
|
|
497
497
|
return i;
|
|
498
498
|
}
|
|
499
499
|
return i;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function d(i) {
|
|
502
502
|
return i && Object.prototype.toString.call(i) === "[object Array]" ? i : [];
|
|
503
503
|
}
|
|
504
504
|
O(
|
|
505
505
|
() => o.componentSchema,
|
|
506
506
|
(i) => {
|
|
507
|
-
|
|
507
|
+
Ie(s, i, ["children"]) || (J(s, N(i)), p());
|
|
508
508
|
},
|
|
509
509
|
{
|
|
510
510
|
deep: !0
|
|
511
511
|
}
|
|
512
512
|
);
|
|
513
|
-
function
|
|
513
|
+
function p() {
|
|
514
514
|
c.isDesignMode.value && typeof s.field == "string" && (s.field += "-design-mode");
|
|
515
515
|
}
|
|
516
516
|
(o.resetFormData || f) && (r = {});
|
|
517
|
-
const
|
|
518
|
-
|
|
519
|
-
},
|
|
520
|
-
Object.keys(
|
|
521
|
-
const
|
|
522
|
-
var i,
|
|
523
|
-
return (i = s.componentProps) != null && i.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((
|
|
517
|
+
const v = a, S = I(), A = I(), m = (i) => {
|
|
518
|
+
A.value = i;
|
|
519
|
+
}, g = _e();
|
|
520
|
+
Object.keys(g).length && $("nodeAttrs", g);
|
|
521
|
+
const h = Pe(null), x = U(() => {
|
|
522
|
+
var i, C;
|
|
523
|
+
return (i = s.componentProps) != null && i.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((C = s.show) == null ? void 0 : C.call(s, { values: r })) ?? !0;
|
|
524
524
|
}), V = U(() => {
|
|
525
|
-
var
|
|
526
|
-
const i =
|
|
525
|
+
var k;
|
|
526
|
+
const i = x.value && ((k = s.rules) == null ? void 0 : k.map((E) => ({
|
|
527
527
|
...E,
|
|
528
528
|
validator: E.validator && c.funcs.value[E.validator]
|
|
529
529
|
// 自定义校验函数
|
|
530
530
|
})));
|
|
531
|
-
let
|
|
532
|
-
o.ruleField ?
|
|
533
|
-
const
|
|
531
|
+
let C = s.field;
|
|
532
|
+
o.ruleField ? C = o.ruleField : w && s.field && (C = N(w), C.push(s.field));
|
|
533
|
+
const D = {
|
|
534
534
|
...s,
|
|
535
535
|
rules: i,
|
|
536
536
|
rule: i,
|
|
537
|
-
field:
|
|
537
|
+
field: C
|
|
538
538
|
};
|
|
539
|
-
return
|
|
539
|
+
return D.children && delete D.children, D;
|
|
540
540
|
}), B = U(() => {
|
|
541
|
-
var
|
|
542
|
-
const i = ((
|
|
541
|
+
var D, k;
|
|
542
|
+
const i = ((D = q.value) == null ? void 0 : D.bindModel) ?? "modelValue", C = {};
|
|
543
543
|
return s.on && Object.keys(s.on).forEach((E) => {
|
|
544
|
-
|
|
544
|
+
C[`on${ze(E)}`] = (...W) => c.doActions(s.on[E], ...W);
|
|
545
545
|
}), {
|
|
546
546
|
...o,
|
|
547
547
|
...s.componentProps,
|
|
548
|
-
disabled: (
|
|
548
|
+
disabled: (u == null ? void 0 : u.value) || ((k = s.componentProps) == null ? void 0 : k.disabled),
|
|
549
549
|
bindModel: i,
|
|
550
|
-
...
|
|
550
|
+
...C
|
|
551
551
|
};
|
|
552
|
-
}),
|
|
553
|
-
|
|
552
|
+
}), q = U(() => F.getComponentConfingByType(s.type) ?? null);
|
|
553
|
+
ie(() => {
|
|
554
554
|
t.value = o.modelValue ?? r[s.field ?? ""];
|
|
555
555
|
}), O(
|
|
556
556
|
() => t.value,
|
|
557
557
|
() => {
|
|
558
|
-
t.value !== (o.modelValue ?? r[s.field ?? ""]) &&
|
|
558
|
+
t.value !== (o.modelValue ?? r[s.field ?? ""]) && Z(t.value);
|
|
559
559
|
}
|
|
560
560
|
), O(
|
|
561
|
-
() =>
|
|
561
|
+
() => S.value,
|
|
562
562
|
() => {
|
|
563
|
-
|
|
563
|
+
re();
|
|
564
564
|
},
|
|
565
565
|
{ immediate: !0 }
|
|
566
566
|
);
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
const i =
|
|
570
|
-
s.id && i && (s.input && (i.setValue =
|
|
567
|
+
function re() {
|
|
568
|
+
var C;
|
|
569
|
+
const i = S.value || n;
|
|
570
|
+
s.id && i && (s.input && (i.setValue = Z, i.getValue = () => r[s.field] || o.modelValue), i.setAttr = (D, k) => (s.componentProps || (s.componentProps = {}), s.componentProps[D] = k), i.getAttr = (D) => s.componentProps[D], c.addComponentInstance(s.id, i), (C = q.value) != null && C.defaultSchema.input && s.noFormItem !== !0 && A.value && c.addComponentInstance(s.id + "formItem", A.value));
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function se() {
|
|
573
573
|
var i;
|
|
574
|
-
s.id && (c.removeComponentInstance(s.id), (i =
|
|
574
|
+
s.id && (c.removeComponentInstance(s.id), (i = q.value) != null && i.defaultSchema.input && s.noFormItem !== !0 && c.removeComponentInstance(s.id + "formItem"));
|
|
575
575
|
}
|
|
576
|
-
async function
|
|
577
|
-
var
|
|
578
|
-
if (s = await
|
|
579
|
-
const E = c.isDesignMode.value ? (
|
|
580
|
-
|
|
576
|
+
async function fe() {
|
|
577
|
+
var C, D, k;
|
|
578
|
+
if (s = await b(s), typeof ((C = s.componentProps) == null ? void 0 : C.defaultValue) < "u") {
|
|
579
|
+
const E = c.isDesignMode.value ? (D = s.componentProps) == null ? void 0 : D.defaultValue : r[s.field] ?? ((k = s.componentProps) == null ? void 0 : k.defaultValue);
|
|
580
|
+
Z(N(E));
|
|
581
581
|
}
|
|
582
582
|
if (s.type === "slot") {
|
|
583
583
|
const E = s.slotName;
|
|
584
584
|
if (!E) return;
|
|
585
|
-
|
|
585
|
+
h.value = j({
|
|
586
586
|
setup() {
|
|
587
587
|
return () => R(l, E, {
|
|
588
588
|
componentSchema: s,
|
|
@@ -599,21 +599,21 @@ const Ke = /* @__PURE__ */ X({
|
|
|
599
599
|
}
|
|
600
600
|
if (typeof i == "function") {
|
|
601
601
|
const E = await i();
|
|
602
|
-
|
|
602
|
+
h.value = E.default ?? E;
|
|
603
603
|
} else
|
|
604
|
-
|
|
604
|
+
h.value = i;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
606
|
+
function Z(i) {
|
|
607
|
+
v("update:modelValue", i), v("change", i), s.field && (r[s.field] = i);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
|
|
609
|
+
function le(i) {
|
|
610
|
+
v("update:dynamicId", i);
|
|
611
611
|
}
|
|
612
|
-
let
|
|
612
|
+
let y = null;
|
|
613
613
|
return O(
|
|
614
614
|
() => s,
|
|
615
615
|
async (i) => {
|
|
616
|
-
const
|
|
616
|
+
const C = JSON.stringify({
|
|
617
617
|
...i,
|
|
618
618
|
children: void 0,
|
|
619
619
|
componentProps: {
|
|
@@ -621,37 +621,37 @@ const Ke = /* @__PURE__ */ X({
|
|
|
621
621
|
options: null
|
|
622
622
|
}
|
|
623
623
|
});
|
|
624
|
-
if (
|
|
624
|
+
if (C === y)
|
|
625
625
|
return !1;
|
|
626
|
-
|
|
626
|
+
y = C, fe();
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
629
|
immediate: !0,
|
|
630
630
|
deep: !0
|
|
631
631
|
}
|
|
632
|
-
),
|
|
633
|
-
var
|
|
634
|
-
const
|
|
635
|
-
return
|
|
632
|
+
), Ae(se), (i, C) => {
|
|
633
|
+
var k;
|
|
634
|
+
const D = Oe("ENode");
|
|
635
|
+
return h.value && x.value ? (M(), z(Ke, {
|
|
636
636
|
key: 0,
|
|
637
|
-
hasFormItem: _(s).noFormItem !== !0 && ((
|
|
637
|
+
hasFormItem: _(s).noFormItem !== !0 && ((k = q.value) == null ? void 0 : k.defaultSchema.input),
|
|
638
638
|
formItemProps: V.value,
|
|
639
639
|
onUpdateFormItemRef: m
|
|
640
640
|
}, {
|
|
641
641
|
default: P(() => [
|
|
642
|
-
(M(),
|
|
642
|
+
(M(), z(Ve(h.value), ve({
|
|
643
643
|
ref_key: "componentInstance",
|
|
644
|
-
ref:
|
|
645
|
-
onVnodeMounted:
|
|
644
|
+
ref: S,
|
|
645
|
+
onVnodeMounted: re,
|
|
646
646
|
model: _(r)
|
|
647
647
|
}, { ...B.value }, {
|
|
648
648
|
[B.value.bindModel]: t.value,
|
|
649
|
-
["onUpdate:" + B.value.bindModel]:
|
|
650
|
-
[`onUpdate:${B.value.bindModel}` || ""]:
|
|
651
|
-
"onUpdate:dynamicId":
|
|
649
|
+
["onUpdate:" + B.value.bindModel]: C[0] || (C[0] = (E) => t.value = E),
|
|
650
|
+
[`onUpdate:${B.value.bindModel}` || ""]: Z,
|
|
651
|
+
"onUpdate:dynamicId": le
|
|
652
652
|
}), {
|
|
653
653
|
node: P((E) => [
|
|
654
|
-
T(
|
|
654
|
+
T(D, ve(E, {
|
|
655
655
|
sourceDateUrl: o.sourceDateUrl
|
|
656
656
|
}), null, 16, ["sourceDateUrl"])
|
|
657
657
|
]),
|
|
@@ -662,64 +662,64 @@ const Ke = /* @__PURE__ */ X({
|
|
|
662
662
|
}, 16, ["model"]))
|
|
663
663
|
]),
|
|
664
664
|
_: 3
|
|
665
|
-
}, 8, ["hasFormItem", "formItemProps"])) :
|
|
665
|
+
}, 8, ["hasFormItem", "formItemProps"])) : De("", !0);
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
function Ze() {
|
|
670
|
-
const e =
|
|
670
|
+
const e = I(!1), a = Ee(), n = I({});
|
|
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 p = O(e, () => {
|
|
677
|
+
p(), d();
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
async function t(
|
|
683
|
-
var
|
|
682
|
+
async function t(d = "default") {
|
|
683
|
+
var v;
|
|
684
684
|
await o();
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
687
|
-
return
|
|
685
|
+
const p = (v = n.value) == null ? void 0 : v[d];
|
|
686
|
+
if (!p) throw new Error(`表单 [name=${d}] 不存在`);
|
|
687
|
+
return p;
|
|
688
688
|
}
|
|
689
|
-
async function r(
|
|
690
|
-
const
|
|
691
|
-
return N(await
|
|
689
|
+
async function r(d, p) {
|
|
690
|
+
const v = await t(d);
|
|
691
|
+
return N(await p(v));
|
|
692
692
|
}
|
|
693
|
-
async function l(
|
|
694
|
-
return await r(
|
|
693
|
+
async function l(d = "default") {
|
|
694
|
+
return await r(d, (p) => p.getData());
|
|
695
695
|
}
|
|
696
|
-
function c(
|
|
697
|
-
var
|
|
698
|
-
a.setFormData(
|
|
699
|
-
const
|
|
700
|
-
|
|
696
|
+
function c(d, p = "default") {
|
|
697
|
+
var S;
|
|
698
|
+
a.setFormData(d, p);
|
|
699
|
+
const v = (S = n.value) == null ? void 0 : S[p];
|
|
700
|
+
v == null || v.clearValidate();
|
|
701
701
|
}
|
|
702
|
-
async function d
|
|
703
|
-
return await r(
|
|
702
|
+
async function u(d = "default") {
|
|
703
|
+
return await r(d, async (p) => (await p.validate(), await p.getData()));
|
|
704
704
|
}
|
|
705
|
-
async function
|
|
705
|
+
async function w(d) {
|
|
706
706
|
await o();
|
|
707
|
-
const
|
|
708
|
-
for (const
|
|
709
|
-
const
|
|
710
|
-
|
|
707
|
+
const p = {};
|
|
708
|
+
for (const v in n.value) {
|
|
709
|
+
const S = n.value[v];
|
|
710
|
+
S && (p[v] = N(await d(S)));
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return p;
|
|
713
713
|
}
|
|
714
714
|
async function f() {
|
|
715
|
-
return await
|
|
715
|
+
return await w((d) => d.getData());
|
|
716
716
|
}
|
|
717
|
-
function s(
|
|
718
|
-
for (const
|
|
719
|
-
c(
|
|
717
|
+
function s(d) {
|
|
718
|
+
for (const p in d)
|
|
719
|
+
c(d[p], p);
|
|
720
720
|
}
|
|
721
|
-
async function
|
|
722
|
-
return await
|
|
721
|
+
async function b() {
|
|
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: c,
|
|
730
|
-
validate:
|
|
730
|
+
validate: u,
|
|
731
731
|
getForms: f,
|
|
732
732
|
setForms: s,
|
|
733
|
-
validateAll:
|
|
733
|
+
validateAll: b,
|
|
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__ */ j({
|
|
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 = Y(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: c, getData: u, setData: w, validate: f, getForms: s, setForms: b, validateAll: d, getFormInstance: p } = Ze(), v = e, S = X({
|
|
751
751
|
schemas: []
|
|
752
752
|
});
|
|
753
753
|
O(
|
|
754
|
-
() =>
|
|
755
|
-
(
|
|
756
|
-
J(
|
|
754
|
+
() => v.pageSchema,
|
|
755
|
+
(h) => {
|
|
756
|
+
J(S, h);
|
|
757
757
|
},
|
|
758
758
|
{
|
|
759
759
|
immediate: !0,
|
|
760
760
|
deep: !0
|
|
761
761
|
}
|
|
762
762
|
), O(
|
|
763
|
-
() =>
|
|
764
|
-
(
|
|
765
|
-
|
|
763
|
+
() => v.formData,
|
|
764
|
+
(h) => {
|
|
765
|
+
h && w(h);
|
|
766
766
|
},
|
|
767
767
|
{
|
|
768
768
|
immediate: !0,
|
|
769
769
|
deep: !0
|
|
770
770
|
}
|
|
771
771
|
), O(
|
|
772
|
-
() =>
|
|
773
|
-
(
|
|
774
|
-
|
|
772
|
+
() => S.script,
|
|
773
|
+
(h) => {
|
|
774
|
+
h && l.setMethods(h, !0);
|
|
775
775
|
},
|
|
776
776
|
{
|
|
777
777
|
immediate: !0
|
|
778
778
|
}
|
|
779
|
-
), $("slots", Fe()), $("pageManager", l), $("forms", c), $("pageSchema",
|
|
779
|
+
), $("slots", Fe()), $("pageManager", l), $("forms", c), $("pageSchema", S), $(
|
|
780
780
|
"disabled",
|
|
781
|
-
U(() =>
|
|
781
|
+
U(() => v.disabled)
|
|
782
782
|
);
|
|
783
|
-
const
|
|
784
|
-
function
|
|
785
|
-
|
|
783
|
+
const A = ae(), m = A == null ? void 0 : A.proxy;
|
|
784
|
+
function g() {
|
|
785
|
+
te(() => {
|
|
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:
|
|
793
|
-
setData:
|
|
792
|
+
getData: u,
|
|
793
|
+
setData: w,
|
|
794
794
|
validate: f,
|
|
795
795
|
getForms: s,
|
|
796
|
-
setForms:
|
|
797
|
-
validateAll:
|
|
798
|
-
getFormInstance:
|
|
799
|
-
}), (
|
|
796
|
+
setForms: b,
|
|
797
|
+
validateAll: d,
|
|
798
|
+
getFormInstance: p
|
|
799
|
+
}), (h, x) => _(F).initialized.value ? (M(), z(ke, {
|
|
800
800
|
key: 1,
|
|
801
|
-
onResolve:
|
|
801
|
+
onResolve: g
|
|
802
802
|
}, {
|
|
803
803
|
default: P(() => [
|
|
804
|
-
|
|
805
|
-
(M(!0),
|
|
804
|
+
L("div", Qe, [
|
|
805
|
+
(M(!0), ye(Me, null, Re(S.schemas, (V, B) => (M(), z(_(qe), {
|
|
806
806
|
key: B,
|
|
807
|
-
sourceDateUrl:
|
|
807
|
+
sourceDateUrl: v.sourceDateUrl,
|
|
808
808
|
componentSchema: V
|
|
809
809
|
}, null, 8, ["sourceDateUrl", "componentSchema"]))), 128))
|
|
810
810
|
])
|
|
811
811
|
]),
|
|
812
812
|
fallback: P(() => [
|
|
813
|
-
|
|
813
|
+
L("div", Ye, [
|
|
814
814
|
T(_(o))
|
|
815
815
|
])
|
|
816
816
|
]),
|
|
817
817
|
_: 1
|
|
818
|
-
})) : (M(),
|
|
818
|
+
})) : (M(), ye("div", Ge));
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
|
-
function
|
|
821
|
+
function be(e) {
|
|
822
822
|
return Be() ? (Ue(e), !0) : !1;
|
|
823
823
|
}
|
|
824
824
|
function je(e) {
|
|
@@ -826,9 +826,9 @@ 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))), be(t), n);
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function ee(e) {
|
|
832
832
|
return typeof e == "function" ? e() : _(e);
|
|
833
833
|
}
|
|
834
834
|
const et = typeof window < "u" && typeof document < "u";
|
|
@@ -839,81 +839,81 @@ function rt(e) {
|
|
|
839
839
|
return ae();
|
|
840
840
|
}
|
|
841
841
|
function st(e, a = !0, n) {
|
|
842
|
-
rt() ?
|
|
842
|
+
rt() ? we(e, n) : a ? e() : te(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 = I(e);
|
|
849
849
|
function l(c) {
|
|
850
850
|
if (arguments.length)
|
|
851
851
|
return r.value = c, r.value;
|
|
852
852
|
{
|
|
853
|
-
const
|
|
854
|
-
return r.value = r.value ===
|
|
853
|
+
const u = ee(n);
|
|
854
|
+
return r.value = r.value === u ? ee(o) : u, 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 = O(e, (...t) => (
|
|
860
|
+
const o = O(e, (...t) => (te(() => o()), a(...t)), n);
|
|
861
861
|
return o;
|
|
862
862
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
863
|
+
const ue = et ? window : void 0;
|
|
864
|
+
function K(e) {
|
|
865
865
|
var a;
|
|
866
|
-
const n =
|
|
866
|
+
const n = ee(e);
|
|
867
867
|
return (a = n == null ? void 0 : n.$el) != null ? a : n;
|
|
868
868
|
}
|
|
869
869
|
function it(...e) {
|
|
870
870
|
let a, n, o, t;
|
|
871
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, t] = e, a =
|
|
871
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, t] = e, a = ue) : [a, n, o, t] = e, !a)
|
|
872
872
|
return at;
|
|
873
873
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
874
874
|
const r = [], l = () => {
|
|
875
875
|
r.forEach((f) => f()), r.length = 0;
|
|
876
|
-
}, c = (f, s,
|
|
877
|
-
() => [
|
|
876
|
+
}, c = (f, s, b, d) => (f.addEventListener(s, b, d), () => f.removeEventListener(s, b, d)), u = O(
|
|
877
|
+
() => [K(a), ee(t)],
|
|
878
878
|
([f, s]) => {
|
|
879
879
|
if (l(), !f)
|
|
880
880
|
return;
|
|
881
|
-
const
|
|
881
|
+
const b = ot(s) ? { ...s } : s;
|
|
882
882
|
r.push(
|
|
883
|
-
...n.flatMap((
|
|
883
|
+
...n.flatMap((d) => o.map((p) => c(f, d, p, b)))
|
|
884
884
|
);
|
|
885
885
|
},
|
|
886
886
|
{ immediate: !0, flush: "post" }
|
|
887
|
-
),
|
|
888
|
-
|
|
887
|
+
), w = () => {
|
|
888
|
+
u(), l();
|
|
889
889
|
};
|
|
890
|
-
return
|
|
890
|
+
return be(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 xe(...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 {
|
|
899
|
-
target: t =
|
|
899
|
+
target: t = ue,
|
|
900
900
|
eventName: r = "keydown",
|
|
901
901
|
passive: l = !1,
|
|
902
902
|
dedupe: c = !1
|
|
903
|
-
} = o,
|
|
903
|
+
} = o, u = ct(a);
|
|
904
904
|
return it(t, r, (f) => {
|
|
905
|
-
f.repeat &&
|
|
905
|
+
f.repeat && ee(c) || u(f) && n(f);
|
|
906
906
|
}, l);
|
|
907
907
|
}
|
|
908
|
-
function pe(e, a, n = {}) {
|
|
909
|
-
return Ee(e, a, { ...n, eventName: "keydown" });
|
|
910
|
-
}
|
|
911
908
|
function me(e, a, n = {}) {
|
|
912
|
-
return
|
|
909
|
+
return xe(e, a, { ...n, eventName: "keydown" });
|
|
910
|
+
}
|
|
911
|
+
function he(e, a, n = {}) {
|
|
912
|
+
return xe(e, a, { ...n, eventName: "keyup" });
|
|
913
913
|
}
|
|
914
914
|
function ut() {
|
|
915
|
-
const e =
|
|
916
|
-
return a &&
|
|
915
|
+
const e = I(!1), a = ae();
|
|
916
|
+
return a && we(() => {
|
|
917
917
|
e.value = !0;
|
|
918
918
|
}, a), e;
|
|
919
919
|
}
|
|
@@ -925,65 +925,65 @@ function ft(e) {
|
|
|
925
925
|
return JSON.parse(JSON.stringify(e));
|
|
926
926
|
}
|
|
927
927
|
function pt(e, a, n = {}) {
|
|
928
|
-
const { window: o =
|
|
928
|
+
const { window: o = ue, ...t } = n;
|
|
929
929
|
let r;
|
|
930
930
|
const l = dt(() => o && "ResizeObserver" in o), c = () => {
|
|
931
931
|
r && (r.disconnect(), r = void 0);
|
|
932
|
-
},
|
|
933
|
-
const s =
|
|
934
|
-
return Array.isArray(s) ? s.map((
|
|
935
|
-
}),
|
|
936
|
-
|
|
932
|
+
}, u = U(() => {
|
|
933
|
+
const s = ee(e);
|
|
934
|
+
return Array.isArray(s) ? s.map((b) => K(b)) : [K(s)];
|
|
935
|
+
}), w = O(
|
|
936
|
+
u,
|
|
937
937
|
(s) => {
|
|
938
938
|
if (c(), l.value && o) {
|
|
939
939
|
r = new ResizeObserver(a);
|
|
940
|
-
for (const
|
|
941
|
-
|
|
940
|
+
for (const b of s)
|
|
941
|
+
b && r.observe(b, t);
|
|
942
942
|
}
|
|
943
943
|
},
|
|
944
944
|
{ immediate: !0, flush: "post" }
|
|
945
945
|
), f = () => {
|
|
946
|
-
c(),
|
|
946
|
+
c(), w();
|
|
947
947
|
};
|
|
948
|
-
return
|
|
948
|
+
return be(f), {
|
|
949
949
|
isSupported: l,
|
|
950
950
|
stop: f
|
|
951
951
|
};
|
|
952
952
|
}
|
|
953
953
|
function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
954
|
-
const { window: o =
|
|
955
|
-
var s,
|
|
956
|
-
return (
|
|
957
|
-
}), l =
|
|
954
|
+
const { window: o = ue, box: t = "content-box" } = n, r = U(() => {
|
|
955
|
+
var s, b;
|
|
956
|
+
return (b = (s = K(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : b.includes("svg");
|
|
957
|
+
}), l = I(a.width), c = I(a.height), { stop: u } = pt(
|
|
958
958
|
e,
|
|
959
959
|
([s]) => {
|
|
960
|
-
const
|
|
960
|
+
const b = 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 p = d.getBoundingClientRect();
|
|
965
|
+
l.value = p.width, c.value = p.height;
|
|
966
966
|
}
|
|
967
|
-
} else if (
|
|
968
|
-
const
|
|
969
|
-
l.value =
|
|
967
|
+
} else if (b) {
|
|
968
|
+
const d = Array.isArray(b) ? b : [b];
|
|
969
|
+
l.value = d.reduce((p, { inlineSize: v }) => p + v, 0), c.value = d.reduce((p, { blockSize: v }) => p + v, 0);
|
|
970
970
|
} else
|
|
971
971
|
l.value = s.contentRect.width, c.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, c.value = "offsetHeight" in s ? s.offsetHeight : a.height);
|
|
978
978
|
});
|
|
979
|
-
const
|
|
980
|
-
() =>
|
|
979
|
+
const w = O(
|
|
980
|
+
() => K(e),
|
|
981
981
|
(s) => {
|
|
982
982
|
l.value = s ? a.width : 0, c.value = s ? a.height : 0;
|
|
983
983
|
}
|
|
984
984
|
);
|
|
985
985
|
function f() {
|
|
986
|
-
|
|
986
|
+
u(), w();
|
|
987
987
|
}
|
|
988
988
|
return {
|
|
989
989
|
width: l,
|
|
@@ -991,56 +991,56 @@ function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
|
991
991
|
stop: f
|
|
992
992
|
};
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function zt(e, a, n, o = {}) {
|
|
995
995
|
var t, r, l;
|
|
996
996
|
const {
|
|
997
997
|
clone: c = !1,
|
|
998
|
-
passive:
|
|
999
|
-
eventName:
|
|
998
|
+
passive: u = !1,
|
|
999
|
+
eventName: w,
|
|
1000
1000
|
deep: f = !1,
|
|
1001
1001
|
defaultValue: s,
|
|
1002
|
-
shouldEmit:
|
|
1003
|
-
} = o,
|
|
1004
|
-
let
|
|
1005
|
-
a || (a = "modelValue"),
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1002
|
+
shouldEmit: b
|
|
1003
|
+
} = o, d = ae(), p = 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 v = w;
|
|
1005
|
+
a || (a = "modelValue"), v = v || `update:${a.toString()}`;
|
|
1006
|
+
const S = (g) => c ? typeof c == "function" ? c(g) : ft(g) : g, A = () => tt(e[a]) ? S(e[a]) : s, m = (g) => {
|
|
1007
|
+
b ? b(g) && p(v, g) : p(v, g);
|
|
1008
1008
|
};
|
|
1009
|
-
if (
|
|
1010
|
-
const
|
|
1011
|
-
let
|
|
1009
|
+
if (u) {
|
|
1010
|
+
const g = A(), h = I(g);
|
|
1011
|
+
let x = !1;
|
|
1012
1012
|
return O(
|
|
1013
1013
|
() => e[a],
|
|
1014
1014
|
(V) => {
|
|
1015
|
-
|
|
1015
|
+
x || (x = !0, h.value = S(V), te(() => x = !1));
|
|
1016
1016
|
}
|
|
1017
1017
|
), O(
|
|
1018
|
-
|
|
1018
|
+
h,
|
|
1019
1019
|
(V) => {
|
|
1020
|
-
!
|
|
1020
|
+
!x && (V !== e[a] || f) && m(V);
|
|
1021
1021
|
},
|
|
1022
1022
|
{ deep: f }
|
|
1023
|
-
),
|
|
1023
|
+
), h;
|
|
1024
1024
|
} else
|
|
1025
1025
|
return U({
|
|
1026
1026
|
get() {
|
|
1027
|
-
return
|
|
1027
|
+
return A();
|
|
1028
1028
|
},
|
|
1029
|
-
set(
|
|
1030
|
-
m(
|
|
1029
|
+
set(g) {
|
|
1030
|
+
m(g);
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1035
|
-
const { isDark: e } =
|
|
1034
|
+
function Lt() {
|
|
1035
|
+
const { isDark: e } = de(), a = lt(e);
|
|
1036
1036
|
return {
|
|
1037
1037
|
isDark: e,
|
|
1038
1038
|
toggleDark: a
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
function mt() {
|
|
1042
|
-
const e =
|
|
1043
|
-
return
|
|
1042
|
+
const e = I(!1);
|
|
1043
|
+
return we(() => {
|
|
1044
1044
|
ht(e), vt(e);
|
|
1045
1045
|
}), O(
|
|
1046
1046
|
() => e.value,
|
|
@@ -1066,12 +1066,12 @@ function vt(e) {
|
|
|
1066
1066
|
n.observe(a, {
|
|
1067
1067
|
attributes: !0,
|
|
1068
1068
|
attributeFilter: ["class"]
|
|
1069
|
-
}),
|
|
1069
|
+
}), Ae(() => {
|
|
1070
1070
|
n.disconnect();
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
function yt() {
|
|
1074
|
-
const e =
|
|
1074
|
+
const e = I(1), a = I(!1), { isDark: n } = mt(), { pressSpace: o, pressShift: t, pressCtrl: r } = gt();
|
|
1075
1075
|
return {
|
|
1076
1076
|
canvasScale: e,
|
|
1077
1077
|
pressSpace: o,
|
|
@@ -1081,36 +1081,36 @@ function yt() {
|
|
|
1081
1081
|
isDark: n
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
const
|
|
1084
|
+
const de = je(yt);
|
|
1085
1085
|
function gt() {
|
|
1086
|
-
const e =
|
|
1087
|
-
return
|
|
1086
|
+
const e = I(!1), a = I(!1), n = I(!1);
|
|
1087
|
+
return me(" ", () => {
|
|
1088
1088
|
e.value = !0;
|
|
1089
|
-
}),
|
|
1089
|
+
}), he(" ", () => {
|
|
1090
1090
|
e.value = !1;
|
|
1091
|
-
}),
|
|
1091
|
+
}), me("Shift", (o) => {
|
|
1092
1092
|
o.preventDefault(), a.value = !0;
|
|
1093
|
-
}),
|
|
1093
|
+
}), he("Shift", () => {
|
|
1094
1094
|
a.value = !1;
|
|
1095
|
-
}),
|
|
1095
|
+
}), me("Control", (o) => {
|
|
1096
1096
|
o.preventDefault(), n.value = !0;
|
|
1097
|
-
}),
|
|
1097
|
+
}), he("Control", () => {
|
|
1098
1098
|
n.value = !1;
|
|
1099
1099
|
}), { pressSpace: e, pressShift: a, pressCtrl: n };
|
|
1100
1100
|
}
|
|
1101
1101
|
function Jt(e) {
|
|
1102
|
-
const { pressSpace: a } =
|
|
1102
|
+
const { pressSpace: a } = de(), 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(
|
|
1106
|
-
var
|
|
1107
|
-
a.value && (o =
|
|
1105
|
+
function r(u) {
|
|
1106
|
+
var w;
|
|
1107
|
+
a.value && (o = u.x, t = u.y, (w = u.dataTransfer) == null || w.setDragImage(document.createElement("div"), 0, 0));
|
|
1108
1108
|
}
|
|
1109
|
-
function l(
|
|
1110
|
-
if (
|
|
1109
|
+
function l(u) {
|
|
1110
|
+
if (u.preventDefault(), !u.x || !u.y || !a.value)
|
|
1111
1111
|
return;
|
|
1112
|
-
const
|
|
1113
|
-
o =
|
|
1112
|
+
const w = u.x - o, f = u.y - t;
|
|
1113
|
+
o = u.x, t = u.y, e.value && (e.value.scrollTop -= f, e.value.scrollLeft -= w);
|
|
1114
1114
|
}
|
|
1115
1115
|
function c() {
|
|
1116
1116
|
a.value = !1;
|
|
@@ -1118,7 +1118,7 @@ function Jt(e) {
|
|
|
1118
1118
|
return { handleElementDragStart: r, handleElementDrag: l, handleElementDragEnd: c };
|
|
1119
1119
|
}
|
|
1120
1120
|
function Wt(e) {
|
|
1121
|
-
const { pressCtrl: a, canvasScale: n, disabledZoom: o } =
|
|
1121
|
+
const { pressCtrl: a, canvasScale: n, disabledZoom: o } = de();
|
|
1122
1122
|
function t(r) {
|
|
1123
1123
|
if (!a.value || o.value)
|
|
1124
1124
|
return;
|
|
@@ -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__ */ j({
|
|
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 = I(null), r = I(!1), l = I(!1), c = I({}), u = H("pageSchema"), w = I(null), f = I("");
|
|
1153
1153
|
function s() {
|
|
1154
1154
|
l.value = !1;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1156
|
+
function b() {
|
|
1157
1157
|
r.value = !1;
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1160
|
-
r.value = !0, f.value =
|
|
1159
|
+
function d() {
|
|
1160
|
+
r.value = !0, f.value = ce();
|
|
1161
1161
|
}
|
|
1162
|
-
async function
|
|
1162
|
+
async function p() {
|
|
1163
1163
|
try {
|
|
1164
|
-
let
|
|
1165
|
-
if (!Object.keys(
|
|
1164
|
+
let v = await w.value.validateAll();
|
|
1165
|
+
if (!Object.keys(v).length) {
|
|
1166
1166
|
alert("请添加表单组件后再尝试!");
|
|
1167
1167
|
return;
|
|
1168
1168
|
}
|
|
1169
|
-
Object.keys(
|
|
1170
|
-
var
|
|
1171
|
-
(
|
|
1169
|
+
Object.keys(v).length === 1 && (v = v.default), c.value = JSON.stringify(v, null, 2), te(() => {
|
|
1170
|
+
var S;
|
|
1171
|
+
(S = t.value) == null || S.setValue(c.value);
|
|
1172
1172
|
}), l.value = !0;
|
|
1173
|
-
} catch (
|
|
1174
|
-
console.error(
|
|
1173
|
+
} catch (v) {
|
|
1174
|
+
console.error(v);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
return a({
|
|
1178
|
-
handleOpen:
|
|
1179
|
-
}), (
|
|
1178
|
+
handleOpen: d
|
|
1179
|
+
}), (v, S) => (M(), z(_(o), {
|
|
1180
1180
|
modelValue: r.value,
|
|
1181
|
-
"onUpdate:modelValue":
|
|
1181
|
+
"onUpdate:modelValue": S[1] || (S[1] = (A) => r.value = A),
|
|
1182
1182
|
title: "预览",
|
|
1183
1183
|
class: "w-900px",
|
|
1184
1184
|
width: "900px",
|
|
1185
|
-
onClose:
|
|
1186
|
-
onOk:
|
|
1185
|
+
onClose: b,
|
|
1186
|
+
onOk: p,
|
|
1187
1187
|
okText: "表单数据"
|
|
1188
1188
|
}, {
|
|
1189
1189
|
default: P(() => [
|
|
1190
|
-
|
|
1191
|
-
(M(),
|
|
1190
|
+
L("div", wt, [
|
|
1191
|
+
(M(), z(_(Xe), {
|
|
1192
1192
|
key: f.value,
|
|
1193
1193
|
ref_key: "kb",
|
|
1194
|
-
ref:
|
|
1195
|
-
"page-schema": _(
|
|
1194
|
+
ref: w,
|
|
1195
|
+
"page-schema": _(u)
|
|
1196
1196
|
}, null, 8, ["page-schema"])),
|
|
1197
1197
|
T(_(o), {
|
|
1198
1198
|
modelValue: l.value,
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1199
|
+
"onUpdate:modelValue": S[0] || (S[0] = (A) => l.value = A),
|
|
1200
1200
|
title: "表单数据",
|
|
1201
1201
|
class: "w-860px",
|
|
1202
1202
|
width: "860px",
|
|
@@ -1204,7 +1204,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1204
1204
|
onOk: s
|
|
1205
1205
|
}, {
|
|
1206
1206
|
default: P(() => [
|
|
1207
|
-
|
|
1207
|
+
L("div", bt, [
|
|
1208
1208
|
T(_(n), {
|
|
1209
1209
|
ref_key: "monacoEditorRef",
|
|
1210
1210
|
ref: t,
|
|
@@ -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" }, kt = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */
|
|
1228
|
+
}, Dt = { class: "epic-designer-main" }, kt = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ j({
|
|
1229
1229
|
__name: "designer",
|
|
1230
1230
|
props: {
|
|
1231
1231
|
disabledZoom: { type: Boolean, default: !1 },
|
|
@@ -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 = Y(() => import("./index-C-XUgjda.js")), t = Y(() => import("./index-ASoFJnMl.js")), r = Y(() => import("./index-BPJ67Apd.js")), l = Y(() => import("./index-ooVzYa5L.js")), c = Y(() => import("./index-DgcFxYFp.js")), u = Ee(), w = He(), f = e;
|
|
1252
1252
|
let s = {
|
|
1253
1253
|
schemas: [
|
|
1254
1254
|
{
|
|
@@ -1295,156 +1295,161 @@ defineExpose({
|
|
|
1295
1295
|
test
|
|
1296
1296
|
})`
|
|
1297
1297
|
};
|
|
1298
|
-
|
|
1299
|
-
if (
|
|
1298
|
+
ie(async () => {
|
|
1299
|
+
if (f.defaultSchema) {
|
|
1300
1300
|
s = f.defaultSchema;
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
console.log("%c [ updateSourceId ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.updateSourceId), console.log("%c [ source ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.source), f.source && F.setSourceData(f.source), f.formMode && (s.schemas = F.formSchemas), f.updateSourceId && (s.schemas = await
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
url: i.url,
|
|
1309
|
-
method: i.method,
|
|
1310
|
-
data: JSON.parse(i.body),
|
|
1311
|
-
params: JSON.parse(i.params),
|
|
1312
|
-
headers: JSON.parse(i.headers)
|
|
1313
|
-
});
|
|
1314
|
-
if (i && (i != null && i.dataPath)) {
|
|
1315
|
-
const D = i.dataPath.split(".").reduce((E, K) => E[K], I.data);
|
|
1316
|
-
h.componentProps.options = S(D).map((E) => ({
|
|
1317
|
-
label: E[i.dataKey],
|
|
1318
|
-
value: E[i.dataValue]
|
|
1319
|
-
}));
|
|
1320
|
-
} else
|
|
1321
|
-
h.componentProps.options = S(I.data).map((x) => ({
|
|
1322
|
-
label: x[i.dataKey],
|
|
1323
|
-
value: x[i.dataValue]
|
|
1324
|
-
}));
|
|
1325
|
-
}
|
|
1326
|
-
return h;
|
|
1327
|
-
})
|
|
1328
|
-
), console.log("%c [ ]-193", "font-size:13px; background:pink; color:#bf2c9f;", s.schemas));
|
|
1303
|
+
console.log("%c [ updateSourceId ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.updateSourceId), console.log("%c [ source ]-141", "font-size:13px; background:pink; color:#bf2c9f;", f.source), f.source && F.setSourceData(f.source), f.formMode && (s.schemas = F.formSchemas), console.log("%c [ ]-152", "font-size:13px; background:pink; color:#bf2c9f;", s.schemas), f.updateSourceId && (s.schemas = await b(s.schemas), console.log(
|
|
1304
|
+
"%c [ innerDefaultSchema.schemas ]-155",
|
|
1305
|
+
"font-size:13px; background:pink; color:#bf2c9f;",
|
|
1306
|
+
s.schemas
|
|
1307
|
+
));
|
|
1329
1308
|
});
|
|
1330
|
-
function
|
|
1331
|
-
return
|
|
1309
|
+
async function b(y) {
|
|
1310
|
+
return y.map(async (i) => {
|
|
1311
|
+
if (console.log("%c [ el ]-165", "font-size:13px; background:pink; color:#bf2c9f;", i), i && i.children && i.children.length && b(i.children), ["cascader", "checkbox", "select", "radio"].includes(i.type) && i.componentProps.dynamicId && f.updateSourceId === i.componentProps.dynamicId) {
|
|
1312
|
+
const D = f.source.find((E) => E.id === f.updateSourceId);
|
|
1313
|
+
let k = await ge({
|
|
1314
|
+
url: D.url,
|
|
1315
|
+
method: D.method,
|
|
1316
|
+
data: JSON.parse(D.body),
|
|
1317
|
+
params: JSON.parse(D.params),
|
|
1318
|
+
headers: JSON.parse(D.headers)
|
|
1319
|
+
});
|
|
1320
|
+
if (D && (D != null && D.dataPath)) {
|
|
1321
|
+
const W = D.dataPath.split(".").reduce((G, Q) => G[Q], k.data);
|
|
1322
|
+
i.componentProps.options = d(W).map((G) => ({
|
|
1323
|
+
label: G[D.dataKey],
|
|
1324
|
+
value: G[D.dataValue]
|
|
1325
|
+
}));
|
|
1326
|
+
} else
|
|
1327
|
+
i.componentProps.options = d(k.data).map((E) => ({
|
|
1328
|
+
label: E[D.dataKey],
|
|
1329
|
+
value: E[D.dataValue]
|
|
1330
|
+
}));
|
|
1331
|
+
}
|
|
1332
|
+
return i;
|
|
1333
|
+
});
|
|
1332
1334
|
}
|
|
1333
|
-
d
|
|
1334
|
-
|
|
1335
|
+
function d(y) {
|
|
1336
|
+
return y && Object.prototype.toString.call(y) === "[object Array]" ? y : [];
|
|
1337
|
+
}
|
|
1338
|
+
u.setDesignMode(), u.setDefaultComponentIds(s.schemas);
|
|
1339
|
+
const p = n, v = I(null), S = X({
|
|
1335
1340
|
checkedNode: null,
|
|
1336
1341
|
hoverNode: null,
|
|
1337
1342
|
disableHover: !1,
|
|
1338
1343
|
matched: []
|
|
1339
|
-
}),
|
|
1344
|
+
}), A = X({
|
|
1340
1345
|
schemas: [],
|
|
1341
1346
|
script: s.script
|
|
1342
|
-
}), { disabledZoom:
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
}),
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1348
|
-
}), $("pageSchema",
|
|
1347
|
+
}), { disabledZoom: m } = de();
|
|
1348
|
+
ie(() => {
|
|
1349
|
+
m.value = f.disabledZoom;
|
|
1350
|
+
}), ie(() => {
|
|
1351
|
+
const y = A.script;
|
|
1352
|
+
y && y !== "" && u.setMethods(y);
|
|
1353
|
+
}), $("pageSchema", A), $("revoke", w), $("pageManager", u), $(
|
|
1349
1354
|
"designerProps",
|
|
1350
1355
|
U(() => f)
|
|
1351
1356
|
), $("designer", {
|
|
1352
|
-
setCheckedNode:
|
|
1353
|
-
setHoverNode:
|
|
1354
|
-
setDisableHover:
|
|
1355
|
-
handleToggleDeviceMode:
|
|
1356
|
-
reset:
|
|
1357
|
-
state:
|
|
1358
|
-
}),
|
|
1359
|
-
|
|
1360
|
-
}),
|
|
1361
|
-
|
|
1362
|
-
}),
|
|
1363
|
-
|
|
1357
|
+
setCheckedNode: h,
|
|
1358
|
+
setHoverNode: x,
|
|
1359
|
+
setDisableHover: B,
|
|
1360
|
+
handleToggleDeviceMode: Z,
|
|
1361
|
+
reset: se,
|
|
1362
|
+
state: S
|
|
1363
|
+
}), pe.on("saveSourceData", (y) => {
|
|
1364
|
+
p("saveSourceData", y);
|
|
1365
|
+
}), pe.on("deleteSourceData", (y) => {
|
|
1366
|
+
p("deleteSourceData", y);
|
|
1367
|
+
}), pe.on("updateSourceData", (y) => {
|
|
1368
|
+
p("updateSourceData", y);
|
|
1364
1369
|
});
|
|
1365
|
-
function
|
|
1366
|
-
|
|
1370
|
+
function g() {
|
|
1371
|
+
A.schemas = N(s.schemas), h(A.schemas[0]), w.push(A.schemas, "初始化撤销功能");
|
|
1367
1372
|
}
|
|
1368
|
-
async function
|
|
1369
|
-
|
|
1373
|
+
async function h(y = A.schemas[0]) {
|
|
1374
|
+
S.checkedNode = y, S.matched = Le(A.schemas, y.id);
|
|
1370
1375
|
}
|
|
1371
|
-
async function
|
|
1372
|
-
var
|
|
1373
|
-
if (!
|
|
1374
|
-
return
|
|
1375
|
-
if ((
|
|
1376
|
+
async function x(y = null) {
|
|
1377
|
+
var i;
|
|
1378
|
+
if (!y || S.disableHover)
|
|
1379
|
+
return S.hoverNode = null, !1;
|
|
1380
|
+
if ((y == null ? void 0 : y.id) === ((i = S.hoverNode) == null ? void 0 : i.id))
|
|
1376
1381
|
return !1;
|
|
1377
|
-
|
|
1382
|
+
S.hoverNode = y;
|
|
1378
1383
|
}
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1381
|
-
|
|
1384
|
+
function V() {
|
|
1385
|
+
te(() => {
|
|
1386
|
+
p("ready", { pageManager: u });
|
|
1382
1387
|
});
|
|
1383
1388
|
}
|
|
1384
|
-
async function
|
|
1385
|
-
|
|
1389
|
+
async function B(y = !1) {
|
|
1390
|
+
S.disableHover = y;
|
|
1386
1391
|
}
|
|
1387
|
-
function
|
|
1388
|
-
J(
|
|
1392
|
+
function q(y) {
|
|
1393
|
+
J(A, N(y));
|
|
1389
1394
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return
|
|
1395
|
+
function re() {
|
|
1396
|
+
return Se(A);
|
|
1392
1397
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1398
|
+
function se() {
|
|
1399
|
+
Ie(A.schemas, s.schemas) && A.script === s.script || (J(A.schemas, s.schemas), A.script = s.script, h(A.schemas[0]), w.push(A.schemas, "重置操作"), p("reset", A));
|
|
1395
1400
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1401
|
+
function fe() {
|
|
1402
|
+
p("save", Se(A));
|
|
1398
1403
|
}
|
|
1399
|
-
function
|
|
1400
|
-
|
|
1404
|
+
function Z(y) {
|
|
1405
|
+
p("toggleDeviceMode", y);
|
|
1401
1406
|
}
|
|
1402
|
-
function
|
|
1403
|
-
console.log("%c [ ]-385", "font-size:13px; background:pink; color:#bf2c9f;", f),
|
|
1407
|
+
function le() {
|
|
1408
|
+
console.log("%c [ ]-385", "font-size:13px; background:pink; color:#bf2c9f;", f), v.value.handleOpen();
|
|
1404
1409
|
}
|
|
1405
|
-
return
|
|
1406
|
-
revoke:
|
|
1407
|
-
setData:
|
|
1408
|
-
getData:
|
|
1409
|
-
reset:
|
|
1410
|
-
preview:
|
|
1411
|
-
}), (
|
|
1410
|
+
return g(), a({
|
|
1411
|
+
revoke: w,
|
|
1412
|
+
setData: q,
|
|
1413
|
+
getData: re,
|
|
1414
|
+
reset: se,
|
|
1415
|
+
preview: le
|
|
1416
|
+
}), (y, i) => _(F).initialized.value ? (M(), z(ke, {
|
|
1412
1417
|
key: 1,
|
|
1413
|
-
onResolve:
|
|
1418
|
+
onResolve: V
|
|
1414
1419
|
}, {
|
|
1415
1420
|
default: P(() => [
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
R(
|
|
1419
|
-
f.hiddenHeader ?
|
|
1421
|
+
L("div", Dt, [
|
|
1422
|
+
L("div", kt, [
|
|
1423
|
+
R(y.$slots, "header", {}, () => [
|
|
1424
|
+
f.hiddenHeader ? De("", !0) : (M(), z(_(o), {
|
|
1420
1425
|
key: 0,
|
|
1421
|
-
onPreview:
|
|
1422
|
-
onSave:
|
|
1426
|
+
onPreview: le,
|
|
1427
|
+
onSave: fe
|
|
1423
1428
|
}, {
|
|
1424
1429
|
header: P(() => [
|
|
1425
|
-
R(
|
|
1430
|
+
R(y.$slots, "header-prefix")
|
|
1426
1431
|
]),
|
|
1427
1432
|
prefix: P(() => [
|
|
1428
|
-
R(
|
|
1433
|
+
R(y.$slots, "header-prefix")
|
|
1429
1434
|
]),
|
|
1430
1435
|
title: P(() => [
|
|
1431
|
-
R(
|
|
1436
|
+
R(y.$slots, "header-title")
|
|
1432
1437
|
]),
|
|
1433
1438
|
"right-prefix": P(() => [
|
|
1434
|
-
R(
|
|
1439
|
+
R(y.$slots, "header-right-prefix")
|
|
1435
1440
|
]),
|
|
1436
1441
|
"right-action": P(() => [
|
|
1437
|
-
R(
|
|
1442
|
+
R(y.$slots, "header-right-action")
|
|
1438
1443
|
]),
|
|
1439
1444
|
"right-suffix": P(() => [
|
|
1440
|
-
R(
|
|
1445
|
+
R(y.$slots, "header-right-suffix")
|
|
1441
1446
|
]),
|
|
1442
1447
|
_: 3
|
|
1443
1448
|
}))
|
|
1444
1449
|
])
|
|
1445
1450
|
]),
|
|
1446
|
-
|
|
1447
|
-
class: Te(["epic-split-view-container", { "hidden-header":
|
|
1451
|
+
L("div", {
|
|
1452
|
+
class: Te(["epic-split-view-container", { "hidden-header": y.hiddenHeader }])
|
|
1448
1453
|
}, [
|
|
1449
1454
|
T(_(t)),
|
|
1450
1455
|
T(_(r)),
|
|
@@ -1452,20 +1457,20 @@ defineExpose({
|
|
|
1452
1457
|
], 2),
|
|
1453
1458
|
T(St, {
|
|
1454
1459
|
ref_key: "previewRef",
|
|
1455
|
-
ref:
|
|
1460
|
+
ref: v
|
|
1456
1461
|
}, null, 512)
|
|
1457
1462
|
])
|
|
1458
1463
|
]),
|
|
1459
1464
|
fallback: P(() => [
|
|
1460
|
-
|
|
1465
|
+
L("div", It, [
|
|
1461
1466
|
T(_(c))
|
|
1462
1467
|
])
|
|
1463
1468
|
]),
|
|
1464
1469
|
_: 3
|
|
1465
|
-
})) : (M(),
|
|
1470
|
+
})) : (M(), ye("div", At));
|
|
1466
1471
|
}
|
|
1467
1472
|
}), Et = {
|
|
1468
|
-
component: async () => await import("./index-
|
|
1473
|
+
component: async () => await import("./index-Cn31n9Ni.js"),
|
|
1469
1474
|
defaultSchema: {
|
|
1470
1475
|
label: "代码编辑器",
|
|
1471
1476
|
type: "monacoEditor",
|
|
@@ -1515,16 +1520,16 @@ defineExpose({
|
|
|
1515
1520
|
}
|
|
1516
1521
|
};
|
|
1517
1522
|
function Ct(e) {
|
|
1518
|
-
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-
|
|
1523
|
+
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-Z9miUEWt.js")), e.component("EActionEditor", async () => await import("./index-D38KoL_8.js")), e.component("ERuleEditor", async () => await import("./index-LveNbnCD.js")), e.component("EOptionsEditor", async () => await import("./index-DJ9FhHey.js")), e.component("ENode", async () => await import("./index-Cy_xP_CE.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
|
|
1519
1524
|
id: "component_view",
|
|
1520
1525
|
title: "组件",
|
|
1521
1526
|
icon: "icon--epic--extension-outline",
|
|
1522
|
-
component: async () => await import("./index-
|
|
1527
|
+
component: async () => await import("./index-CqegmH7K.js")
|
|
1523
1528
|
}), e.registerActivitybar({
|
|
1524
1529
|
id: "sound_code_view",
|
|
1525
1530
|
title: "源码",
|
|
1526
1531
|
icon: "icon--epic--sdk-outline-rounded",
|
|
1527
|
-
component: async () => await import("./index-
|
|
1532
|
+
component: async () => await import("./index-CBD1g29V.js")
|
|
1528
1533
|
}), e.registerActivitybar({
|
|
1529
1534
|
id: "outline_view",
|
|
1530
1535
|
title: "大纲",
|
|
@@ -1533,15 +1538,15 @@ function Ct(e) {
|
|
|
1533
1538
|
}), e.registerRightSidebar({
|
|
1534
1539
|
id: "attribute_view",
|
|
1535
1540
|
title: "属性",
|
|
1536
|
-
component: async () => await import("./attributeView-
|
|
1541
|
+
component: async () => await import("./attributeView-B9F_UkWB.js")
|
|
1537
1542
|
}), e.registerRightSidebar({
|
|
1538
1543
|
id: "style_view",
|
|
1539
1544
|
title: "样式",
|
|
1540
|
-
component: async () => await import("./styleView-
|
|
1545
|
+
component: async () => await import("./styleView-B_GTo5jT.js")
|
|
1541
1546
|
}), e.registerRightSidebar({
|
|
1542
1547
|
id: "event_view",
|
|
1543
1548
|
title: "事件",
|
|
1544
|
-
component: async () => await import("./eventView-
|
|
1549
|
+
component: async () => await import("./eventView-B17FncUM.js")
|
|
1545
1550
|
}), [Et, xt].forEach((n) => {
|
|
1546
1551
|
e.registerComponent(n);
|
|
1547
1552
|
});
|
|
@@ -1552,7 +1557,7 @@ export {
|
|
|
1552
1557
|
oe as B,
|
|
1553
1558
|
We as C,
|
|
1554
1559
|
ne as D,
|
|
1555
|
-
|
|
1560
|
+
ze as E,
|
|
1556
1561
|
gt as F,
|
|
1557
1562
|
mt as G,
|
|
1558
1563
|
ht as H,
|
|
@@ -1568,20 +1573,20 @@ export {
|
|
|
1568
1573
|
Tt as h,
|
|
1569
1574
|
Wt as i,
|
|
1570
1575
|
Bt as j,
|
|
1571
|
-
|
|
1576
|
+
ce as k,
|
|
1572
1577
|
Rt as l,
|
|
1573
1578
|
N as m,
|
|
1574
|
-
|
|
1575
|
-
|
|
1579
|
+
zt as n,
|
|
1580
|
+
Ie as o,
|
|
1576
1581
|
Vt as p,
|
|
1577
|
-
|
|
1582
|
+
Lt as q,
|
|
1578
1583
|
Xe as r,
|
|
1579
1584
|
Ft as s,
|
|
1580
1585
|
Kt as t,
|
|
1581
|
-
|
|
1582
|
-
|
|
1586
|
+
de as u,
|
|
1587
|
+
Ee as v,
|
|
1583
1588
|
Ut as w,
|
|
1584
1589
|
He as x,
|
|
1585
|
-
|
|
1590
|
+
Le as y,
|
|
1586
1591
|
Mt as z
|
|
1587
1592
|
};
|