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