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