epic-designer-gold 0.0.22 → 0.0.23
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-B8JS7SiW.cjs → attributeView-8NOrqlS1.cjs} +1 -1
- package/dist/{attributeView-oIH3-2FN.js → attributeView-BHuhrlM5.js} +8 -8
- package/dist/{index-nhr7ps1e.js → index-8kRf0Tni.js} +1 -1
- package/dist/index-9bx0Eg0-.cjs +1 -0
- package/dist/index-BHkCN6Gc.cjs +1 -0
- package/dist/{index-CrGWYheb.js → index-BcAPkz_3.js} +1 -1
- package/dist/{index-DskzasEn.js → index-BcRau_iO.js} +74 -74
- package/dist/{index-rby8nugJ.cjs → index-BfV0-xlv.cjs} +1 -1
- package/dist/index-BfWxzrQ0.js +675 -0
- package/dist/{index-DitKpeDV.cjs → index-BqP4q7kG.cjs} +1 -1
- package/dist/{index-BUkdmwKe.cjs → index-CI-wApqh.cjs} +2 -2
- package/dist/{index-C5yhSYKA.js → index-CNRYixnW.js} +198 -212
- package/dist/{index-CwXlSYIH.cjs → index-CtqoFTv7.cjs} +1 -1
- package/dist/{index-Bts_xVeS.cjs → index-DAQnePGW.cjs} +1 -1
- package/dist/{index-DiMAGPRY.js → index-DLXCQOpE.js} +1 -1
- package/dist/index-DMO6svHk.js +4 -0
- package/dist/{index-Bwmb5sha.cjs → index-DPQrSg6e.cjs} +1 -1
- package/dist/index-DzGESDFj.cjs +1 -0
- package/dist/{index-C5XNe5wE.js → index-R1sGzPDh.js} +1 -1
- package/dist/index-zFyk0fsI.js +665 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleView-BDUqyY8T.cjs → styleView-DevMh4gy.cjs} +1 -1
- package/dist/{styleView-CtfATcTc.js → styleView-Dq9MseMf.js} +1 -1
- package/package.json +1 -1
- package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +0 -2
- package/dist/core/components/designer/src/modules/sourceCode/index.vue.d.ts +0 -2
- package/dist/eventView-BL4A2PVd.cjs +0 -1
- package/dist/eventView-Ed_9JLnx.js +0 -64
- package/dist/index-05ByfwQb.js +0 -432
- package/dist/index-Bt6BXCcr.cjs +0 -1
- package/dist/index-CjrdkSiN.js +0 -682
- package/dist/index-CqdmlJ1d.cjs +0 -1
- package/dist/index-DWW8LGvj.js +0 -41
- package/dist/index-DZIjd60A.js +0 -4
- package/dist/index-D_CH15dJ.cjs +0 -1
- package/dist/index-GJSr_nl7.cjs +0 -1
- package/dist/outline-CJSEUbgc.cjs +0 -1
- package/dist/outline-yy4pIEi3.js +0 -54
- package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js +0 -242
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as S, reactive as Z, defineComponent as G, openBlock as
|
|
2
|
-
import { p as
|
|
1
|
+
import { ref as S, reactive as Z, defineComponent as G, openBlock as F, createBlock as L, unref as x, mergeProps as me, withCtx as P, renderSlot as R, getCurrentInstance as ne, inject as H, watch as V, useAttrs as _e, provide as $, shallowRef as Pe, computed as U, watchEffect as se, onUnmounted as Se, resolveComponent as Ve, resolveDynamicComponent as Me, createVNode as T, createCommentVNode as De, useSlots as Oe, createElementBlock as he, Suspense as Ae, createElementVNode as J, Fragment as Fe, renderList as Re, nextTick as Y, effectScope as $e, isRef as Ne, getCurrentScope as Be, onScopeDispose as Ue, onMounted as ve, normalizeClass as Te, toRaw as we } from "vue";
|
|
2
|
+
import { p as O, a as be, l as q, E as de } from "./axios-ITY6Uw7A.js";
|
|
3
3
|
function le(e = 10) {
|
|
4
4
|
const a = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
5
5
|
let n = "";
|
|
@@ -33,7 +33,7 @@ function Vt(e) {
|
|
|
33
33
|
...n,
|
|
34
34
|
id: `${n.type}_${le(8)}`
|
|
35
35
|
};
|
|
36
|
-
return (o.field || o.input) && !((r = (t =
|
|
36
|
+
return (o.field || o.input) && !((r = (t = O.getComponentConfingByType(o.type)) == null ? void 0 : t.editConstraints) != null && r.fixedField) && (o.field = o.id), o;
|
|
37
37
|
});
|
|
38
38
|
return a;
|
|
39
39
|
}
|
|
@@ -55,8 +55,8 @@ function Ee(e, a, n = [], o = /* @__PURE__ */ new WeakMap()) {
|
|
|
55
55
|
return "[Circular]";
|
|
56
56
|
o.set(r, !0);
|
|
57
57
|
const l = Object.keys(r).sort(), i = {};
|
|
58
|
-
return l.forEach((
|
|
59
|
-
n.includes(
|
|
58
|
+
return l.forEach((u) => {
|
|
59
|
+
n.includes(u) || (i[u] = t(r[u]));
|
|
60
60
|
}), o.delete(r), i;
|
|
61
61
|
} else
|
|
62
62
|
return r;
|
|
@@ -78,7 +78,7 @@ function Je(e, a) {
|
|
|
78
78
|
}
|
|
79
79
|
return e.forEach(t), o || console.error(`没有查询到id为${a}的节点`), n;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function Mt(e, a, n) {
|
|
82
82
|
const o = a.split(".");
|
|
83
83
|
let t = e;
|
|
84
84
|
for (let r = 0; r < o.length; r++) {
|
|
@@ -88,7 +88,7 @@ function Ot(e, a, n) {
|
|
|
88
88
|
}
|
|
89
89
|
return t === void 0 ? n : t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Ot(e, a, n) {
|
|
92
92
|
const o = a.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
93
93
|
let t = e;
|
|
94
94
|
for (let r = 0; r < o.length - 1; r++) {
|
|
@@ -97,7 +97,7 @@ function Ft(e, a, n) {
|
|
|
97
97
|
}
|
|
98
98
|
return t[o[o.length - 1]] = n, e;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Ft(e, a = "default") {
|
|
101
101
|
return ze(e, a).map((o) => o.field);
|
|
102
102
|
}
|
|
103
103
|
function ze(e, a = "default") {
|
|
@@ -221,7 +221,7 @@ function Nt(e) {
|
|
|
221
221
|
}
|
|
222
222
|
function ee(e, a) {
|
|
223
223
|
return e.map((n) => {
|
|
224
|
-
var
|
|
224
|
+
var u, w, h;
|
|
225
225
|
let o = n.type ?? "";
|
|
226
226
|
const t = n.options ?? {}, r = (s, y) => {
|
|
227
227
|
o === s && (o = y, t.defaultValue && (t.defaultValue = JSON.parse(t.defaultValue)));
|
|
@@ -255,7 +255,7 @@ function ee(e, a) {
|
|
|
255
255
|
"color-picker",
|
|
256
256
|
"upload-file",
|
|
257
257
|
"upload-image"
|
|
258
|
-
].includes(o) && (l.input = !0, ((w = (
|
|
258
|
+
].includes(o) && (l.input = !0, ((w = (u = n.rules) == null ? void 0 : u[0]) == null ? void 0 : w.required) === !1 && n.rules.shift(), ((h = n.rules) == null ? void 0 : h.length) > 0 && (l.rules = n.rules)), n.list && (l.children = ee(n.list, n)), n.columns && (l.children = ee(n.columns, n)), n.trs && (l.children = ee(n.trs, n)), n.tds && (l.children = ee(n.tds, n)), l;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
function Bt(e, a) {
|
|
@@ -277,9 +277,9 @@ function Ie() {
|
|
|
277
277
|
function i(m) {
|
|
278
278
|
delete e.value[m];
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const v = Object.entries(
|
|
282
|
-
(E, [
|
|
280
|
+
function u(m, g = !1) {
|
|
281
|
+
const v = Object.entries(O.publicMethods).reduce(
|
|
282
|
+
(E, [M, B]) => (E[M] = B.handler, E),
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
285
|
try {
|
|
@@ -289,7 +289,7 @@ function Ie() {
|
|
|
289
289
|
find: r,
|
|
290
290
|
defineExpose: w,
|
|
291
291
|
publicMethods: v,
|
|
292
|
-
pluginManager:
|
|
292
|
+
pluginManager: O
|
|
293
293
|
})();
|
|
294
294
|
} catch (E) {
|
|
295
295
|
g && console.error("[epic:自定义函数]异常:", E);
|
|
@@ -324,7 +324,7 @@ function Ie() {
|
|
|
324
324
|
function s(m, g) {
|
|
325
325
|
var v;
|
|
326
326
|
try {
|
|
327
|
-
(v =
|
|
327
|
+
(v = O.publicMethods[m.methodName]) == null || v.handler(...g);
|
|
328
328
|
} catch (E) {
|
|
329
329
|
console.error(`[Epic:公共函数(${m.methodName})]执行异常:`, E);
|
|
330
330
|
}
|
|
@@ -333,8 +333,8 @@ function Ie() {
|
|
|
333
333
|
var v, E;
|
|
334
334
|
try {
|
|
335
335
|
(E = (v = a.value)[m.methodName]) == null || E.call(v, ...g);
|
|
336
|
-
} catch (
|
|
337
|
-
console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`,
|
|
336
|
+
} catch (M) {
|
|
337
|
+
console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`, M);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
function d(m, g) {
|
|
@@ -352,11 +352,11 @@ function Ie() {
|
|
|
352
352
|
function f(m = !0) {
|
|
353
353
|
n.value = m;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function c(m) {
|
|
356
356
|
const g = te(m, () => !0);
|
|
357
357
|
o.value = g.map((v) => v.id);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function D(m, g = "default") {
|
|
360
360
|
if (t[g]) {
|
|
361
361
|
const v = t[g];
|
|
362
362
|
z(m, v);
|
|
@@ -376,40 +376,40 @@ function Ie() {
|
|
|
376
376
|
isDesignMode: n,
|
|
377
377
|
defaultComponentIds: o,
|
|
378
378
|
forms: t,
|
|
379
|
-
addFormData:
|
|
379
|
+
addFormData: D,
|
|
380
380
|
setFormData: C,
|
|
381
381
|
getComponentInstance: r,
|
|
382
382
|
// 简化查询函数, 推荐使用
|
|
383
383
|
find: r,
|
|
384
384
|
addComponentInstance: l,
|
|
385
385
|
removeComponentInstance: i,
|
|
386
|
-
setMethods:
|
|
386
|
+
setMethods: u,
|
|
387
387
|
doActions: h,
|
|
388
388
|
setDesignMode: f,
|
|
389
|
-
setDefaultComponentIds:
|
|
389
|
+
setDefaultComponentIds: c
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function He() {
|
|
393
393
|
const e = S([]), a = S([]), n = S(null);
|
|
394
394
|
let o = 0;
|
|
395
|
-
function t(
|
|
395
|
+
function t(u, w = "插入组件") {
|
|
396
396
|
const h = Date.now();
|
|
397
397
|
o + 150 > h || (o = h, n.value != null && (e.value.push(n.value), a.value.splice(0, a.value.length)), n.value = {
|
|
398
398
|
type: w,
|
|
399
|
-
componentSchema: JSON.stringify(
|
|
399
|
+
componentSchema: JSON.stringify(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 i() {
|
|
415
415
|
e.value = [], a.value = [], n.value = null;
|
|
@@ -432,10 +432,10 @@ const Ke = /* @__PURE__ */ G({
|
|
|
432
432
|
},
|
|
433
433
|
emits: ["updateFormItemRef"],
|
|
434
434
|
setup(e, { emit: a }) {
|
|
435
|
-
const n =
|
|
435
|
+
const n = O.getComponent("form-item"), o = e, t = a, r = S(), l = () => {
|
|
436
436
|
t("updateFormItemRef", r.value);
|
|
437
437
|
};
|
|
438
|
-
return (i,
|
|
438
|
+
return (i, u) => o.hasFormItem ? (F(), L(x(n), me({
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "formItemRef",
|
|
441
441
|
ref: r,
|
|
@@ -463,12 +463,12 @@ const Ke = /* @__PURE__ */ G({
|
|
|
463
463
|
setup(e, { emit: a }) {
|
|
464
464
|
const { proxy: n } = ne(), o = e, t = S(null);
|
|
465
465
|
let r = H("formData", Z({}));
|
|
466
|
-
const l = H("slots", {}), i = H("pageManager", {}),
|
|
466
|
+
const l = H("slots", {}), i = H("pageManager", {}), u = H("disabled", { value: !1 }), w = H("ruleFieldPrefix", null), h = H("resetFormData", !1);
|
|
467
467
|
let s = Z(N(o.componentSchema));
|
|
468
468
|
f();
|
|
469
469
|
async function y(p) {
|
|
470
470
|
if (["cascader", "checkbox", "select", "radio"].includes(p.type) && p.componentProps.dynamicId && o.sourceDateUrl) {
|
|
471
|
-
const
|
|
471
|
+
const A = (await be({
|
|
472
472
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
473
473
|
url: o.sourceDateUrl,
|
|
474
474
|
method: "get",
|
|
@@ -477,22 +477,22 @@ const Ke = /* @__PURE__ */ G({
|
|
|
477
477
|
}
|
|
478
478
|
})).data.data;
|
|
479
479
|
let k = await be({
|
|
480
|
-
url:
|
|
481
|
-
method:
|
|
482
|
-
data: JSON.parse(
|
|
483
|
-
params: JSON.parse(
|
|
484
|
-
headers: JSON.parse(
|
|
480
|
+
url: A.url,
|
|
481
|
+
method: A.method,
|
|
482
|
+
data: JSON.parse(A.body),
|
|
483
|
+
params: JSON.parse(A.params),
|
|
484
|
+
headers: JSON.parse(A.headers)
|
|
485
485
|
});
|
|
486
|
-
if (
|
|
487
|
-
const Ce =
|
|
486
|
+
if (A && (A != null && A.dataPath)) {
|
|
487
|
+
const Ce = A.dataPath.split(".").reduce((re, xe) => re[xe], k.data);
|
|
488
488
|
p.componentProps.options = d(Ce).map((re) => ({
|
|
489
|
-
label: re[
|
|
490
|
-
value: re[
|
|
489
|
+
label: re[A.dataKey],
|
|
490
|
+
value: re[A.dataValue]
|
|
491
491
|
}));
|
|
492
492
|
} else
|
|
493
493
|
p.componentProps.options = d(k.data).map((j) => ({
|
|
494
|
-
label: j[
|
|
495
|
-
value: j[
|
|
494
|
+
label: j[A.dataKey],
|
|
495
|
+
value: j[A.dataValue]
|
|
496
496
|
}));
|
|
497
497
|
return p;
|
|
498
498
|
}
|
|
@@ -514,42 +514,42 @@ const Ke = /* @__PURE__ */ G({
|
|
|
514
514
|
i.isDesignMode.value && typeof s.field == "string" && (s.field += "-design-mode");
|
|
515
515
|
}
|
|
516
516
|
(o.resetFormData || h) && (r = {});
|
|
517
|
-
const
|
|
517
|
+
const c = a, D = S(), C = S(), m = (p) => {
|
|
518
518
|
C.value = p;
|
|
519
|
-
}, g =
|
|
519
|
+
}, g = _e();
|
|
520
520
|
Object.keys(g).length && $("nodeAttrs", g);
|
|
521
521
|
const v = Pe(null), E = U(() => {
|
|
522
522
|
var p, I;
|
|
523
523
|
return (p = s.componentProps) != null && p.hidden ? !1 : typeof s.show == "boolean" ? s.show : ((I = s.show) == null ? void 0 : I.call(s, { values: r })) ?? !0;
|
|
524
|
-
}),
|
|
525
|
-
var
|
|
526
|
-
const p = E.value && ((
|
|
524
|
+
}), M = U(() => {
|
|
525
|
+
var A;
|
|
526
|
+
const p = E.value && ((A = s.rules) == null ? void 0 : A.map((k) => ({
|
|
527
527
|
...k,
|
|
528
528
|
validator: k.validator && i.funcs.value[k.validator]
|
|
529
529
|
// 自定义校验函数
|
|
530
530
|
})));
|
|
531
531
|
let I = s.field;
|
|
532
532
|
o.ruleField ? I = o.ruleField : w && s.field && (I = N(w), I.push(s.field));
|
|
533
|
-
const
|
|
533
|
+
const _ = {
|
|
534
534
|
...s,
|
|
535
535
|
rules: p,
|
|
536
536
|
rule: p,
|
|
537
537
|
field: I
|
|
538
538
|
};
|
|
539
|
-
return
|
|
539
|
+
return _.children && delete _.children, _;
|
|
540
540
|
}), B = U(() => {
|
|
541
|
-
var
|
|
542
|
-
const p = ((
|
|
541
|
+
var _, A;
|
|
542
|
+
const p = ((_ = W.value) == null ? void 0 : _.bindModel) ?? "modelValue", I = {};
|
|
543
543
|
return s.on && Object.keys(s.on).forEach((k) => {
|
|
544
544
|
I[`on${Le(k)}`] = (...j) => i.doActions(s.on[k], ...j);
|
|
545
545
|
}), {
|
|
546
546
|
...o,
|
|
547
547
|
...s.componentProps,
|
|
548
|
-
disabled: (
|
|
548
|
+
disabled: (u == null ? void 0 : u.value) || ((A = s.componentProps) == null ? void 0 : A.disabled),
|
|
549
549
|
bindModel: p,
|
|
550
550
|
...I
|
|
551
551
|
};
|
|
552
|
-
}), W = U(() =>
|
|
552
|
+
}), W = U(() => O.getComponentConfingByType(s.type) ?? null);
|
|
553
553
|
se(() => {
|
|
554
554
|
t.value = o.modelValue ?? r[s.field ?? ""];
|
|
555
555
|
}), V(
|
|
@@ -558,7 +558,7 @@ const Ke = /* @__PURE__ */ G({
|
|
|
558
558
|
t.value !== (o.modelValue ?? r[s.field ?? ""]) && b(t.value);
|
|
559
559
|
}
|
|
560
560
|
), V(
|
|
561
|
-
() =>
|
|
561
|
+
() => D.value,
|
|
562
562
|
() => {
|
|
563
563
|
oe();
|
|
564
564
|
},
|
|
@@ -566,17 +566,17 @@ const Ke = /* @__PURE__ */ G({
|
|
|
566
566
|
);
|
|
567
567
|
function oe() {
|
|
568
568
|
var I;
|
|
569
|
-
const p =
|
|
570
|
-
s.id && p && (s.input && (p.setValue = b, p.getValue = () => r[s.field] || o.modelValue), p.setAttr = (
|
|
569
|
+
const p = D.value || n;
|
|
570
|
+
s.id && p && (s.input && (p.setValue = b, p.getValue = () => r[s.field] || o.modelValue), p.setAttr = (_, A) => (s.componentProps || (s.componentProps = {}), s.componentProps[_] = A), p.getAttr = (_) => s.componentProps[_], i.addComponentInstance(s.id, p), (I = W.value) != null && I.defaultSchema.input && s.noFormItem !== !0 && C.value && i.addComponentInstance(s.id + "formItem", C.value));
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function ce() {
|
|
573
573
|
var p;
|
|
574
574
|
s.id && (i.removeComponentInstance(s.id), (p = W.value) != null && p.defaultSchema.input && s.noFormItem !== !0 && i.removeComponentInstance(s.id + "formItem"));
|
|
575
575
|
}
|
|
576
576
|
async function ae() {
|
|
577
|
-
var I,
|
|
577
|
+
var I, _, A;
|
|
578
578
|
if (s = await y(s), typeof ((I = s.componentProps) == null ? void 0 : I.defaultValue) < "u") {
|
|
579
|
-
const k = i.isDesignMode.value ? (
|
|
579
|
+
const k = i.isDesignMode.value ? (_ = s.componentProps) == null ? void 0 : _.defaultValue : r[s.field] ?? ((A = s.componentProps) == null ? void 0 : A.defaultValue);
|
|
580
580
|
b(N(k));
|
|
581
581
|
}
|
|
582
582
|
if (s.type === "slot") {
|
|
@@ -592,7 +592,7 @@ const Ke = /* @__PURE__ */ G({
|
|
|
592
592
|
});
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
|
-
const p =
|
|
595
|
+
const p = O.getComponent(s.type);
|
|
596
596
|
if (!p) {
|
|
597
597
|
console.error(`组件${s.type}未注册`);
|
|
598
598
|
return;
|
|
@@ -604,10 +604,10 @@ const Ke = /* @__PURE__ */ G({
|
|
|
604
604
|
v.value = p;
|
|
605
605
|
}
|
|
606
606
|
function b(p) {
|
|
607
|
-
|
|
607
|
+
c("update:modelValue", p), c("change", p), s.field && (r[s.field] = p);
|
|
608
608
|
}
|
|
609
609
|
function X(p) {
|
|
610
|
-
|
|
610
|
+
c("update:dynamicId", p);
|
|
611
611
|
}
|
|
612
612
|
let ge = null;
|
|
613
613
|
return V(
|
|
@@ -629,21 +629,21 @@ const Ke = /* @__PURE__ */ G({
|
|
|
629
629
|
immediate: !0,
|
|
630
630
|
deep: !0
|
|
631
631
|
}
|
|
632
|
-
), Se(
|
|
633
|
-
var
|
|
634
|
-
const
|
|
635
|
-
return v.value && E.value ? (
|
|
632
|
+
), Se(ce), (p, I) => {
|
|
633
|
+
var A;
|
|
634
|
+
const _ = Ve("ENode");
|
|
635
|
+
return v.value && E.value ? (F(), L(Ke, {
|
|
636
636
|
key: 0,
|
|
637
|
-
hasFormItem:
|
|
638
|
-
formItemProps:
|
|
637
|
+
hasFormItem: x(s).noFormItem !== !0 && ((A = W.value) == null ? void 0 : A.defaultSchema.input),
|
|
638
|
+
formItemProps: M.value,
|
|
639
639
|
onUpdateFormItemRef: m
|
|
640
640
|
}, {
|
|
641
641
|
default: P(() => [
|
|
642
|
-
(
|
|
642
|
+
(F(), L(Me(v.value), me({
|
|
643
643
|
ref_key: "componentInstance",
|
|
644
|
-
ref:
|
|
644
|
+
ref: D,
|
|
645
645
|
onVnodeMounted: oe,
|
|
646
|
-
model:
|
|
646
|
+
model: x(r)
|
|
647
647
|
}, { ...B.value }, {
|
|
648
648
|
[B.value.bindModel]: t.value,
|
|
649
649
|
["onUpdate:" + B.value.bindModel]: I[0] || (I[0] = (k) => t.value = k),
|
|
@@ -651,7 +651,7 @@ const Ke = /* @__PURE__ */ G({
|
|
|
651
651
|
"onUpdate:dynamicId": X
|
|
652
652
|
}), {
|
|
653
653
|
node: P((k) => [
|
|
654
|
-
T(
|
|
654
|
+
T(_, me(k, {
|
|
655
655
|
sourceDateUrl: o.sourceDateUrl
|
|
656
656
|
}), null, 16, ["sourceDateUrl"])
|
|
657
657
|
]),
|
|
@@ -662,7 +662,7 @@ const Ke = /* @__PURE__ */ G({
|
|
|
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
|
});
|
|
@@ -680,34 +680,34 @@ function Ze() {
|
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
682
|
async function t(d = "default") {
|
|
683
|
-
var
|
|
683
|
+
var c;
|
|
684
684
|
await o();
|
|
685
|
-
const f = (
|
|
685
|
+
const f = (c = n.value) == null ? void 0 : c[d];
|
|
686
686
|
if (!f) throw new Error(`表单 [name=${d}] 不存在`);
|
|
687
687
|
return f;
|
|
688
688
|
}
|
|
689
689
|
async function r(d, f) {
|
|
690
|
-
const
|
|
691
|
-
return N(await f(
|
|
690
|
+
const c = await t(d);
|
|
691
|
+
return N(await f(c));
|
|
692
692
|
}
|
|
693
693
|
async function l(d = "default") {
|
|
694
694
|
return await r(d, (f) => f.getData());
|
|
695
695
|
}
|
|
696
696
|
function i(d, f = "default") {
|
|
697
|
-
var
|
|
697
|
+
var D;
|
|
698
698
|
a.setFormData(d, f);
|
|
699
|
-
const
|
|
700
|
-
|
|
699
|
+
const c = (D = n.value) == null ? void 0 : D[f];
|
|
700
|
+
c == null || c.clearValidate();
|
|
701
701
|
}
|
|
702
|
-
async function
|
|
702
|
+
async function u(d = "default") {
|
|
703
703
|
return await r(d, async (f) => (await f.validate(), await f.getData()));
|
|
704
704
|
}
|
|
705
705
|
async function w(d) {
|
|
706
706
|
await o();
|
|
707
707
|
const f = {};
|
|
708
|
-
for (const
|
|
709
|
-
const
|
|
710
|
-
|
|
708
|
+
for (const c in n.value) {
|
|
709
|
+
const D = n.value[c];
|
|
710
|
+
D && (f[c] = N(await d(D)));
|
|
711
711
|
}
|
|
712
712
|
return f;
|
|
713
713
|
}
|
|
@@ -727,7 +727,7 @@ function Ze() {
|
|
|
727
727
|
forms: n,
|
|
728
728
|
getData: l,
|
|
729
729
|
setData: i,
|
|
730
|
-
validate:
|
|
730
|
+
validate: u,
|
|
731
731
|
getForms: h,
|
|
732
732
|
setForms: s,
|
|
733
733
|
validateAll: y,
|
|
@@ -747,20 +747,20 @@ const Ge = {
|
|
|
747
747
|
},
|
|
748
748
|
emits: ["ready"],
|
|
749
749
|
setup(e, { expose: a, emit: n }) {
|
|
750
|
-
const o = q(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: i, getData:
|
|
750
|
+
const o = q(() => import("./index-DgcFxYFp.js")), t = n, { ready: r, pageManager: l, forms: i, getData: u, setData: w, validate: h, getForms: s, setForms: y, validateAll: d, getFormInstance: f } = Ze(), c = e, D = Z({
|
|
751
751
|
schemas: []
|
|
752
752
|
});
|
|
753
753
|
V(
|
|
754
|
-
() =>
|
|
754
|
+
() => c.pageSchema,
|
|
755
755
|
(v) => {
|
|
756
|
-
z(
|
|
756
|
+
z(D, v);
|
|
757
757
|
},
|
|
758
758
|
{
|
|
759
759
|
immediate: !0,
|
|
760
760
|
deep: !0
|
|
761
761
|
}
|
|
762
762
|
), V(
|
|
763
|
-
() =>
|
|
763
|
+
() => c.formData,
|
|
764
764
|
(v) => {
|
|
765
765
|
v && w(v);
|
|
766
766
|
},
|
|
@@ -769,16 +769,16 @@ const Ge = {
|
|
|
769
769
|
deep: !0
|
|
770
770
|
}
|
|
771
771
|
), V(
|
|
772
|
-
() =>
|
|
772
|
+
() => D.script,
|
|
773
773
|
(v) => {
|
|
774
774
|
v && l.setMethods(v, !0);
|
|
775
775
|
},
|
|
776
776
|
{
|
|
777
777
|
immediate: !0
|
|
778
778
|
}
|
|
779
|
-
), $("slots",
|
|
779
|
+
), $("slots", Oe()), $("pageManager", l), $("forms", i), $("pageSchema", D), $(
|
|
780
780
|
"disabled",
|
|
781
|
-
U(() =>
|
|
781
|
+
U(() => c.disabled)
|
|
782
782
|
);
|
|
783
783
|
const C = ne(), m = C == null ? void 0 : C.proxy;
|
|
784
784
|
function g() {
|
|
@@ -789,33 +789,33 @@ const Ge = {
|
|
|
789
789
|
return a({
|
|
790
790
|
ready: r,
|
|
791
791
|
pageManager: l,
|
|
792
|
-
getData:
|
|
792
|
+
getData: u,
|
|
793
793
|
setData: w,
|
|
794
794
|
validate: h,
|
|
795
795
|
getForms: s,
|
|
796
796
|
setForms: y,
|
|
797
797
|
validateAll: d,
|
|
798
798
|
getFormInstance: f
|
|
799
|
-
}), (v, E) =>
|
|
799
|
+
}), (v, E) => x(O).initialized.value ? (F(), L(Ae, {
|
|
800
800
|
key: 1,
|
|
801
801
|
onResolve: g
|
|
802
802
|
}, {
|
|
803
803
|
default: P(() => [
|
|
804
804
|
J("div", Qe, [
|
|
805
|
-
(
|
|
805
|
+
(F(!0), he(Fe, null, Re(D.schemas, (M, B) => (F(), L(x(qe), {
|
|
806
806
|
key: B,
|
|
807
|
-
sourceDateUrl:
|
|
808
|
-
componentSchema:
|
|
807
|
+
sourceDateUrl: c.sourceDateUrl,
|
|
808
|
+
componentSchema: M
|
|
809
809
|
}, null, 8, ["sourceDateUrl", "componentSchema"]))), 128))
|
|
810
810
|
])
|
|
811
811
|
]),
|
|
812
812
|
fallback: P(() => [
|
|
813
813
|
J("div", Ye, [
|
|
814
|
-
T(
|
|
814
|
+
T(x(o))
|
|
815
815
|
])
|
|
816
816
|
]),
|
|
817
817
|
_: 1
|
|
818
|
-
})) : (
|
|
818
|
+
})) : (F(), he("div", Ge));
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
821
|
function ye(e) {
|
|
@@ -829,7 +829,7 @@ function je(e) {
|
|
|
829
829
|
return (...r) => (a += 1, o || (o = $e(!0), n = o.run(() => e(...r))), ye(t), n);
|
|
830
830
|
}
|
|
831
831
|
function Q(e) {
|
|
832
|
-
return typeof e == "function" ? e() :
|
|
832
|
+
return typeof e == "function" ? e() : x(e);
|
|
833
833
|
}
|
|
834
834
|
const et = typeof window < "u" && typeof document < "u";
|
|
835
835
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -850,8 +850,8 @@ function lt(e = !1, a = {}) {
|
|
|
850
850
|
if (arguments.length)
|
|
851
851
|
return r.value = i, r.value;
|
|
852
852
|
{
|
|
853
|
-
const
|
|
854
|
-
return r.value = r.value ===
|
|
853
|
+
const u = Q(n);
|
|
854
|
+
return r.value = r.value === u ? Q(o) : u, r.value;
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
return t ? l : [r, l];
|
|
@@ -873,7 +873,7 @@ function it(...e) {
|
|
|
873
873
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
874
874
|
const r = [], l = () => {
|
|
875
875
|
r.forEach((h) => h()), r.length = 0;
|
|
876
|
-
}, i = (h, s, y, d) => (h.addEventListener(s, y, d), () => h.removeEventListener(s, y, d)),
|
|
876
|
+
}, i = (h, s, y, d) => (h.addEventListener(s, y, d), () => h.removeEventListener(s, y, d)), u = V(
|
|
877
877
|
() => [K(a), Q(t)],
|
|
878
878
|
([h, s]) => {
|
|
879
879
|
if (l(), !h)
|
|
@@ -885,11 +885,11 @@ function it(...e) {
|
|
|
885
885
|
},
|
|
886
886
|
{ immediate: !0, flush: "post" }
|
|
887
887
|
), w = () => {
|
|
888
|
-
|
|
888
|
+
u(), l();
|
|
889
889
|
};
|
|
890
890
|
return ye(w), w;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function ut(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
895
|
function ke(...e) {
|
|
@@ -900,9 +900,9 @@ function ke(...e) {
|
|
|
900
900
|
eventName: r = "keydown",
|
|
901
901
|
passive: l = !1,
|
|
902
902
|
dedupe: i = !1
|
|
903
|
-
} = o,
|
|
903
|
+
} = o, u = ut(a);
|
|
904
904
|
return it(t, r, (h) => {
|
|
905
|
-
h.repeat && Q(i) ||
|
|
905
|
+
h.repeat && Q(i) || u(h) && n(h);
|
|
906
906
|
}, l);
|
|
907
907
|
}
|
|
908
908
|
function fe(e, a, n = {}) {
|
|
@@ -911,14 +911,14 @@ function fe(e, a, n = {}) {
|
|
|
911
911
|
function pe(e, a, n = {}) {
|
|
912
912
|
return ke(e, a, { ...n, eventName: "keyup" });
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function ct() {
|
|
915
915
|
const e = S(!1), a = ne();
|
|
916
916
|
return a && ve(() => {
|
|
917
917
|
e.value = !0;
|
|
918
918
|
}, a), e;
|
|
919
919
|
}
|
|
920
920
|
function dt(e) {
|
|
921
|
-
const a =
|
|
921
|
+
const a = ct();
|
|
922
922
|
return U(() => (a.value, !!e()));
|
|
923
923
|
}
|
|
924
924
|
function ft(e) {
|
|
@@ -929,11 +929,11 @@ function pt(e, a, n = {}) {
|
|
|
929
929
|
let r;
|
|
930
930
|
const l = dt(() => o && "ResizeObserver" in o), i = () => {
|
|
931
931
|
r && (r.disconnect(), r = void 0);
|
|
932
|
-
},
|
|
932
|
+
}, u = U(() => {
|
|
933
933
|
const s = Q(e);
|
|
934
934
|
return Array.isArray(s) ? s.map((y) => K(y)) : [K(s)];
|
|
935
935
|
}), w = V(
|
|
936
|
-
|
|
936
|
+
u,
|
|
937
937
|
(s) => {
|
|
938
938
|
if (i(), l.value && o) {
|
|
939
939
|
r = new ResizeObserver(a);
|
|
@@ -954,7 +954,7 @@ function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
|
954
954
|
const { window: o = ie, box: t = "content-box" } = n, r = U(() => {
|
|
955
955
|
var s, y;
|
|
956
956
|
return (y = (s = K(e)) == null ? void 0 : s.namespaceURI) == null ? void 0 : y.includes("svg");
|
|
957
|
-
}), l = S(a.width), i = S(a.height), { stop:
|
|
957
|
+
}), l = S(a.width), i = S(a.height), { stop: u } = pt(
|
|
958
958
|
e,
|
|
959
959
|
([s]) => {
|
|
960
960
|
const y = t === "border-box" ? s.borderBoxSize : t === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
@@ -966,7 +966,7 @@ function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
|
966
966
|
}
|
|
967
967
|
} else if (y) {
|
|
968
968
|
const d = Array.isArray(y) ? y : [y];
|
|
969
|
-
l.value = d.reduce((f, { inlineSize:
|
|
969
|
+
l.value = d.reduce((f, { inlineSize: c }) => f + c, 0), i.value = d.reduce((f, { blockSize: c }) => f + c, 0);
|
|
970
970
|
} else
|
|
971
971
|
l.value = s.contentRect.width, i.value = s.contentRect.height;
|
|
972
972
|
},
|
|
@@ -983,7 +983,7 @@ function Tt(e, a = { width: 0, height: 0 }, n = {}) {
|
|
|
983
983
|
}
|
|
984
984
|
);
|
|
985
985
|
function h() {
|
|
986
|
-
|
|
986
|
+
u(), w();
|
|
987
987
|
}
|
|
988
988
|
return {
|
|
989
989
|
width: l,
|
|
@@ -995,29 +995,29 @@ function Lt(e, a, n, o = {}) {
|
|
|
995
995
|
var t, r, l;
|
|
996
996
|
const {
|
|
997
997
|
clone: i = !1,
|
|
998
|
-
passive:
|
|
998
|
+
passive: u = !1,
|
|
999
999
|
eventName: w,
|
|
1000
1000
|
deep: h = !1,
|
|
1001
1001
|
defaultValue: s,
|
|
1002
1002
|
shouldEmit: y
|
|
1003
1003
|
} = o, d = ne(), f = n || (d == null ? void 0 : d.emit) || ((t = d == null ? void 0 : d.$emit) == null ? void 0 : t.bind(d)) || ((l = (r = d == null ? void 0 : d.proxy) == null ? void 0 : r.$emit) == null ? void 0 : l.bind(d == null ? void 0 : d.proxy));
|
|
1004
|
-
let
|
|
1005
|
-
a || (a = "modelValue"),
|
|
1006
|
-
const
|
|
1007
|
-
y ? y(g) && f(
|
|
1004
|
+
let c = w;
|
|
1005
|
+
a || (a = "modelValue"), c = c || `update:${a.toString()}`;
|
|
1006
|
+
const D = (g) => i ? typeof i == "function" ? i(g) : ft(g) : g, C = () => tt(e[a]) ? D(e[a]) : s, m = (g) => {
|
|
1007
|
+
y ? y(g) && f(c, g) : f(c, g);
|
|
1008
1008
|
};
|
|
1009
|
-
if (
|
|
1009
|
+
if (u) {
|
|
1010
1010
|
const g = C(), v = S(g);
|
|
1011
1011
|
let E = !1;
|
|
1012
1012
|
return V(
|
|
1013
1013
|
() => e[a],
|
|
1014
|
-
(
|
|
1015
|
-
E || (E = !0, v.value =
|
|
1014
|
+
(M) => {
|
|
1015
|
+
E || (E = !0, v.value = D(M), Y(() => E = !1));
|
|
1016
1016
|
}
|
|
1017
1017
|
), V(
|
|
1018
1018
|
v,
|
|
1019
|
-
(
|
|
1020
|
-
!E && (
|
|
1019
|
+
(M) => {
|
|
1020
|
+
!E && (M !== e[a] || h) && m(M);
|
|
1021
1021
|
},
|
|
1022
1022
|
{ deep: h }
|
|
1023
1023
|
), v;
|
|
@@ -1032,7 +1032,7 @@ function Lt(e, a, n, o = {}) {
|
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
function Jt() {
|
|
1035
|
-
const { isDark: e } =
|
|
1035
|
+
const { isDark: e } = ue(), a = lt(e);
|
|
1036
1036
|
return {
|
|
1037
1037
|
isDark: e,
|
|
1038
1038
|
toggleDark: a
|
|
@@ -1081,7 +1081,7 @@ function yt() {
|
|
|
1081
1081
|
isDark: n
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
const
|
|
1084
|
+
const ue = je(yt);
|
|
1085
1085
|
function gt() {
|
|
1086
1086
|
const e = S(!1), a = S(!1), n = S(!1);
|
|
1087
1087
|
return fe(" ", () => {
|
|
@@ -1099,18 +1099,18 @@ function gt() {
|
|
|
1099
1099
|
}), { pressSpace: e, pressShift: a, pressCtrl: n };
|
|
1100
1100
|
}
|
|
1101
1101
|
function zt(e) {
|
|
1102
|
-
const { pressSpace: a } =
|
|
1102
|
+
const { pressSpace: a } = ue(), n = new Image(1, 1);
|
|
1103
1103
|
n.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
1104
1104
|
let o = 0, t = 0;
|
|
1105
|
-
function r(
|
|
1105
|
+
function r(u) {
|
|
1106
1106
|
var w;
|
|
1107
|
-
a.value && (o =
|
|
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 w =
|
|
1113
|
-
o =
|
|
1112
|
+
const w = u.x - o, h = u.y - t;
|
|
1113
|
+
o = u.x, t = u.y, e.value && (e.value.scrollTop -= h, e.value.scrollLeft -= w);
|
|
1114
1114
|
}
|
|
1115
1115
|
function i() {
|
|
1116
1116
|
a.value = !1;
|
|
@@ -1118,7 +1118,7 @@ function zt(e) {
|
|
|
1118
1118
|
return { handleElementDragStart: r, handleElementDrag: l, handleElementDragEnd: i };
|
|
1119
1119
|
}
|
|
1120
1120
|
function Wt(e) {
|
|
1121
|
-
const { pressCtrl: a, canvasScale: n, disabledZoom: o } =
|
|
1121
|
+
const { pressCtrl: a, canvasScale: n, disabledZoom: o } = ue();
|
|
1122
1122
|
function t(r) {
|
|
1123
1123
|
if (!a.value || o.value)
|
|
1124
1124
|
return;
|
|
@@ -1149,7 +1149,7 @@ function Ht(e, a = 16.66) {
|
|
|
1149
1149
|
const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, St = /* @__PURE__ */ G({
|
|
1150
1150
|
__name: "index",
|
|
1151
1151
|
setup(e, { expose: a }) {
|
|
1152
|
-
const n =
|
|
1152
|
+
const n = O.getComponent("monacoEditor"), o = O.getComponent("modal"), t = S(null), r = S(!1), l = S(!1), i = S({}), u = H("pageSchema"), w = S(null), h = S("");
|
|
1153
1153
|
function s() {
|
|
1154
1154
|
l.value = !1;
|
|
1155
1155
|
}
|
|
@@ -1161,24 +1161,24 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1161
1161
|
}
|
|
1162
1162
|
async function f() {
|
|
1163
1163
|
try {
|
|
1164
|
-
let
|
|
1165
|
-
if (!Object.keys(
|
|
1164
|
+
let c = await w.value.validateAll();
|
|
1165
|
+
if (!Object.keys(c).length) {
|
|
1166
1166
|
alert("请添加表单组件后再尝试!");
|
|
1167
1167
|
return;
|
|
1168
1168
|
}
|
|
1169
|
-
Object.keys(
|
|
1170
|
-
var
|
|
1171
|
-
(
|
|
1169
|
+
Object.keys(c).length === 1 && (c = c.default), i.value = JSON.stringify(c, null, 2), Y(() => {
|
|
1170
|
+
var D;
|
|
1171
|
+
(D = t.value) == null || D.setValue(i.value);
|
|
1172
1172
|
}), l.value = !0;
|
|
1173
|
-
} catch (
|
|
1174
|
-
console.error(
|
|
1173
|
+
} catch (c) {
|
|
1174
|
+
console.error(c);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
return a({
|
|
1178
1178
|
handleOpen: d
|
|
1179
|
-
}), (
|
|
1179
|
+
}), (c, D) => (F(), L(x(o), {
|
|
1180
1180
|
modelValue: r.value,
|
|
1181
|
-
"onUpdate:modelValue":
|
|
1181
|
+
"onUpdate:modelValue": D[1] || (D[1] = (C) => r.value = C),
|
|
1182
1182
|
title: "预览",
|
|
1183
1183
|
class: "w-900px",
|
|
1184
1184
|
width: "900px",
|
|
@@ -1188,15 +1188,15 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1188
1188
|
}, {
|
|
1189
1189
|
default: P(() => [
|
|
1190
1190
|
J("div", wt, [
|
|
1191
|
-
(
|
|
1191
|
+
(F(), L(x(Xe), {
|
|
1192
1192
|
key: h.value,
|
|
1193
1193
|
ref_key: "kb",
|
|
1194
1194
|
ref: w,
|
|
1195
|
-
"page-schema":
|
|
1195
|
+
"page-schema": x(u)
|
|
1196
1196
|
}, null, 8, ["page-schema"])),
|
|
1197
|
-
T(
|
|
1197
|
+
T(x(o), {
|
|
1198
1198
|
modelValue: l.value,
|
|
1199
|
-
"onUpdate:modelValue":
|
|
1199
|
+
"onUpdate:modelValue": D[0] || (D[0] = (C) => l.value = C),
|
|
1200
1200
|
title: "表单数据",
|
|
1201
1201
|
class: "w-860px",
|
|
1202
1202
|
width: "860px",
|
|
@@ -1205,7 +1205,7 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1205
1205
|
}, {
|
|
1206
1206
|
default: P(() => [
|
|
1207
1207
|
J("div", bt, [
|
|
1208
|
-
T(
|
|
1208
|
+
T(x(n), {
|
|
1209
1209
|
ref_key: "monacoEditorRef",
|
|
1210
1210
|
ref: t,
|
|
1211
1211
|
autoToggleTheme: "",
|
|
@@ -1222,10 +1222,10 @@ const wt = { class: "min-w-750px rounded" }, bt = { class: "h-full rounded" }, S
|
|
|
1222
1222
|
_: 1
|
|
1223
1223
|
}, 8, ["modelValue"]));
|
|
1224
1224
|
}
|
|
1225
|
-
}),
|
|
1225
|
+
}), Dt = {
|
|
1226
1226
|
key: 0,
|
|
1227
1227
|
class: "epic-loading-box"
|
|
1228
|
-
},
|
|
1228
|
+
}, At = { class: "epic-designer-main" }, Et = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ G({
|
|
1229
1229
|
__name: "designer",
|
|
1230
1230
|
props: {
|
|
1231
1231
|
disabledZoom: { type: Boolean, default: !1 },
|
|
@@ -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 = q(() => import("./index-C-XUgjda.js")), t = q(() => import("./index-ASoFJnMl.js")), r = q(() => import("./index-
|
|
1251
|
+
const o = q(() => import("./index-C-XUgjda.js")), t = q(() => import("./index-ASoFJnMl.js")), r = q(() => import("./index-BfWxzrQ0.js")), l = q(() => import("./index-ooVzYa5L.js")), i = q(() => import("./index-DgcFxYFp.js")), u = Ie(), w = He(), h = e;
|
|
1252
1252
|
let s = {
|
|
1253
1253
|
schemas: [
|
|
1254
1254
|
{
|
|
@@ -1300,30 +1300,30 @@ defineExpose({
|
|
|
1300
1300
|
s = h.defaultSchema;
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
h.source &&
|
|
1304
|
-
}),
|
|
1303
|
+
h.source && O.setSourceData(h.source), h.formMode && (s.schemas = O.formSchemas);
|
|
1304
|
+
}), u.setDesignMode(), u.setDefaultComponentIds(s.schemas);
|
|
1305
1305
|
const y = n, d = S(null), f = Z({
|
|
1306
1306
|
checkedNode: null,
|
|
1307
1307
|
hoverNode: null,
|
|
1308
1308
|
disableHover: !1,
|
|
1309
1309
|
matched: []
|
|
1310
|
-
}),
|
|
1310
|
+
}), c = Z({
|
|
1311
1311
|
schemas: [],
|
|
1312
1312
|
script: s.script
|
|
1313
|
-
}), { disabledZoom:
|
|
1313
|
+
}), { disabledZoom: D } = ue();
|
|
1314
1314
|
se(() => {
|
|
1315
|
-
|
|
1315
|
+
D.value = h.disabledZoom;
|
|
1316
1316
|
}), se(() => {
|
|
1317
|
-
const b =
|
|
1318
|
-
b && b !== "" &&
|
|
1319
|
-
}), $("pageSchema",
|
|
1317
|
+
const b = c.script;
|
|
1318
|
+
b && b !== "" && u.setMethods(b);
|
|
1319
|
+
}), $("pageSchema", c), $("revoke", w), $("pageManager", u), $(
|
|
1320
1320
|
"designerProps",
|
|
1321
1321
|
U(() => h)
|
|
1322
1322
|
), $("designer", {
|
|
1323
1323
|
setCheckedNode: m,
|
|
1324
1324
|
setHoverNode: g,
|
|
1325
1325
|
setDisableHover: E,
|
|
1326
|
-
handleToggleDeviceMode:
|
|
1326
|
+
handleToggleDeviceMode: ce,
|
|
1327
1327
|
reset: W,
|
|
1328
1328
|
state: f
|
|
1329
1329
|
}), de.on("saveSourceData", (b) => {
|
|
@@ -1334,10 +1334,10 @@ defineExpose({
|
|
|
1334
1334
|
y("updateSourceData", b);
|
|
1335
1335
|
});
|
|
1336
1336
|
function C() {
|
|
1337
|
-
|
|
1337
|
+
c.schemas = N(s.schemas), m(c.schemas[0]), w.push(c.schemas, "初始化撤销功能");
|
|
1338
1338
|
}
|
|
1339
|
-
async function m(b =
|
|
1340
|
-
f.checkedNode = b, f.matched = Je(
|
|
1339
|
+
async function m(b = c.schemas[0]) {
|
|
1340
|
+
f.checkedNode = b, f.matched = Je(c.schemas, b.id);
|
|
1341
1341
|
}
|
|
1342
1342
|
async function g(b = null) {
|
|
1343
1343
|
var X;
|
|
@@ -1349,25 +1349,25 @@ defineExpose({
|
|
|
1349
1349
|
}
|
|
1350
1350
|
function v() {
|
|
1351
1351
|
Y(() => {
|
|
1352
|
-
y("ready", { pageManager:
|
|
1352
|
+
y("ready", { pageManager: u });
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
1355
|
async function E(b = !1) {
|
|
1356
1356
|
f.disableHover = b;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
z(
|
|
1358
|
+
function M(b) {
|
|
1359
|
+
z(c, N(b));
|
|
1360
1360
|
}
|
|
1361
1361
|
function B() {
|
|
1362
|
-
return we(
|
|
1362
|
+
return we(c);
|
|
1363
1363
|
}
|
|
1364
1364
|
function W() {
|
|
1365
|
-
Ee(
|
|
1365
|
+
Ee(c.schemas, s.schemas) && c.script === s.script || (z(c.schemas, s.schemas), c.script = s.script, m(c.schemas[0]), w.push(c.schemas, "重置操作"), y("reset", c));
|
|
1366
1366
|
}
|
|
1367
1367
|
function oe() {
|
|
1368
|
-
y("save", we(
|
|
1368
|
+
y("save", we(c));
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function ce(b) {
|
|
1371
1371
|
y("toggleDeviceMode", b);
|
|
1372
1372
|
}
|
|
1373
1373
|
function ae() {
|
|
@@ -1375,19 +1375,19 @@ defineExpose({
|
|
|
1375
1375
|
}
|
|
1376
1376
|
return C(), a({
|
|
1377
1377
|
revoke: w,
|
|
1378
|
-
setData:
|
|
1378
|
+
setData: M,
|
|
1379
1379
|
getData: B,
|
|
1380
1380
|
reset: W,
|
|
1381
1381
|
preview: ae
|
|
1382
|
-
}), (b, X) =>
|
|
1382
|
+
}), (b, X) => x(O).initialized.value ? (F(), L(Ae, {
|
|
1383
1383
|
key: 1,
|
|
1384
1384
|
onResolve: v
|
|
1385
1385
|
}, {
|
|
1386
1386
|
default: P(() => [
|
|
1387
|
-
J("div",
|
|
1387
|
+
J("div", At, [
|
|
1388
1388
|
J("div", Et, [
|
|
1389
1389
|
R(b.$slots, "header", {}, () => [
|
|
1390
|
-
h.hiddenHeader ?
|
|
1390
|
+
h.hiddenHeader ? De("", !0) : (F(), L(x(o), {
|
|
1391
1391
|
key: 0,
|
|
1392
1392
|
onPreview: ae,
|
|
1393
1393
|
onSave: oe
|
|
@@ -1417,9 +1417,9 @@ defineExpose({
|
|
|
1417
1417
|
J("div", {
|
|
1418
1418
|
class: Te(["epic-split-view-container", { "hidden-header": b.hiddenHeader }])
|
|
1419
1419
|
}, [
|
|
1420
|
-
T(
|
|
1421
|
-
T(
|
|
1422
|
-
T(
|
|
1420
|
+
T(x(t)),
|
|
1421
|
+
T(x(r)),
|
|
1422
|
+
T(x(l))
|
|
1423
1423
|
], 2),
|
|
1424
1424
|
T(St, {
|
|
1425
1425
|
ref_key: "previewRef",
|
|
@@ -1429,14 +1429,14 @@ defineExpose({
|
|
|
1429
1429
|
]),
|
|
1430
1430
|
fallback: P(() => [
|
|
1431
1431
|
J("div", It, [
|
|
1432
|
-
T(
|
|
1432
|
+
T(x(i))
|
|
1433
1433
|
])
|
|
1434
1434
|
]),
|
|
1435
1435
|
_: 3
|
|
1436
|
-
})) : (
|
|
1436
|
+
})) : (F(), he("div", Dt));
|
|
1437
1437
|
}
|
|
1438
1438
|
}), kt = {
|
|
1439
|
-
component: async () => await import("./index-
|
|
1439
|
+
component: async () => await import("./index-DLXCQOpE.js"),
|
|
1440
1440
|
defaultSchema: {
|
|
1441
1441
|
label: "代码编辑器",
|
|
1442
1442
|
type: "monacoEditor",
|
|
@@ -1485,39 +1485,25 @@ defineExpose({
|
|
|
1485
1485
|
]
|
|
1486
1486
|
}
|
|
1487
1487
|
};
|
|
1488
|
-
function
|
|
1489
|
-
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-
|
|
1488
|
+
function xt(e) {
|
|
1489
|
+
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-R1sGzPDh.js")), e.component("EActionEditor", async () => await import("./index-zFyk0fsI.js")), e.component("ERuleEditor", async () => await import("./index-BcAPkz_3.js")), e.component("EOptionsEditor", async () => await import("./index-BcRau_iO.js")), e.component("ENode", async () => await import("./index-DMO6svHk.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
|
|
1490
1490
|
id: "component_view",
|
|
1491
1491
|
title: "组件",
|
|
1492
1492
|
icon: "icon--epic--extension-outline",
|
|
1493
|
-
component: async () => await import("./index-
|
|
1494
|
-
}), e.registerActivitybar({
|
|
1495
|
-
id: "sound_code_view",
|
|
1496
|
-
title: "源码",
|
|
1497
|
-
icon: "icon--epic--sdk-outline-rounded",
|
|
1498
|
-
component: async () => await import("./index-DWW8LGvj.js")
|
|
1499
|
-
}), e.registerActivitybar({
|
|
1500
|
-
id: "outline_view",
|
|
1501
|
-
title: "大纲",
|
|
1502
|
-
icon: "icon--epic--account-tree-outline-rounded",
|
|
1503
|
-
component: async () => await import("./outline-yy4pIEi3.js")
|
|
1493
|
+
component: async () => await import("./index-8kRf0Tni.js")
|
|
1504
1494
|
}), e.registerRightSidebar({
|
|
1505
1495
|
id: "attribute_view",
|
|
1506
1496
|
title: "属性",
|
|
1507
|
-
component: async () => await import("./attributeView-
|
|
1497
|
+
component: async () => await import("./attributeView-BHuhrlM5.js")
|
|
1508
1498
|
}), e.registerRightSidebar({
|
|
1509
1499
|
id: "style_view",
|
|
1510
1500
|
title: "样式",
|
|
1511
|
-
component: async () => await import("./styleView-
|
|
1512
|
-
}), e.registerRightSidebar({
|
|
1513
|
-
id: "event_view",
|
|
1514
|
-
title: "事件",
|
|
1515
|
-
component: async () => await import("./eventView-Ed_9JLnx.js")
|
|
1501
|
+
component: async () => await import("./styleView-Dq9MseMf.js")
|
|
1516
1502
|
}), [kt, Ct].forEach((n) => {
|
|
1517
1503
|
e.registerComponent(n);
|
|
1518
1504
|
});
|
|
1519
1505
|
}
|
|
1520
|
-
|
|
1506
|
+
xt(O);
|
|
1521
1507
|
export {
|
|
1522
1508
|
ze as A,
|
|
1523
1509
|
te as B,
|
|
@@ -1543,16 +1529,16 @@ export {
|
|
|
1543
1529
|
Rt as l,
|
|
1544
1530
|
N as m,
|
|
1545
1531
|
Lt as n,
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1532
|
+
Mt as o,
|
|
1533
|
+
Jt as p,
|
|
1534
|
+
Xe as q,
|
|
1535
|
+
Kt as r,
|
|
1536
|
+
Ot as s,
|
|
1537
|
+
Ie as t,
|
|
1538
|
+
ue as u,
|
|
1539
|
+
He as v,
|
|
1554
1540
|
Ut as w,
|
|
1555
|
-
|
|
1541
|
+
Ee as x,
|
|
1556
1542
|
Je as y,
|
|
1557
|
-
|
|
1543
|
+
Ft as z
|
|
1558
1544
|
};
|