epic-designer-gold 0.0.39 → 0.0.41
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-CWoguTGM.cjs → attributeView-BqbSwDZ-.cjs} +1 -1
- package/dist/{attributeView-CGtxobMF.js → attributeView-DPFdUi2O.js} +1 -1
- package/dist/form-2lbtG-zj.js +74 -0
- package/dist/form-BM53wx9g.cjs +1 -0
- package/dist/{index-F-tQsU_8.cjs → index-98NOkcrB.cjs} +1 -1
- package/dist/{index-C7VY8nRX.js → index-B0pq3LvX.js} +1 -1
- package/dist/{index-9xlsE_Mf.cjs → index-BMLwTmDA.cjs} +1 -1
- package/dist/{index-DBRz4gi5.js → index-BdghL1e1.js} +1 -1
- package/dist/{index-BBNxCX9U.cjs → index-Bjg8-hj_.cjs} +1 -1
- package/dist/{index-wxDrmXkw.js → index-Bm_2TXSs.js} +1 -1
- package/dist/{index-Bj6zKw82.js → index-BnYEEWhA.js} +351 -349
- package/dist/index-CDp439PR.cjs +10 -0
- package/dist/{index-Dan8DnTn.cjs → index-CRSk-fAu.cjs} +1 -1
- package/dist/{index-DFP-9KaA.js → index-CbiXuuBq.js} +1 -1
- package/dist/{index-DWKirflC.js → index-Cd9n7QSg.js} +1 -1
- package/dist/{index-CDzXkVHK.js → index-D9mE7-Ar.js} +2 -2
- package/dist/{index-ChGNJr_v.cjs → index-DUwQsRO_.cjs} +1 -1
- package/dist/{index-B7Uy532l.cjs → index-DeY6yw0s.cjs} +1 -1
- package/dist/index-DqXlNyYv.js +4 -0
- package/dist/{index-DCoUYKRW.cjs → index-FyzG-Fup.cjs} +1 -1
- package/dist/{index-DU0OYNvy.cjs → index-RaG5yFdp.cjs} +1 -1
- package/dist/{index-BALf0q8e.js → index-fHt4-rMq.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/sign-BS8owiJT.cjs +1 -0
- package/dist/sign-DZvUIxel.js +155 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-BHaWjsLQ.js → styleView-BC3ElYAX.js} +1 -1
- package/dist/{styleView-BgoSZRkZ.cjs → styleView-DT4vsrXY.cjs} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +8 -8
- package/dist/{uploadImage-CYV7X1sG.js → uploadImage-tLXX1j6A.js} +12 -12
- package/package.json +1 -1
- package/dist/form-6cUK-Ari.js +0 -72
- package/dist/form-CthzLIgs.cjs +0 -1
- package/dist/index-9eiypGfJ.cjs +0 -10
- package/dist/index-By5d6rRB.js +0 -4
- package/dist/sign-BCmA2v-3.cjs +0 -1
- package/dist/sign-CSv8hClp.js +0 -149
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as _, reactive as j, defineComponent as ee, openBlock as
|
|
1
|
+
import { ref as _, reactive as j, defineComponent as ee, openBlock as k, createBlock as K, unref as R, mergeProps as pe, withCtx as $, renderSlot as T, getCurrentInstance as ae, inject as Q, watch as N, useAttrs as Pe, provide as L, shallowRef as Oe, computed as J, watchEffect as le, onUnmounted as Se, resolveComponent as Ve, resolveDynamicComponent as Fe, createVNode as H, createCommentVNode as De, useSlots as Me, createElementBlock as me, Suspense as Ae, createElementVNode as Z, Fragment as Re, renderList as $e, nextTick as ne, effectScope as Ne, isRef as Be, getCurrentScope as ke, onScopeDispose as Ue, onMounted as he, normalizeClass as Te, toRaw as ye } from "vue";
|
|
2
2
|
import { p as B, E as re, a as we, l as X } from "./axios-ITY6Uw7A.js";
|
|
3
3
|
function ie(e = 10) {
|
|
4
4
|
const r = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
@@ -12,22 +12,22 @@ function ie(e = 10) {
|
|
|
12
12
|
function Le(e) {
|
|
13
13
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function z(e, r = /* @__PURE__ */ new WeakMap()) {
|
|
16
16
|
if (typeof e != "object" || e === null)
|
|
17
17
|
return e;
|
|
18
18
|
if (r.has(e))
|
|
19
19
|
return r.get(e);
|
|
20
20
|
if (Array.isArray(e)) {
|
|
21
|
-
const t = e.map((n) =>
|
|
21
|
+
const t = e.map((n) => z(n, r));
|
|
22
22
|
return r.set(e, t), t;
|
|
23
23
|
}
|
|
24
24
|
const o = {};
|
|
25
25
|
return r.set(e, o), Object.keys(e).forEach((t) => {
|
|
26
|
-
o[t] =
|
|
26
|
+
o[t] = z(e[t], r);
|
|
27
27
|
}), o;
|
|
28
28
|
}
|
|
29
29
|
function Vt(e) {
|
|
30
|
-
const [r] = We([
|
|
30
|
+
const [r] = We([z(e)], (o) => {
|
|
31
31
|
var n, s;
|
|
32
32
|
const t = {
|
|
33
33
|
...o,
|
|
@@ -54,16 +54,16 @@ function Ee(e, r, o = [], t = /* @__PURE__ */ new WeakMap()) {
|
|
|
54
54
|
if (t.has(s))
|
|
55
55
|
return "[Circular]";
|
|
56
56
|
t.set(s, !0);
|
|
57
|
-
const l = Object.keys(s).sort(),
|
|
57
|
+
const l = Object.keys(s).sort(), u = {};
|
|
58
58
|
return l.forEach((f) => {
|
|
59
|
-
o.includes(f) || (
|
|
60
|
-
}), t.delete(s),
|
|
59
|
+
o.includes(f) || (u[f] = n(s[f]));
|
|
60
|
+
}), t.delete(s), u;
|
|
61
61
|
} else
|
|
62
62
|
return s;
|
|
63
63
|
};
|
|
64
64
|
return JSON.stringify(n(e)) === JSON.stringify(n(r));
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ze(e, r) {
|
|
67
67
|
const o = [];
|
|
68
68
|
let t = !1;
|
|
69
69
|
function n(s) {
|
|
@@ -72,7 +72,7 @@ function Je(e, r) {
|
|
|
72
72
|
;
|
|
73
73
|
if (!t && s.slots)
|
|
74
74
|
for (let l in s.slots)
|
|
75
|
-
for (let
|
|
75
|
+
for (let u = 0; u < s.slots[l].length && (n(s.slots[l][u]), !t); u++)
|
|
76
76
|
;
|
|
77
77
|
t || o.pop();
|
|
78
78
|
}
|
|
@@ -98,9 +98,9 @@ function Mt(e, r, o) {
|
|
|
98
98
|
return n[t[t.length - 1]] = o, e;
|
|
99
99
|
}
|
|
100
100
|
function Rt(e, r = "default") {
|
|
101
|
-
return
|
|
101
|
+
return Je(e, r).map((t) => t.field);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Je(e, r = "default") {
|
|
104
104
|
const o = se(
|
|
105
105
|
e,
|
|
106
106
|
(n) => {
|
|
@@ -121,8 +121,8 @@ function se(e, r, o = !1, t) {
|
|
|
121
121
|
for (; s.length; ) {
|
|
122
122
|
const l = s.pop();
|
|
123
123
|
if (l != null && l.children && (!t || t(l)) && s.push(...l.children), l != null && l.slots && (!t || t(l)))
|
|
124
|
-
for (let
|
|
125
|
-
s.push(...l.slots[
|
|
124
|
+
for (let u in l.slots)
|
|
125
|
+
s.push(...l.slots[u]);
|
|
126
126
|
if (r(l) && (n.push(l), o))
|
|
127
127
|
return l;
|
|
128
128
|
}
|
|
@@ -149,7 +149,7 @@ function $t(e, r) {
|
|
|
149
149
|
throw new Error(`没有查询到id为${r}的节点`);
|
|
150
150
|
return o;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Nt(e, r) {
|
|
153
153
|
const o = [{ type: "", children: e }];
|
|
154
154
|
let t = 0, n = null;
|
|
155
155
|
if (se(
|
|
@@ -159,9 +159,9 @@ function kt(e, r) {
|
|
|
159
159
|
if (s != null && s.slots)
|
|
160
160
|
for (let l in s.slots) {
|
|
161
161
|
n = s.slots[l];
|
|
162
|
-
for (let
|
|
163
|
-
if (n[
|
|
164
|
-
return t =
|
|
162
|
+
for (let u = 0; u < n.length; u++)
|
|
163
|
+
if (n[u].id === r)
|
|
164
|
+
return t = u, !0;
|
|
165
165
|
}
|
|
166
166
|
return !1;
|
|
167
167
|
}
|
|
@@ -221,14 +221,14 @@ function Bt(e) {
|
|
|
221
221
|
}
|
|
222
222
|
function oe(e, r) {
|
|
223
223
|
return e.map((o) => {
|
|
224
|
-
var f, I,
|
|
224
|
+
var f, I, w;
|
|
225
225
|
let t = o.type ?? "";
|
|
226
|
-
const n = o.options ?? {}, s = (a,
|
|
227
|
-
t === a && (t =
|
|
226
|
+
const n = o.options ?? {}, s = (a, E) => {
|
|
227
|
+
t === a && (t = E, n.defaultValue && (n.defaultValue = JSON.parse(n.defaultValue)));
|
|
228
228
|
};
|
|
229
229
|
if (s("uploadImg", "upload-image"), s("uploadFile", "upload-file"), t === "date" && n.range && (n.type = "daterange", delete n.range), (t === "date" || t === "time") && (n.valueFormat = n.format), t === "textarea") {
|
|
230
|
-
const { minRows: a, maxRows:
|
|
231
|
-
n.autoSize = { minRows: a, maxRows:
|
|
230
|
+
const { minRows: a, maxRows: E } = n;
|
|
231
|
+
n.autoSize = { minRows: a, maxRows: E }, delete n.minRows, delete n.maxRows;
|
|
232
232
|
}
|
|
233
233
|
t === "number" && !n.precision && delete n.precision, n.width && (n.style = { width: n.width }, delete n.width), t === "grid" && (t = "row"), r && r.type === "grid" && (t = "col", n.span = o.span, o.key = ie());
|
|
234
234
|
const l = {
|
|
@@ -255,10 +255,10 @@ function oe(e, r) {
|
|
|
255
255
|
"color-picker",
|
|
256
256
|
"upload-file",
|
|
257
257
|
"upload-image"
|
|
258
|
-
].includes(t) && (l.input = !0, ((I = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : I.required) === !1 && o.rules.shift(), ((
|
|
258
|
+
].includes(t) && (l.input = !0, ((I = (f = o.rules) == null ? void 0 : f[0]) == null ? void 0 : I.required) === !1 && o.rules.shift(), ((w = o.rules) == null ? void 0 : w.length) > 0 && (l.rules = o.rules)), o.list && (l.children = oe(o.list, o)), o.columns && (l.children = oe(o.columns, o)), o.trs && (l.children = oe(o.trs, o)), o.tds && (l.children = oe(o.tds, o)), l;
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function kt(e, r) {
|
|
262
262
|
let o = null;
|
|
263
263
|
return (...t) => {
|
|
264
264
|
o && clearTimeout(o), o = setTimeout(() => {
|
|
@@ -266,85 +266,85 @@ function Nt(e, r) {
|
|
|
266
266
|
}, r);
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function xe() {
|
|
270
270
|
const e = _({}), r = _({}), o = _(!1), t = _([]), n = j({});
|
|
271
271
|
function s(h) {
|
|
272
272
|
return e.value[h];
|
|
273
273
|
}
|
|
274
|
-
function l(h,
|
|
275
|
-
e.value[h] =
|
|
274
|
+
function l(h, D) {
|
|
275
|
+
e.value[h] = D;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function u(h) {
|
|
278
278
|
delete e.value[h];
|
|
279
279
|
}
|
|
280
|
-
function f(h,
|
|
281
|
-
const
|
|
280
|
+
function f(h, D = !1) {
|
|
281
|
+
const x = Object.entries(B.publicMethods).reduce(
|
|
282
282
|
(C, [i, F]) => (C[i] = F.handler, C),
|
|
283
283
|
{}
|
|
284
284
|
);
|
|
285
285
|
try {
|
|
286
286
|
new Function(`const epic = this;${h}`).bind({
|
|
287
|
-
...
|
|
287
|
+
...x,
|
|
288
288
|
getComponent: s,
|
|
289
289
|
find: s,
|
|
290
290
|
defineExpose: I,
|
|
291
|
-
publicMethods:
|
|
291
|
+
publicMethods: x,
|
|
292
292
|
pluginManager: B
|
|
293
293
|
})();
|
|
294
294
|
} catch (C) {
|
|
295
|
-
|
|
295
|
+
D && console.error("[epic:自定义函数]异常:", C);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
function I(h) {
|
|
299
299
|
h != null && (r.value = h);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function w(h, ...D) {
|
|
302
302
|
if (!h || h.length === 0) {
|
|
303
303
|
console.warn("未提供任何动作");
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
|
-
h.forEach((
|
|
307
|
-
const C =
|
|
308
|
-
switch (
|
|
306
|
+
h.forEach((x) => {
|
|
307
|
+
const C = x.args ? JSON.parse(x.args) : D;
|
|
308
|
+
switch (x.type) {
|
|
309
309
|
case "public":
|
|
310
|
-
a(
|
|
310
|
+
a(x, C);
|
|
311
311
|
break;
|
|
312
312
|
case "custom":
|
|
313
|
-
|
|
313
|
+
E(x, C);
|
|
314
314
|
break;
|
|
315
315
|
case "component":
|
|
316
|
-
p(
|
|
316
|
+
p(x, C);
|
|
317
317
|
break;
|
|
318
318
|
default:
|
|
319
|
-
console.warn(`未知的动作类型: ${
|
|
319
|
+
console.warn(`未知的动作类型: ${x.type}`);
|
|
320
320
|
break;
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
function a(h,
|
|
325
|
-
var
|
|
324
|
+
function a(h, D) {
|
|
325
|
+
var x;
|
|
326
326
|
try {
|
|
327
|
-
(
|
|
327
|
+
(x = B.publicMethods[h.methodName]) == null || x.handler(...D);
|
|
328
328
|
} catch (C) {
|
|
329
329
|
console.error(`[Epic:公共函数(${h.methodName})]执行异常:`, C);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
332
|
+
function E(h, D) {
|
|
333
|
+
var x, C;
|
|
334
334
|
try {
|
|
335
|
-
(C = (
|
|
335
|
+
(C = (x = r.value)[h.methodName]) == null || C.call(x, ...D);
|
|
336
336
|
} catch (i) {
|
|
337
337
|
console.error(`[Epic:自定义函数(${h.methodName})]执行异常:`, i);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function p(h,
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
340
|
+
function p(h, D) {
|
|
341
|
+
const x = h.componentId != null && s(h.componentId);
|
|
342
|
+
if (!x) {
|
|
343
343
|
console.warn(`[Epic:组件${h.componentId}]未找到`);
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
try {
|
|
347
|
-
|
|
347
|
+
x[h.methodName](...D);
|
|
348
348
|
} catch (C) {
|
|
349
349
|
console.error(`[Epic:组件${h.componentId}函数(${h.methodName})]执行异常:`, C);
|
|
350
350
|
}
|
|
@@ -352,23 +352,23 @@ function be() {
|
|
|
352
352
|
function v(h = !0) {
|
|
353
353
|
o.value = h;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
t.value =
|
|
355
|
+
function d(h) {
|
|
356
|
+
const D = se(h, () => !0);
|
|
357
|
+
t.value = D.map((x) => x.id);
|
|
358
358
|
}
|
|
359
|
-
function O(h,
|
|
360
|
-
if (n[
|
|
361
|
-
const
|
|
362
|
-
G(h,
|
|
359
|
+
function O(h, D = "default") {
|
|
360
|
+
if (n[D]) {
|
|
361
|
+
const x = n[D];
|
|
362
|
+
G(h, x);
|
|
363
363
|
}
|
|
364
|
-
n[
|
|
364
|
+
n[D] = h;
|
|
365
365
|
}
|
|
366
|
-
function M(h,
|
|
367
|
-
if (n[
|
|
368
|
-
G(n[
|
|
366
|
+
function M(h, D = "default") {
|
|
367
|
+
if (n[D]) {
|
|
368
|
+
G(n[D], h, !1);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
-
n[
|
|
371
|
+
n[D] = h;
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
374
|
componentInstances: e,
|
|
@@ -382,19 +382,19 @@ function be() {
|
|
|
382
382
|
// 简化查询函数, 推荐使用
|
|
383
383
|
find: s,
|
|
384
384
|
addComponentInstance: l,
|
|
385
|
-
removeComponentInstance:
|
|
385
|
+
removeComponentInstance: u,
|
|
386
386
|
setMethods: f,
|
|
387
|
-
doActions:
|
|
387
|
+
doActions: w,
|
|
388
388
|
setDesignMode: v,
|
|
389
|
-
setDefaultComponentIds:
|
|
389
|
+
setDefaultComponentIds: d
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
392
|
function He() {
|
|
393
393
|
const e = _([]), r = _([]), o = _(null);
|
|
394
394
|
let t = 0;
|
|
395
395
|
function n(f, I = "插入组件") {
|
|
396
|
-
const
|
|
397
|
-
t + 150 >
|
|
396
|
+
const w = Date.now();
|
|
397
|
+
t + 150 > w || (t = w, o.value != null && (e.value.push(o.value), r.value.splice(0, r.value.length)), o.value = {
|
|
398
398
|
type: I,
|
|
399
399
|
componentSchema: JSON.stringify(f)
|
|
400
400
|
}, e.value.length > 60 && e.value.unshift());
|
|
@@ -411,7 +411,7 @@ function He() {
|
|
|
411
411
|
const f = r.value.pop();
|
|
412
412
|
return o.value != null && e.value.push(o.value), o.value = f, JSON.parse(f.componentSchema);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function u() {
|
|
415
415
|
e.value = [], r.value = [], o.value = null;
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
@@ -421,7 +421,7 @@ function He() {
|
|
|
421
421
|
push: n,
|
|
422
422
|
undo: s,
|
|
423
423
|
redo: l,
|
|
424
|
-
reset:
|
|
424
|
+
reset: u
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
427
|
const Ke = /* @__PURE__ */ ee({
|
|
@@ -435,17 +435,17 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
435
435
|
const o = B.getComponent("form-item"), t = e, n = r, s = _(), l = () => {
|
|
436
436
|
n("updateFormItemRef", s.value);
|
|
437
437
|
};
|
|
438
|
-
return (
|
|
438
|
+
return (u, f) => t.hasFormItem ? (k(), K(R(o), pe({
|
|
439
439
|
key: 0,
|
|
440
440
|
ref_key: "formItemRef",
|
|
441
441
|
ref: s,
|
|
442
442
|
onVnodeMounted: l
|
|
443
443
|
}, t.formItemProps), {
|
|
444
444
|
default: $(() => [
|
|
445
|
-
T(
|
|
445
|
+
T(u.$slots, "default")
|
|
446
446
|
]),
|
|
447
447
|
_: 3
|
|
448
|
-
}, 16, ["onVnodeMounted"])) : T(
|
|
448
|
+
}, 16, ["onVnodeMounted"])) : T(u.$slots, "default", { key: 1 });
|
|
449
449
|
}
|
|
450
450
|
}), qe = /* @__PURE__ */ ee({
|
|
451
451
|
name: "ENode",
|
|
@@ -464,10 +464,12 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
464
464
|
setup(e, { emit: r }) {
|
|
465
465
|
const { proxy: o } = ae(), t = e, n = _(null);
|
|
466
466
|
let s = Q("formData", j({}));
|
|
467
|
-
const l = Q("slots", {}),
|
|
468
|
-
|
|
467
|
+
const l = Q("slots", {}), u = Q("pageManager", {}), f = Q("disabled", { value: !1 });
|
|
468
|
+
console.log("%c [ disabled ]-101", "font-size:13px; background:pink; color:#bf2c9f;", f.value);
|
|
469
|
+
const I = Q("ruleFieldPrefix", null), w = Q("resetFormData", !1);
|
|
470
|
+
let a = j(z(t.componentSchema));
|
|
469
471
|
v();
|
|
470
|
-
async function
|
|
472
|
+
async function E(m) {
|
|
471
473
|
if (["cascader", "checkbox", "select", "radio"].includes(m.type) && m.componentProps.dynamicId && t.sourceDateUrl) {
|
|
472
474
|
const y = (await we({
|
|
473
475
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
@@ -485,106 +487,106 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
485
487
|
headers: JSON.parse(y.headers)
|
|
486
488
|
});
|
|
487
489
|
if (y && (y != null && y.dataPath)) {
|
|
488
|
-
const
|
|
489
|
-
m.componentProps.options = p(
|
|
490
|
+
const be = y.dataPath.split(".").reduce((Ce, _e) => Ce[_e], P.data);
|
|
491
|
+
m.componentProps.options = p(be, y.dataKey, y.dataValue);
|
|
490
492
|
} else
|
|
491
493
|
m.componentProps.options = p(P.data, y.dataKey, y.dataValue);
|
|
492
494
|
return m;
|
|
493
495
|
}
|
|
494
496
|
return m;
|
|
495
497
|
}
|
|
496
|
-
function p(m,
|
|
498
|
+
function p(m, b, V) {
|
|
497
499
|
return m && Object.prototype.toString.call(m) === "[object Array]" ? m.map((y) => y.children && y.children.length ? {
|
|
498
|
-
label: y[
|
|
500
|
+
label: y[b],
|
|
499
501
|
value: y[V] + "",
|
|
500
|
-
children: p(y.children,
|
|
502
|
+
children: p(y.children, b, V)
|
|
501
503
|
} : {
|
|
502
|
-
label: y[
|
|
504
|
+
label: y[b],
|
|
503
505
|
value: y[V] + ""
|
|
504
506
|
}) : [];
|
|
505
507
|
}
|
|
506
|
-
|
|
508
|
+
N(
|
|
507
509
|
() => t.componentSchema,
|
|
508
510
|
(m) => {
|
|
509
|
-
Ee(a, m, ["children"]) || (G(a,
|
|
511
|
+
Ee(a, m, ["children"]) || (G(a, z(m)), v());
|
|
510
512
|
},
|
|
511
513
|
{
|
|
512
514
|
deep: !0
|
|
513
515
|
}
|
|
514
516
|
);
|
|
515
517
|
function v() {
|
|
516
|
-
|
|
518
|
+
u.isDesignMode.value && typeof a.field == "string" && (a.field += "-design-mode");
|
|
517
519
|
}
|
|
518
|
-
(t.resetFormData ||
|
|
519
|
-
const
|
|
520
|
+
(t.resetFormData || w) && (s = {});
|
|
521
|
+
const d = r, O = _(), M = _(), h = (m) => {
|
|
520
522
|
M.value = m;
|
|
521
|
-
},
|
|
522
|
-
Object.keys(
|
|
523
|
-
const
|
|
524
|
-
var m,
|
|
525
|
-
return (m = a.componentProps) != null && m.hidden ? !1 : typeof a.show == "boolean" ? a.show : ((
|
|
526
|
-
}), i =
|
|
523
|
+
}, D = Pe();
|
|
524
|
+
Object.keys(D).length && L("nodeAttrs", D);
|
|
525
|
+
const x = Oe(null), C = J(() => {
|
|
526
|
+
var m, b;
|
|
527
|
+
return (m = a.componentProps) != null && m.hidden ? !1 : typeof a.show == "boolean" ? a.show : ((b = a.show) == null ? void 0 : b.call(a, { values: s })) ?? !0;
|
|
528
|
+
}), i = J(() => {
|
|
527
529
|
var y;
|
|
528
530
|
const m = C.value && ((y = a.rules) == null ? void 0 : y.map((P) => ({
|
|
529
531
|
...P,
|
|
530
|
-
validator: P.validator &&
|
|
532
|
+
validator: P.validator && u.funcs.value[P.validator]
|
|
531
533
|
// 自定义校验函数
|
|
532
534
|
})));
|
|
533
|
-
let
|
|
534
|
-
t.ruleField ?
|
|
535
|
+
let b = a.field;
|
|
536
|
+
t.ruleField ? b = t.ruleField : I && a.field && (b = z(I), b.push(a.field));
|
|
535
537
|
const V = {
|
|
536
538
|
...a,
|
|
537
539
|
rules: m,
|
|
538
540
|
rule: m,
|
|
539
|
-
field:
|
|
541
|
+
field: b
|
|
540
542
|
};
|
|
541
543
|
return V.children && delete V.children, V;
|
|
542
|
-
}), F =
|
|
544
|
+
}), F = J(() => {
|
|
543
545
|
var V, y;
|
|
544
|
-
const m = ((V =
|
|
546
|
+
const m = ((V = A.value) == null ? void 0 : V.bindModel) ?? "modelValue", b = {};
|
|
545
547
|
return a.on && Object.keys(a.on).forEach((P) => {
|
|
546
|
-
|
|
548
|
+
b[`on${Le(P)}`] = (...ge) => u.doActions(a.on[P], ...ge);
|
|
547
549
|
}), {
|
|
548
550
|
...t,
|
|
549
551
|
...a.componentProps,
|
|
550
552
|
disabled: (f == null ? void 0 : f.value) || ((y = a.componentProps) == null ? void 0 : y.disabled),
|
|
551
553
|
bindModel: m,
|
|
552
|
-
...
|
|
554
|
+
...b
|
|
553
555
|
};
|
|
554
|
-
}),
|
|
556
|
+
}), A = J(() => B.getComponentConfingByType(a.type) ?? null);
|
|
555
557
|
le(() => {
|
|
556
558
|
n.value = t.modelValue ?? s[a.field ?? ""];
|
|
557
|
-
}),
|
|
559
|
+
}), N(
|
|
558
560
|
() => n.value,
|
|
559
561
|
() => {
|
|
560
|
-
n.value !== (t.modelValue ?? s[a.field ?? ""]) &&
|
|
562
|
+
n.value !== (t.modelValue ?? s[a.field ?? ""]) && S(n.value);
|
|
561
563
|
}
|
|
562
|
-
),
|
|
564
|
+
), N(
|
|
563
565
|
() => O.value,
|
|
564
566
|
() => {
|
|
565
|
-
|
|
567
|
+
c();
|
|
566
568
|
},
|
|
567
569
|
{ immediate: !0 }
|
|
568
570
|
);
|
|
569
|
-
function
|
|
570
|
-
var
|
|
571
|
+
function c() {
|
|
572
|
+
var b;
|
|
571
573
|
const m = O.value || o;
|
|
572
|
-
a.id && m && (a.input && (m.setValue =
|
|
574
|
+
a.id && m && (a.input && (m.setValue = S, m.getValue = () => s[a.field] || t.modelValue), m.setAttr = (V, y) => (a.componentProps || (a.componentProps = {}), a.componentProps[V] = y), m.getAttr = (V) => a.componentProps[V], u.addComponentInstance(a.id, m), (b = A.value) != null && b.defaultSchema.input && a.noFormItem !== !0 && M.value && u.addComponentInstance(a.id + "formItem", M.value));
|
|
573
575
|
}
|
|
574
|
-
function
|
|
576
|
+
function g() {
|
|
575
577
|
var m;
|
|
576
|
-
a.id && (
|
|
578
|
+
a.id && (u.removeComponentInstance(a.id), (m = A.value) != null && m.defaultSchema.input && a.noFormItem !== !0 && u.removeComponentInstance(a.id + "formItem"));
|
|
577
579
|
}
|
|
578
580
|
async function W() {
|
|
579
|
-
var
|
|
580
|
-
if (a = await
|
|
581
|
-
const P =
|
|
582
|
-
|
|
581
|
+
var b, V, y;
|
|
582
|
+
if (a = await E(a), typeof ((b = a.componentProps) == null ? void 0 : b.defaultValue) < "u") {
|
|
583
|
+
const P = u.isDesignMode.value ? (V = a.componentProps) == null ? void 0 : V.defaultValue : s[a.field] ?? ((y = a.componentProps) == null ? void 0 : y.defaultValue);
|
|
584
|
+
S(z(P));
|
|
583
585
|
}
|
|
584
586
|
if (a.type === "slot") {
|
|
585
587
|
const P = a.slotName;
|
|
586
588
|
if (!P) return;
|
|
587
|
-
|
|
589
|
+
x.value = ee({
|
|
588
590
|
setup() {
|
|
589
591
|
return () => T(l, P, {
|
|
590
592
|
componentSchema: a,
|
|
@@ -601,21 +603,21 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
601
603
|
}
|
|
602
604
|
if (typeof m == "function") {
|
|
603
605
|
const P = await m();
|
|
604
|
-
|
|
606
|
+
x.value = P.default ?? P;
|
|
605
607
|
} else
|
|
606
|
-
|
|
608
|
+
x.value = m;
|
|
607
609
|
}
|
|
608
|
-
function
|
|
609
|
-
|
|
610
|
+
function S(m) {
|
|
611
|
+
d("update:modelValue", m), d("change", m), a.field && (s[a.field] = m), re.emit("updateformData" + t.id, s);
|
|
610
612
|
}
|
|
611
613
|
function U(m) {
|
|
612
|
-
|
|
614
|
+
d("update:dynamicId", m);
|
|
613
615
|
}
|
|
614
616
|
let q = null;
|
|
615
|
-
return
|
|
617
|
+
return N(
|
|
616
618
|
() => a,
|
|
617
619
|
async (m) => {
|
|
618
|
-
const
|
|
620
|
+
const b = JSON.stringify({
|
|
619
621
|
...m,
|
|
620
622
|
children: void 0,
|
|
621
623
|
componentProps: {
|
|
@@ -623,33 +625,33 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
623
625
|
options: null
|
|
624
626
|
}
|
|
625
627
|
});
|
|
626
|
-
if (
|
|
628
|
+
if (b === q)
|
|
627
629
|
return !1;
|
|
628
|
-
q =
|
|
630
|
+
q = b, W();
|
|
629
631
|
},
|
|
630
632
|
{
|
|
631
633
|
immediate: !0,
|
|
632
634
|
deep: !0
|
|
633
635
|
}
|
|
634
|
-
), Se(
|
|
636
|
+
), Se(g), (m, b) => {
|
|
635
637
|
var y;
|
|
636
638
|
const V = Ve("ENode");
|
|
637
|
-
return
|
|
639
|
+
return x.value && C.value ? (k(), K(Ke, {
|
|
638
640
|
key: 0,
|
|
639
|
-
hasFormItem: R(a).noFormItem !== !0 && ((y =
|
|
641
|
+
hasFormItem: R(a).noFormItem !== !0 && ((y = A.value) == null ? void 0 : y.defaultSchema.input),
|
|
640
642
|
formItemProps: i.value,
|
|
641
643
|
onUpdateFormItemRef: h
|
|
642
644
|
}, {
|
|
643
645
|
default: $(() => [
|
|
644
|
-
(
|
|
646
|
+
(k(), K(Fe(x.value), pe({
|
|
645
647
|
ref_key: "componentInstance",
|
|
646
648
|
ref: O,
|
|
647
|
-
onVnodeMounted:
|
|
649
|
+
onVnodeMounted: c,
|
|
648
650
|
model: R(s)
|
|
649
651
|
}, { ...F.value }, {
|
|
650
652
|
[F.value.bindModel]: n.value,
|
|
651
|
-
["onUpdate:" + F.value.bindModel]:
|
|
652
|
-
[`onUpdate:${F.value.bindModel}` || ""]:
|
|
653
|
+
["onUpdate:" + F.value.bindModel]: b[0] || (b[0] = (P) => n.value = P),
|
|
654
|
+
[`onUpdate:${F.value.bindModel}` || ""]: S,
|
|
653
655
|
"onUpdate:dynamicId": U
|
|
654
656
|
}), {
|
|
655
657
|
node: $((P) => [
|
|
@@ -671,53 +673,53 @@ const Ke = /* @__PURE__ */ ee({
|
|
|
671
673
|
}
|
|
672
674
|
});
|
|
673
675
|
function Ze() {
|
|
674
|
-
const e = _(!1), r =
|
|
676
|
+
const e = _(!1), r = xe(), o = _({});
|
|
675
677
|
function t() {
|
|
676
678
|
return new Promise((p) => {
|
|
677
679
|
if (e.value)
|
|
678
680
|
p();
|
|
679
681
|
else {
|
|
680
|
-
const v =
|
|
682
|
+
const v = N(e, () => {
|
|
681
683
|
v(), p();
|
|
682
684
|
});
|
|
683
685
|
}
|
|
684
686
|
});
|
|
685
687
|
}
|
|
686
688
|
async function n(p = "default") {
|
|
687
|
-
var
|
|
689
|
+
var d;
|
|
688
690
|
await t();
|
|
689
|
-
const v = (
|
|
691
|
+
const v = (d = o.value) == null ? void 0 : d[p];
|
|
690
692
|
if (!v) throw new Error(`表单 [name=${p}] 不存在`);
|
|
691
693
|
return v;
|
|
692
694
|
}
|
|
693
695
|
async function s(p, v) {
|
|
694
|
-
const
|
|
695
|
-
return
|
|
696
|
+
const d = await n(p);
|
|
697
|
+
return z(await v(d));
|
|
696
698
|
}
|
|
697
699
|
async function l(p = "default") {
|
|
698
700
|
return await s(p, (v) => v.getData());
|
|
699
701
|
}
|
|
700
|
-
function
|
|
702
|
+
function u(p, v = "default", d = void 0) {
|
|
701
703
|
var O, M;
|
|
702
|
-
if (
|
|
704
|
+
if (d && Object.keys(d).length) {
|
|
703
705
|
let h = function(i) {
|
|
704
706
|
let F = [];
|
|
705
|
-
return i.forEach((
|
|
706
|
-
|
|
707
|
+
return i.forEach((A) => {
|
|
708
|
+
A.children && (F = [...F, ...h(A.children)]), F.push(A);
|
|
707
709
|
}), F;
|
|
708
|
-
},
|
|
709
|
-
var
|
|
710
|
-
let F = h((
|
|
711
|
-
return Object.keys(i).forEach((
|
|
712
|
-
var
|
|
713
|
-
const
|
|
714
|
-
(
|
|
710
|
+
}, x = function(i) {
|
|
711
|
+
var A;
|
|
712
|
+
let F = h((A = d == null ? void 0 : d.schemas[0]) == null ? void 0 : A.children);
|
|
713
|
+
return Object.keys(i).forEach((c) => {
|
|
714
|
+
var S, U, q, m, b, V, y;
|
|
715
|
+
const g = F.find((P) => P.field === c), W = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
716
|
+
(g && (g == null ? void 0 : g.type) === "checkbox" || (g == null ? void 0 : g.type) === "select" && ((S = g == null ? void 0 : g.componentProps) != null && S.multiple) || (g == null ? void 0 : g.type) === "cascader" && !((q = (U = g == null ? void 0 : g.componentProps) == null ? void 0 : U.props) != null && q.multiple) || (g == null ? void 0 : g.type) === "date" && W.includes((m = g == null ? void 0 : g.componentProps) == null ? void 0 : m.type)) && typeof i[c] == "string" ? i[c] = (b = i[c]) == null ? void 0 : b.split(",") : (g == null ? void 0 : g.type) === "cascader" && ((y = (V = g == null ? void 0 : g.componentProps) == null ? void 0 : V.props) != null && y.multiple) && typeof i[c] == "string" ? (i[c].indexOf(";") > -1 ? i[c] = i[c].split(";").map((P) => P.split(",")) : i[c] = i[c].split(","), i[c].indexOf(";") > -1 ? i[c] = i[c].split(";").map((P) => P.split(",")) : i[c] = i[c].split(",")) : ((g == null ? void 0 : g.type) === "upload-image" || (g == null ? void 0 : g.type) === "upload-file") && typeof i[c] == "string" ? i[c] = i[c].split(",").map((P) => ({
|
|
715
717
|
url: P,
|
|
716
718
|
name: P
|
|
717
|
-
})));
|
|
719
|
+
})) : (g == null ? void 0 : g.type) === "number" || (g == null ? void 0 : g.type) === "slider" ? i[c] = Number(i[c]) : (g == null ? void 0 : g.type) === "switch" && (i[c] = i[c].indexOf("true") > -1);
|
|
718
720
|
}), i;
|
|
719
721
|
}(p);
|
|
720
|
-
r.setFormData(
|
|
722
|
+
r.setFormData(x, v);
|
|
721
723
|
const C = (O = o.value) == null ? void 0 : O[v];
|
|
722
724
|
C == null || C.clearValidate();
|
|
723
725
|
} else {
|
|
@@ -732,20 +734,20 @@ function Ze() {
|
|
|
732
734
|
async function I(p) {
|
|
733
735
|
await t();
|
|
734
736
|
const v = {};
|
|
735
|
-
for (const
|
|
736
|
-
const O = o.value[
|
|
737
|
-
O && (v[
|
|
737
|
+
for (const d in o.value) {
|
|
738
|
+
const O = o.value[d];
|
|
739
|
+
O && (v[d] = z(await p(O)));
|
|
738
740
|
}
|
|
739
741
|
return v;
|
|
740
742
|
}
|
|
741
|
-
async function
|
|
743
|
+
async function w() {
|
|
742
744
|
return await I((p) => p.getData());
|
|
743
745
|
}
|
|
744
746
|
function a(p) {
|
|
745
747
|
for (const v in p)
|
|
746
|
-
|
|
748
|
+
u(p[v], v);
|
|
747
749
|
}
|
|
748
|
-
async function
|
|
750
|
+
async function E() {
|
|
749
751
|
return await I(async (p) => (await p.validate(), await p.getData()));
|
|
750
752
|
}
|
|
751
753
|
return {
|
|
@@ -753,11 +755,11 @@ function Ze() {
|
|
|
753
755
|
pageManager: r,
|
|
754
756
|
forms: o,
|
|
755
757
|
getData: l,
|
|
756
|
-
setData:
|
|
758
|
+
setData: u,
|
|
757
759
|
validate: f,
|
|
758
|
-
getForms:
|
|
760
|
+
getForms: w,
|
|
759
761
|
setForms: a,
|
|
760
|
-
validateAll:
|
|
762
|
+
validateAll: E,
|
|
761
763
|
getFormInstance: n
|
|
762
764
|
};
|
|
763
765
|
}
|
|
@@ -775,11 +777,11 @@ const Ge = {
|
|
|
775
777
|
},
|
|
776
778
|
emits: ["change", "ready"],
|
|
777
779
|
setup(e, { expose: r, emit: o }) {
|
|
778
|
-
const t = X(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: l, forms:
|
|
780
|
+
const t = X(() => import("./index-DgcFxYFp.js")), n = o, { ready: s, pageManager: l, forms: u, getData: f, setData: I, validate: w, getForms: a, setForms: E, validateAll: p, getFormInstance: v } = Ze(), d = e, O = j({
|
|
779
781
|
schemas: []
|
|
780
782
|
});
|
|
781
|
-
|
|
782
|
-
() =>
|
|
783
|
+
N(
|
|
784
|
+
() => d.pageSchema,
|
|
783
785
|
(i) => {
|
|
784
786
|
G(O, i);
|
|
785
787
|
},
|
|
@@ -787,8 +789,8 @@ const Ge = {
|
|
|
787
789
|
immediate: !0,
|
|
788
790
|
deep: !0
|
|
789
791
|
}
|
|
790
|
-
),
|
|
791
|
-
() =>
|
|
792
|
+
), N(
|
|
793
|
+
() => d.formData,
|
|
792
794
|
(i) => {
|
|
793
795
|
if (i) {
|
|
794
796
|
let F = h(i);
|
|
@@ -802,22 +804,22 @@ const Ge = {
|
|
|
802
804
|
);
|
|
803
805
|
function M(i) {
|
|
804
806
|
let F = [];
|
|
805
|
-
return i.forEach((
|
|
806
|
-
|
|
807
|
+
return i.forEach((A) => {
|
|
808
|
+
A.children && (F = [...F, ...M(A.children)]), F.push(A);
|
|
807
809
|
}), F;
|
|
808
810
|
}
|
|
809
811
|
function h(i) {
|
|
810
|
-
let F = M(
|
|
811
|
-
return Object.keys(i).forEach((
|
|
812
|
-
var W,
|
|
813
|
-
const
|
|
814
|
-
(
|
|
812
|
+
let F = M(d.pageSchema.schemas[0].children);
|
|
813
|
+
return Object.keys(i).forEach((A) => {
|
|
814
|
+
var W, S, U, q, m, b, V;
|
|
815
|
+
const c = F.find((y) => y.field === A), g = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
816
|
+
(c && (c == null ? void 0 : c.type) === "checkbox" || (c == null ? void 0 : c.type) === "select" && ((W = c == null ? void 0 : c.componentProps) != null && W.multiple) || (c == null ? void 0 : c.type) === "cascader" && !((U = (S = c == null ? void 0 : c.componentProps) == null ? void 0 : S.props) != null && U.multiple) || (c == null ? void 0 : c.type) === "date" && g.includes((q = c == null ? void 0 : c.componentProps) == null ? void 0 : q.type)) && typeof i[A] == "string" ? i[A] = (m = i[A]) == null ? void 0 : m.split(",") : (c == null ? void 0 : c.type) === "cascader" && ((V = (b = c == null ? void 0 : c.componentProps) == null ? void 0 : b.props) != null && V.multiple) && typeof i[A] == "string" ? (i[A].indexOf(";") > -1 ? i[A] = i[A].split(";").map((y) => y.split(",")) : i[A] = i[A].split(","), i[A].indexOf(";") > -1 ? i[A] = i[A].split(";").map((y) => y.split(",")) : i[A] = i[A].split(",")) : ((c == null ? void 0 : c.type) === "upload-image" || (c == null ? void 0 : c.type) === "upload-file") && typeof i[A] == "string" ? i[A] = i[A].split(",").map((y) => ({
|
|
815
817
|
url: y,
|
|
816
818
|
name: y
|
|
817
|
-
})));
|
|
819
|
+
})) : (c == null ? void 0 : c.type) === "number" || (c == null ? void 0 : c.type) === "slider" ? i[A] = Number(i[A]) : (c == null ? void 0 : c.type) === "switch" && (i[A] = i[A].indexOf("true") > -1);
|
|
818
820
|
}), i;
|
|
819
821
|
}
|
|
820
|
-
|
|
822
|
+
N(
|
|
821
823
|
() => O.script,
|
|
822
824
|
(i) => {
|
|
823
825
|
i && l.setMethods(i, !0);
|
|
@@ -825,39 +827,39 @@ const Ge = {
|
|
|
825
827
|
{
|
|
826
828
|
immediate: !0
|
|
827
829
|
}
|
|
828
|
-
), L("slots", Me()), L("pageManager", l), L("forms",
|
|
830
|
+
), L("slots", Me()), L("pageManager", l), L("forms", u), L("pageSchema", O), L(
|
|
829
831
|
"disabled",
|
|
830
|
-
|
|
832
|
+
J(() => d.disabled)
|
|
831
833
|
);
|
|
832
|
-
const
|
|
834
|
+
const D = ae(), x = D == null ? void 0 : D.proxy;
|
|
833
835
|
function C() {
|
|
834
836
|
ne(() => {
|
|
835
|
-
s.value = !0, n("ready", l),
|
|
837
|
+
s.value = !0, n("ready", l), x && l.addComponentInstance("builder", x);
|
|
836
838
|
});
|
|
837
839
|
}
|
|
838
|
-
return re.on("updateformData" +
|
|
840
|
+
return re.on("updateformData" + d.id, (i) => {
|
|
839
841
|
n("change", i);
|
|
840
842
|
}), r({
|
|
841
843
|
ready: s,
|
|
842
844
|
pageManager: l,
|
|
843
845
|
getData: f,
|
|
844
846
|
setData: I,
|
|
845
|
-
validate:
|
|
847
|
+
validate: w,
|
|
846
848
|
getForms: a,
|
|
847
|
-
setForms:
|
|
849
|
+
setForms: E,
|
|
848
850
|
validateAll: p,
|
|
849
851
|
getFormInstance: v
|
|
850
|
-
}), (i, F) => R(B).initialized.value ? (
|
|
852
|
+
}), (i, F) => R(B).initialized.value ? (k(), K(Ae, {
|
|
851
853
|
key: 1,
|
|
852
854
|
onResolve: C
|
|
853
855
|
}, {
|
|
854
856
|
default: $(() => [
|
|
855
857
|
Z("div", Qe, [
|
|
856
|
-
(
|
|
857
|
-
id:
|
|
858
|
-
key:
|
|
859
|
-
sourceDateUrl:
|
|
860
|
-
componentSchema:
|
|
858
|
+
(k(!0), me(Re, null, $e(O.schemas, (A, c) => (k(), K(R(qe), {
|
|
859
|
+
id: d.id,
|
|
860
|
+
key: c,
|
|
861
|
+
sourceDateUrl: d.sourceDateUrl,
|
|
862
|
+
componentSchema: A
|
|
861
863
|
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
862
864
|
])
|
|
863
865
|
]),
|
|
@@ -867,18 +869,18 @@ const Ge = {
|
|
|
867
869
|
])
|
|
868
870
|
]),
|
|
869
871
|
_: 1
|
|
870
|
-
})) : (
|
|
872
|
+
})) : (k(), me("div", Ge));
|
|
871
873
|
}
|
|
872
874
|
});
|
|
873
875
|
function ve(e) {
|
|
874
|
-
return
|
|
876
|
+
return ke() ? (Ue(e), !0) : !1;
|
|
875
877
|
}
|
|
876
878
|
function je(e) {
|
|
877
879
|
let r = 0, o, t;
|
|
878
880
|
const n = () => {
|
|
879
881
|
r -= 1, t && r <= 0 && (t.stop(), o = void 0, t = void 0);
|
|
880
882
|
};
|
|
881
|
-
return (...s) => (r += 1, t || (t =
|
|
883
|
+
return (...s) => (r += 1, t || (t = Ne(!0), o = t.run(() => e(...s))), ve(n), o);
|
|
882
884
|
}
|
|
883
885
|
function te(e) {
|
|
884
886
|
return typeof e == "function" ? e() : R(e);
|
|
@@ -898,9 +900,9 @@ function lt(e = !1, r = {}) {
|
|
|
898
900
|
truthyValue: o = !0,
|
|
899
901
|
falsyValue: t = !1
|
|
900
902
|
} = r, n = Be(e), s = _(e);
|
|
901
|
-
function l(
|
|
903
|
+
function l(u) {
|
|
902
904
|
if (arguments.length)
|
|
903
|
-
return s.value =
|
|
905
|
+
return s.value = u, s.value;
|
|
904
906
|
{
|
|
905
907
|
const f = te(o);
|
|
906
908
|
return s.value = s.value === f ? te(t) : f, s.value;
|
|
@@ -909,7 +911,7 @@ function lt(e = !1, r = {}) {
|
|
|
909
911
|
return n ? l : [s, l];
|
|
910
912
|
}
|
|
911
913
|
function Ut(e, r, o) {
|
|
912
|
-
const t =
|
|
914
|
+
const t = N(e, (...n) => (ne(() => t()), r(...n)), o);
|
|
913
915
|
return t;
|
|
914
916
|
}
|
|
915
917
|
const ce = et ? window : void 0;
|
|
@@ -924,15 +926,15 @@ function it(...e) {
|
|
|
924
926
|
return rt;
|
|
925
927
|
Array.isArray(o) || (o = [o]), Array.isArray(t) || (t = [t]);
|
|
926
928
|
const s = [], l = () => {
|
|
927
|
-
s.forEach((
|
|
928
|
-
},
|
|
929
|
+
s.forEach((w) => w()), s.length = 0;
|
|
930
|
+
}, u = (w, a, E, p) => (w.addEventListener(a, E, p), () => w.removeEventListener(a, E, p)), f = N(
|
|
929
931
|
() => [Y(r), te(n)],
|
|
930
|
-
([
|
|
931
|
-
if (l(), !
|
|
932
|
+
([w, a]) => {
|
|
933
|
+
if (l(), !w)
|
|
932
934
|
return;
|
|
933
|
-
const
|
|
935
|
+
const E = ot(a) ? { ...a } : a;
|
|
934
936
|
s.push(
|
|
935
|
-
...o.flatMap((p) => t.map((v) =>
|
|
937
|
+
...o.flatMap((p) => t.map((v) => u(w, p, v, E)))
|
|
936
938
|
);
|
|
937
939
|
},
|
|
938
940
|
{ immediate: !0, flush: "post" }
|
|
@@ -951,10 +953,10 @@ function Ie(...e) {
|
|
|
951
953
|
target: n = ce,
|
|
952
954
|
eventName: s = "keydown",
|
|
953
955
|
passive: l = !1,
|
|
954
|
-
dedupe:
|
|
956
|
+
dedupe: u = !1
|
|
955
957
|
} = t, f = ct(r);
|
|
956
|
-
return it(n, s, (
|
|
957
|
-
|
|
958
|
+
return it(n, s, (w) => {
|
|
959
|
+
w.repeat && te(u) || f(w) && o(w);
|
|
958
960
|
}, l);
|
|
959
961
|
}
|
|
960
962
|
function de(e, r, o = {}) {
|
|
@@ -971,7 +973,7 @@ function ut() {
|
|
|
971
973
|
}
|
|
972
974
|
function dt(e) {
|
|
973
975
|
const r = ut();
|
|
974
|
-
return
|
|
976
|
+
return J(() => (r.value, !!e()));
|
|
975
977
|
}
|
|
976
978
|
function ft(e) {
|
|
977
979
|
return JSON.parse(JSON.stringify(e));
|
|
@@ -979,111 +981,111 @@ function ft(e) {
|
|
|
979
981
|
function pt(e, r, o = {}) {
|
|
980
982
|
const { window: t = ce, ...n } = o;
|
|
981
983
|
let s;
|
|
982
|
-
const l = dt(() => t && "ResizeObserver" in t),
|
|
984
|
+
const l = dt(() => t && "ResizeObserver" in t), u = () => {
|
|
983
985
|
s && (s.disconnect(), s = void 0);
|
|
984
|
-
}, f =
|
|
986
|
+
}, f = J(() => {
|
|
985
987
|
const a = te(e);
|
|
986
|
-
return Array.isArray(a) ? a.map((
|
|
987
|
-
}), I =
|
|
988
|
+
return Array.isArray(a) ? a.map((E) => Y(E)) : [Y(a)];
|
|
989
|
+
}), I = N(
|
|
988
990
|
f,
|
|
989
991
|
(a) => {
|
|
990
|
-
if (
|
|
992
|
+
if (u(), l.value && t) {
|
|
991
993
|
s = new ResizeObserver(r);
|
|
992
|
-
for (const
|
|
993
|
-
|
|
994
|
+
for (const E of a)
|
|
995
|
+
E && s.observe(E, n);
|
|
994
996
|
}
|
|
995
997
|
},
|
|
996
998
|
{ immediate: !0, flush: "post" }
|
|
997
|
-
),
|
|
998
|
-
|
|
999
|
+
), w = () => {
|
|
1000
|
+
u(), I();
|
|
999
1001
|
};
|
|
1000
|
-
return ve(
|
|
1002
|
+
return ve(w), {
|
|
1001
1003
|
isSupported: l,
|
|
1002
|
-
stop:
|
|
1004
|
+
stop: w
|
|
1003
1005
|
};
|
|
1004
1006
|
}
|
|
1005
1007
|
function Tt(e, r = { width: 0, height: 0 }, o = {}) {
|
|
1006
|
-
const { window: t = ce, box: n = "content-box" } = o, s =
|
|
1007
|
-
var a,
|
|
1008
|
-
return (
|
|
1009
|
-
}), l = _(r.width),
|
|
1008
|
+
const { window: t = ce, box: n = "content-box" } = o, s = J(() => {
|
|
1009
|
+
var a, E;
|
|
1010
|
+
return (E = (a = Y(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : E.includes("svg");
|
|
1011
|
+
}), l = _(r.width), u = _(r.height), { stop: f } = pt(
|
|
1010
1012
|
e,
|
|
1011
1013
|
([a]) => {
|
|
1012
|
-
const
|
|
1014
|
+
const E = n === "border-box" ? a.borderBoxSize : n === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
1013
1015
|
if (t && s.value) {
|
|
1014
1016
|
const p = Y(e);
|
|
1015
1017
|
if (p) {
|
|
1016
1018
|
const v = p.getBoundingClientRect();
|
|
1017
|
-
l.value = v.width,
|
|
1019
|
+
l.value = v.width, u.value = v.height;
|
|
1018
1020
|
}
|
|
1019
|
-
} else if (
|
|
1020
|
-
const p = Array.isArray(
|
|
1021
|
-
l.value = p.reduce((v, { inlineSize:
|
|
1021
|
+
} else if (E) {
|
|
1022
|
+
const p = Array.isArray(E) ? E : [E];
|
|
1023
|
+
l.value = p.reduce((v, { inlineSize: d }) => v + d, 0), u.value = p.reduce((v, { blockSize: d }) => v + d, 0);
|
|
1022
1024
|
} else
|
|
1023
|
-
l.value = a.contentRect.width,
|
|
1025
|
+
l.value = a.contentRect.width, u.value = a.contentRect.height;
|
|
1024
1026
|
},
|
|
1025
1027
|
o
|
|
1026
1028
|
);
|
|
1027
1029
|
at(() => {
|
|
1028
1030
|
const a = Y(e);
|
|
1029
|
-
a && (l.value = "offsetWidth" in a ? a.offsetWidth : r.width,
|
|
1031
|
+
a && (l.value = "offsetWidth" in a ? a.offsetWidth : r.width, u.value = "offsetHeight" in a ? a.offsetHeight : r.height);
|
|
1030
1032
|
});
|
|
1031
|
-
const I =
|
|
1033
|
+
const I = N(
|
|
1032
1034
|
() => Y(e),
|
|
1033
1035
|
(a) => {
|
|
1034
|
-
l.value = a ? r.width : 0,
|
|
1036
|
+
l.value = a ? r.width : 0, u.value = a ? r.height : 0;
|
|
1035
1037
|
}
|
|
1036
1038
|
);
|
|
1037
|
-
function
|
|
1039
|
+
function w() {
|
|
1038
1040
|
f(), I();
|
|
1039
1041
|
}
|
|
1040
1042
|
return {
|
|
1041
1043
|
width: l,
|
|
1042
|
-
height:
|
|
1043
|
-
stop:
|
|
1044
|
+
height: u,
|
|
1045
|
+
stop: w
|
|
1044
1046
|
};
|
|
1045
1047
|
}
|
|
1046
1048
|
function Lt(e, r, o, t = {}) {
|
|
1047
1049
|
var n, s, l;
|
|
1048
1050
|
const {
|
|
1049
|
-
clone:
|
|
1051
|
+
clone: u = !1,
|
|
1050
1052
|
passive: f = !1,
|
|
1051
1053
|
eventName: I,
|
|
1052
|
-
deep:
|
|
1054
|
+
deep: w = !1,
|
|
1053
1055
|
defaultValue: a,
|
|
1054
|
-
shouldEmit:
|
|
1056
|
+
shouldEmit: E
|
|
1055
1057
|
} = t, p = ae(), v = o || (p == null ? void 0 : p.emit) || ((n = p == null ? void 0 : p.$emit) == null ? void 0 : n.bind(p)) || ((l = (s = p == null ? void 0 : p.proxy) == null ? void 0 : s.$emit) == null ? void 0 : l.bind(p == null ? void 0 : p.proxy));
|
|
1056
|
-
let
|
|
1057
|
-
r || (r = "modelValue"),
|
|
1058
|
-
const O = (
|
|
1059
|
-
|
|
1058
|
+
let d = I;
|
|
1059
|
+
r || (r = "modelValue"), d = d || `update:${r.toString()}`;
|
|
1060
|
+
const O = (D) => u ? typeof u == "function" ? u(D) : ft(D) : D, M = () => tt(e[r]) ? O(e[r]) : a, h = (D) => {
|
|
1061
|
+
E ? E(D) && v(d, D) : v(d, D);
|
|
1060
1062
|
};
|
|
1061
1063
|
if (f) {
|
|
1062
|
-
const
|
|
1064
|
+
const D = M(), x = _(D);
|
|
1063
1065
|
let C = !1;
|
|
1064
|
-
return
|
|
1066
|
+
return N(
|
|
1065
1067
|
() => e[r],
|
|
1066
1068
|
(i) => {
|
|
1067
|
-
C || (C = !0,
|
|
1069
|
+
C || (C = !0, x.value = O(i), ne(() => C = !1));
|
|
1068
1070
|
}
|
|
1069
|
-
),
|
|
1070
|
-
|
|
1071
|
+
), N(
|
|
1072
|
+
x,
|
|
1071
1073
|
(i) => {
|
|
1072
|
-
!C && (i !== e[r] ||
|
|
1074
|
+
!C && (i !== e[r] || w) && h(i);
|
|
1073
1075
|
},
|
|
1074
|
-
{ deep:
|
|
1075
|
-
),
|
|
1076
|
+
{ deep: w }
|
|
1077
|
+
), x;
|
|
1076
1078
|
} else
|
|
1077
|
-
return
|
|
1079
|
+
return J({
|
|
1078
1080
|
get() {
|
|
1079
1081
|
return M();
|
|
1080
1082
|
},
|
|
1081
|
-
set(
|
|
1082
|
-
h(
|
|
1083
|
+
set(D) {
|
|
1084
|
+
h(D);
|
|
1083
1085
|
}
|
|
1084
1086
|
});
|
|
1085
1087
|
}
|
|
1086
|
-
function
|
|
1088
|
+
function zt() {
|
|
1087
1089
|
const { isDark: e } = ue(), r = lt(e);
|
|
1088
1090
|
return {
|
|
1089
1091
|
isDark: e,
|
|
@@ -1094,7 +1096,7 @@ function mt() {
|
|
|
1094
1096
|
const e = _(!1);
|
|
1095
1097
|
return he(() => {
|
|
1096
1098
|
ht(e), vt(e);
|
|
1097
|
-
}),
|
|
1099
|
+
}), N(
|
|
1098
1100
|
() => e.value,
|
|
1099
1101
|
() => {
|
|
1100
1102
|
e.value ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
@@ -1122,8 +1124,8 @@ function vt(e) {
|
|
|
1122
1124
|
o.disconnect();
|
|
1123
1125
|
});
|
|
1124
1126
|
}
|
|
1125
|
-
function
|
|
1126
|
-
const e = _(1), r = _(!1), { isDark: o } = mt(), { pressSpace: t, pressShift: n, pressCtrl: s } =
|
|
1127
|
+
function gt() {
|
|
1128
|
+
const e = _(1), r = _(!1), { isDark: o } = mt(), { pressSpace: t, pressShift: n, pressCtrl: s } = yt();
|
|
1127
1129
|
return {
|
|
1128
1130
|
canvasScale: e,
|
|
1129
1131
|
pressSpace: t,
|
|
@@ -1133,8 +1135,8 @@ function yt() {
|
|
|
1133
1135
|
isDark: o
|
|
1134
1136
|
};
|
|
1135
1137
|
}
|
|
1136
|
-
const ue = je(
|
|
1137
|
-
function
|
|
1138
|
+
const ue = je(gt);
|
|
1139
|
+
function yt() {
|
|
1138
1140
|
const e = _(!1), r = _(!1), o = _(!1);
|
|
1139
1141
|
return de(" ", () => {
|
|
1140
1142
|
e.value = !0;
|
|
@@ -1150,7 +1152,7 @@ function gt() {
|
|
|
1150
1152
|
o.value = !1;
|
|
1151
1153
|
}), { pressSpace: e, pressShift: r, pressCtrl: o };
|
|
1152
1154
|
}
|
|
1153
|
-
function
|
|
1155
|
+
function Jt(e) {
|
|
1154
1156
|
const { pressSpace: r } = ue(), o = new Image(1, 1);
|
|
1155
1157
|
o.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
1156
1158
|
let t = 0, n = 0;
|
|
@@ -1161,13 +1163,13 @@ function zt(e) {
|
|
|
1161
1163
|
function l(f) {
|
|
1162
1164
|
if (f.preventDefault(), !f.x || !f.y || !r.value)
|
|
1163
1165
|
return;
|
|
1164
|
-
const I = f.x - t,
|
|
1165
|
-
t = f.x, n = f.y, e.value && (e.value.scrollTop -=
|
|
1166
|
+
const I = f.x - t, w = f.y - n;
|
|
1167
|
+
t = f.x, n = f.y, e.value && (e.value.scrollTop -= w, e.value.scrollLeft -= I);
|
|
1166
1168
|
}
|
|
1167
|
-
function
|
|
1169
|
+
function u() {
|
|
1168
1170
|
r.value = !1;
|
|
1169
1171
|
}
|
|
1170
|
-
return { handleElementDragStart: s, handleElementDrag: l, handleElementDragEnd:
|
|
1172
|
+
return { handleElementDragStart: s, handleElementDrag: l, handleElementDragEnd: u };
|
|
1171
1173
|
}
|
|
1172
1174
|
function Wt(e) {
|
|
1173
1175
|
const { pressCtrl: r, canvasScale: o, disabledZoom: t } = ue();
|
|
@@ -1178,7 +1180,7 @@ function Wt(e) {
|
|
|
1178
1180
|
let l = 0;
|
|
1179
1181
|
s.deltaY < 0 ? l = o.value + 0.05 : l = o.value - 0.05, !(l > 150 || l < 0.5) && (o.value = l);
|
|
1180
1182
|
}
|
|
1181
|
-
return
|
|
1183
|
+
return N(
|
|
1182
1184
|
() => o.value,
|
|
1183
1185
|
(s) => {
|
|
1184
1186
|
e.value && !t.value && (e.value.style.transform = `scale(${s})`);
|
|
@@ -1201,47 +1203,47 @@ function Ht(e, r = 16.66) {
|
|
|
1201
1203
|
const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, Dt = /* @__PURE__ */ ee({
|
|
1202
1204
|
__name: "index",
|
|
1203
1205
|
setup(e, { expose: r }) {
|
|
1204
|
-
const o = B.getComponent("monacoEditor"), t = B.getComponent("modal"), n = _(null), s = _(!1), l = _(!1),
|
|
1206
|
+
const o = B.getComponent("monacoEditor"), t = B.getComponent("modal"), n = _(null), s = _(!1), l = _(!1), u = _({}), f = Q("pageSchema"), I = _(null), w = _("");
|
|
1205
1207
|
function a() {
|
|
1206
1208
|
l.value = !1;
|
|
1207
1209
|
}
|
|
1208
|
-
function
|
|
1210
|
+
function E() {
|
|
1209
1211
|
s.value = !1;
|
|
1210
1212
|
}
|
|
1211
1213
|
function p() {
|
|
1212
|
-
s.value = !0,
|
|
1214
|
+
s.value = !0, w.value = ie();
|
|
1213
1215
|
}
|
|
1214
1216
|
async function v() {
|
|
1215
1217
|
try {
|
|
1216
|
-
let
|
|
1217
|
-
if (!Object.keys(
|
|
1218
|
+
let d = await I.value.validateAll();
|
|
1219
|
+
if (!Object.keys(d).length) {
|
|
1218
1220
|
alert("请添加表单组件后再尝试!");
|
|
1219
1221
|
return;
|
|
1220
1222
|
}
|
|
1221
|
-
Object.keys(
|
|
1223
|
+
Object.keys(d).length === 1 && (d = d.default), u.value = JSON.stringify(d, null, 2), ne(() => {
|
|
1222
1224
|
var O;
|
|
1223
|
-
(O = n.value) == null || O.setValue(
|
|
1225
|
+
(O = n.value) == null || O.setValue(u.value);
|
|
1224
1226
|
}), l.value = !0;
|
|
1225
|
-
} catch (
|
|
1226
|
-
console.error(
|
|
1227
|
+
} catch (d) {
|
|
1228
|
+
console.error(d);
|
|
1227
1229
|
}
|
|
1228
1230
|
}
|
|
1229
1231
|
return r({
|
|
1230
1232
|
handleOpen: p
|
|
1231
|
-
}), (
|
|
1233
|
+
}), (d, O) => (k(), K(R(t), {
|
|
1232
1234
|
modelValue: s.value,
|
|
1233
1235
|
"onUpdate:modelValue": O[1] || (O[1] = (M) => s.value = M),
|
|
1234
1236
|
title: "预览",
|
|
1235
1237
|
class: "w-900px",
|
|
1236
1238
|
width: "900px",
|
|
1237
|
-
onClose:
|
|
1239
|
+
onClose: E,
|
|
1238
1240
|
onOk: v,
|
|
1239
1241
|
okText: "表单数据"
|
|
1240
1242
|
}, {
|
|
1241
1243
|
default: $(() => [
|
|
1242
1244
|
Z("div", wt, [
|
|
1243
|
-
(
|
|
1244
|
-
key:
|
|
1245
|
+
(k(), K(R(Xe), {
|
|
1246
|
+
key: w.value,
|
|
1245
1247
|
ref_key: "kb",
|
|
1246
1248
|
ref: I,
|
|
1247
1249
|
"page-schema": R(f)
|
|
@@ -1263,7 +1265,7 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1263
1265
|
autoToggleTheme: "",
|
|
1264
1266
|
readOnly: "",
|
|
1265
1267
|
class: "h-full editor",
|
|
1266
|
-
"model-value":
|
|
1268
|
+
"model-value": u.value
|
|
1267
1269
|
}, null, 8, ["model-value"])
|
|
1268
1270
|
])
|
|
1269
1271
|
]),
|
|
@@ -1277,7 +1279,7 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1277
1279
|
}), At = {
|
|
1278
1280
|
key: 0,
|
|
1279
1281
|
class: "epic-loading-box"
|
|
1280
|
-
}, Et = { class: "epic-designer-main" },
|
|
1282
|
+
}, Et = { class: "epic-designer-main" }, xt = { class: "epic-header-container" }, It = { class: "epic-loading-box" }, Kt = /* @__PURE__ */ ee({
|
|
1281
1283
|
__name: "designer",
|
|
1282
1284
|
props: {
|
|
1283
1285
|
disabledZoom: { type: Boolean, default: !1 },
|
|
@@ -1300,7 +1302,7 @@ const wt = { class: "min-w-750px rounded" }, St = { class: "h-full rounded" }, D
|
|
|
1300
1302
|
"updateSourceData"
|
|
1301
1303
|
],
|
|
1302
1304
|
setup(e, { expose: r, emit: o }) {
|
|
1303
|
-
const t = X(() => import("./index-C-XUgjda.js")), n = X(() => import("./index-ASoFJnMl.js")), s = X(() => import("./index-
|
|
1305
|
+
const t = X(() => import("./index-C-XUgjda.js")), n = X(() => import("./index-ASoFJnMl.js")), s = X(() => import("./index-fHt4-rMq.js")), l = X(() => import("./index-ooVzYa5L.js")), u = X(() => import("./index-DgcFxYFp.js")), f = xe(), I = He(), w = e;
|
|
1304
1306
|
let a = {
|
|
1305
1307
|
schemas: [
|
|
1306
1308
|
{
|
|
@@ -1348,79 +1350,79 @@ defineExpose({
|
|
|
1348
1350
|
})`
|
|
1349
1351
|
};
|
|
1350
1352
|
le(() => {
|
|
1351
|
-
if (
|
|
1352
|
-
a =
|
|
1353
|
+
if (w.defaultSchema) {
|
|
1354
|
+
a = w.defaultSchema;
|
|
1353
1355
|
return;
|
|
1354
1356
|
}
|
|
1355
|
-
|
|
1357
|
+
w.source && B.setSourceData(w.source), w.formMode && (a.schemas = B.formSchemas);
|
|
1356
1358
|
}), f.setDesignMode(), f.setDefaultComponentIds(a.schemas);
|
|
1357
|
-
const
|
|
1359
|
+
const E = o, p = _(null), v = j({
|
|
1358
1360
|
checkedNode: null,
|
|
1359
1361
|
hoverNode: null,
|
|
1360
1362
|
disableHover: !1,
|
|
1361
1363
|
matched: []
|
|
1362
|
-
}),
|
|
1364
|
+
}), d = j({
|
|
1363
1365
|
schemas: [],
|
|
1364
1366
|
script: a.script
|
|
1365
1367
|
}), { disabledZoom: O } = ue();
|
|
1366
1368
|
le(() => {
|
|
1367
|
-
O.value =
|
|
1369
|
+
O.value = w.disabledZoom;
|
|
1368
1370
|
}), le(() => {
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1371
|
-
}), L("pageSchema",
|
|
1371
|
+
const S = d.script;
|
|
1372
|
+
S && S !== "" && f.setMethods(S);
|
|
1373
|
+
}), L("pageSchema", d), L("revoke", I), L("pageManager", f), L(
|
|
1372
1374
|
"designerProps",
|
|
1373
|
-
|
|
1375
|
+
J(() => w)
|
|
1374
1376
|
), L("designer", {
|
|
1375
1377
|
setCheckedNode: h,
|
|
1376
|
-
setHoverNode:
|
|
1378
|
+
setHoverNode: D,
|
|
1377
1379
|
setDisableHover: C,
|
|
1378
|
-
handleToggleDeviceMode:
|
|
1379
|
-
reset:
|
|
1380
|
+
handleToggleDeviceMode: g,
|
|
1381
|
+
reset: A,
|
|
1380
1382
|
state: v
|
|
1381
|
-
}), re.on("saveSourceData", (
|
|
1382
|
-
|
|
1383
|
-
}), re.on("deleteSourceData", (
|
|
1384
|
-
|
|
1385
|
-
}), re.on("updateSourceData", (
|
|
1386
|
-
|
|
1383
|
+
}), re.on("saveSourceData", (S) => {
|
|
1384
|
+
E("saveSourceData", S);
|
|
1385
|
+
}), re.on("deleteSourceData", (S) => {
|
|
1386
|
+
E("deleteSourceData", S);
|
|
1387
|
+
}), re.on("updateSourceData", (S) => {
|
|
1388
|
+
E("updateSourceData", S);
|
|
1387
1389
|
});
|
|
1388
1390
|
function M() {
|
|
1389
|
-
|
|
1391
|
+
d.schemas = z(a.schemas), h(d.schemas[0]), I.push(d.schemas, "初始化撤销功能");
|
|
1390
1392
|
}
|
|
1391
|
-
async function h(
|
|
1392
|
-
v.checkedNode =
|
|
1393
|
+
async function h(S = d.schemas[0]) {
|
|
1394
|
+
v.checkedNode = S, v.matched = ze(d.schemas, S.id);
|
|
1393
1395
|
}
|
|
1394
|
-
async function S
|
|
1396
|
+
async function D(S = null) {
|
|
1395
1397
|
var U;
|
|
1396
|
-
if (!
|
|
1398
|
+
if (!S || v.disableHover)
|
|
1397
1399
|
return v.hoverNode = null, !1;
|
|
1398
|
-
if ((
|
|
1400
|
+
if ((S == null ? void 0 : S.id) === ((U = v.hoverNode) == null ? void 0 : U.id))
|
|
1399
1401
|
return !1;
|
|
1400
|
-
v.hoverNode =
|
|
1402
|
+
v.hoverNode = S;
|
|
1401
1403
|
}
|
|
1402
|
-
function
|
|
1404
|
+
function x() {
|
|
1403
1405
|
ne(() => {
|
|
1404
|
-
|
|
1406
|
+
E("ready", { pageManager: f });
|
|
1405
1407
|
});
|
|
1406
1408
|
}
|
|
1407
|
-
async function C(
|
|
1408
|
-
v.disableHover =
|
|
1409
|
+
async function C(S = !1) {
|
|
1410
|
+
v.disableHover = S;
|
|
1409
1411
|
}
|
|
1410
|
-
function i(
|
|
1411
|
-
G(
|
|
1412
|
+
function i(S) {
|
|
1413
|
+
G(d, z(S));
|
|
1412
1414
|
}
|
|
1413
1415
|
function F() {
|
|
1414
|
-
return
|
|
1416
|
+
return ye(d);
|
|
1415
1417
|
}
|
|
1416
|
-
function
|
|
1417
|
-
Ee(
|
|
1418
|
+
function A() {
|
|
1419
|
+
Ee(d.schemas, a.schemas) && d.script === a.script || (G(d.schemas, a.schemas), d.script = a.script, h(d.schemas[0]), I.push(d.schemas, "重置操作"), E("reset", d));
|
|
1418
1420
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1421
|
+
function c() {
|
|
1422
|
+
E("save", ye(d));
|
|
1421
1423
|
}
|
|
1422
|
-
function
|
|
1423
|
-
|
|
1424
|
+
function g(S) {
|
|
1425
|
+
E("toggleDeviceMode", S);
|
|
1424
1426
|
}
|
|
1425
1427
|
function W() {
|
|
1426
1428
|
p.value.handleOpen();
|
|
@@ -1429,45 +1431,45 @@ defineExpose({
|
|
|
1429
1431
|
revoke: I,
|
|
1430
1432
|
setData: i,
|
|
1431
1433
|
getData: F,
|
|
1432
|
-
reset:
|
|
1434
|
+
reset: A,
|
|
1433
1435
|
preview: W
|
|
1434
|
-
}), (
|
|
1436
|
+
}), (S, U) => R(B).initialized.value ? (k(), K(Ae, {
|
|
1435
1437
|
key: 1,
|
|
1436
|
-
onResolve:
|
|
1438
|
+
onResolve: x
|
|
1437
1439
|
}, {
|
|
1438
1440
|
default: $(() => [
|
|
1439
1441
|
Z("div", Et, [
|
|
1440
|
-
Z("div",
|
|
1441
|
-
T(
|
|
1442
|
-
|
|
1442
|
+
Z("div", xt, [
|
|
1443
|
+
T(S.$slots, "header", {}, () => [
|
|
1444
|
+
w.hiddenHeader ? De("", !0) : (k(), K(R(t), {
|
|
1443
1445
|
key: 0,
|
|
1444
1446
|
onPreview: W,
|
|
1445
|
-
onSave:
|
|
1447
|
+
onSave: c
|
|
1446
1448
|
}, {
|
|
1447
1449
|
header: $(() => [
|
|
1448
|
-
T(
|
|
1450
|
+
T(S.$slots, "header-prefix")
|
|
1449
1451
|
]),
|
|
1450
1452
|
prefix: $(() => [
|
|
1451
|
-
T(
|
|
1453
|
+
T(S.$slots, "header-prefix")
|
|
1452
1454
|
]),
|
|
1453
1455
|
title: $(() => [
|
|
1454
|
-
T(
|
|
1456
|
+
T(S.$slots, "header-title")
|
|
1455
1457
|
]),
|
|
1456
1458
|
"right-prefix": $(() => [
|
|
1457
|
-
T(
|
|
1459
|
+
T(S.$slots, "header-right-prefix")
|
|
1458
1460
|
]),
|
|
1459
1461
|
"right-action": $(() => [
|
|
1460
|
-
T(
|
|
1462
|
+
T(S.$slots, "header-right-action")
|
|
1461
1463
|
]),
|
|
1462
1464
|
"right-suffix": $(() => [
|
|
1463
|
-
T(
|
|
1465
|
+
T(S.$slots, "header-right-suffix")
|
|
1464
1466
|
]),
|
|
1465
1467
|
_: 3
|
|
1466
1468
|
}))
|
|
1467
1469
|
])
|
|
1468
1470
|
]),
|
|
1469
1471
|
Z("div", {
|
|
1470
|
-
class: Te(["epic-split-view-container", { "hidden-header":
|
|
1472
|
+
class: Te(["epic-split-view-container", { "hidden-header": S.hiddenHeader }])
|
|
1471
1473
|
}, [
|
|
1472
1474
|
H(R(n)),
|
|
1473
1475
|
H(R(s)),
|
|
@@ -1481,14 +1483,14 @@ defineExpose({
|
|
|
1481
1483
|
]),
|
|
1482
1484
|
fallback: $(() => [
|
|
1483
1485
|
Z("div", It, [
|
|
1484
|
-
H(R(
|
|
1486
|
+
H(R(u))
|
|
1485
1487
|
])
|
|
1486
1488
|
]),
|
|
1487
1489
|
_: 3
|
|
1488
|
-
})) : (
|
|
1490
|
+
})) : (k(), me("div", At));
|
|
1489
1491
|
}
|
|
1490
|
-
}),
|
|
1491
|
-
component: async () => await import("./index-
|
|
1492
|
+
}), bt = {
|
|
1493
|
+
component: async () => await import("./index-CbiXuuBq.js"),
|
|
1492
1494
|
defaultSchema: {
|
|
1493
1495
|
label: "代码编辑器",
|
|
1494
1496
|
type: "monacoEditor",
|
|
@@ -1538,11 +1540,11 @@ defineExpose({
|
|
|
1538
1540
|
}
|
|
1539
1541
|
};
|
|
1540
1542
|
function _t(e) {
|
|
1541
|
-
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-
|
|
1543
|
+
e.component("EInputSize", async () => await import("./index-C4sdhgF2.js")), e.component("EColEditor", async () => await import("./index-D9mE7-Ar.js")), e.component("EActionEditor", async () => await import("./index-Cd9n7QSg.js")), e.component("ERuleEditor", async () => await import("./index-B0pq3LvX.js")), e.component("EOptionsEditor", async () => await import("./index-Bm_2TXSs.js")), e.component("ENode", async () => await import("./index-DqXlNyYv.js")), e.component("EDataSource", async () => await import("./index-CCTMCqiz.js")), e.registerActivitybar({
|
|
1542
1544
|
id: "component_view",
|
|
1543
1545
|
title: "组件",
|
|
1544
1546
|
icon: "icon--epic--extension-outline",
|
|
1545
|
-
component: async () => await import("./index-
|
|
1547
|
+
component: async () => await import("./index-BdghL1e1.js")
|
|
1546
1548
|
}), e.registerActivitybar({
|
|
1547
1549
|
id: "outline_view",
|
|
1548
1550
|
title: "大纲",
|
|
@@ -1551,51 +1553,51 @@ function _t(e) {
|
|
|
1551
1553
|
}), e.registerRightSidebar({
|
|
1552
1554
|
id: "attribute_view",
|
|
1553
1555
|
title: "属性",
|
|
1554
|
-
component: async () => await import("./attributeView-
|
|
1556
|
+
component: async () => await import("./attributeView-DPFdUi2O.js")
|
|
1555
1557
|
}), e.registerRightSidebar({
|
|
1556
1558
|
id: "style_view",
|
|
1557
1559
|
title: "样式",
|
|
1558
|
-
component: async () => await import("./styleView-
|
|
1559
|
-
}), [
|
|
1560
|
+
component: async () => await import("./styleView-BC3ElYAX.js")
|
|
1561
|
+
}), [bt, Ct].forEach((o) => {
|
|
1560
1562
|
e.registerComponent(o);
|
|
1561
1563
|
});
|
|
1562
1564
|
}
|
|
1563
1565
|
_t(B);
|
|
1564
1566
|
export {
|
|
1565
|
-
|
|
1567
|
+
Je as A,
|
|
1566
1568
|
se as B,
|
|
1567
1569
|
We as C,
|
|
1568
1570
|
oe as D,
|
|
1569
1571
|
Le as E,
|
|
1570
|
-
|
|
1572
|
+
yt as F,
|
|
1571
1573
|
mt as G,
|
|
1572
1574
|
ht as H,
|
|
1573
|
-
|
|
1575
|
+
gt as I,
|
|
1574
1576
|
qe as _,
|
|
1575
1577
|
Ht as a,
|
|
1576
1578
|
pt as b,
|
|
1577
1579
|
Bt as c,
|
|
1578
1580
|
G as d,
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
+
Jt as e,
|
|
1582
|
+
Nt as f,
|
|
1581
1583
|
Vt as g,
|
|
1582
1584
|
Tt as h,
|
|
1583
1585
|
Wt as i,
|
|
1584
|
-
|
|
1586
|
+
kt as j,
|
|
1585
1587
|
ie as k,
|
|
1586
1588
|
$t as l,
|
|
1587
|
-
|
|
1589
|
+
z as m,
|
|
1588
1590
|
Lt as n,
|
|
1589
1591
|
Ft as o,
|
|
1590
|
-
|
|
1592
|
+
zt as p,
|
|
1591
1593
|
Xe as q,
|
|
1592
1594
|
Kt as r,
|
|
1593
1595
|
Mt as s,
|
|
1594
|
-
|
|
1596
|
+
xe as t,
|
|
1595
1597
|
ue as u,
|
|
1596
1598
|
He as v,
|
|
1597
1599
|
Ut as w,
|
|
1598
1600
|
Ee as x,
|
|
1599
|
-
|
|
1601
|
+
ze as y,
|
|
1600
1602
|
Rt as z
|
|
1601
1603
|
};
|