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