epic-designer-gold 1.0.8 → 1.0.10
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-DOL6IUO8.cjs → attributeView-BLJcsZMJ.cjs} +1 -1
- package/dist/{attributeView-4j---k7X.js → attributeView-CK7X8evt.js} +1 -1
- package/dist/{index-BBVUGri_.cjs → index-BAdyaDNP.cjs} +1 -1
- package/dist/index-BLrnu25V.js +1427 -0
- package/dist/{index-DiQ4ZTF7.js → index-BQlnwEZk.js} +1 -1
- package/dist/{index-BJHU3Dzu.js → index-BS7DLn57.js} +1 -1
- package/dist/{index-CPkRsFQ7.cjs → index-Bg2Wz9aw.cjs} +1 -1
- package/dist/{index-DzC3poxn.js → index-C_Vm4D43.js} +1 -1
- package/dist/{index--PWf2Ut2.js → index-CpsrriO4.js} +1 -1
- package/dist/{index-Dftp7CV4.cjs → index-Cws26Bdx.cjs} +1 -1
- package/dist/{index-CYxg6AdN.cjs → index-D46qMwz4.cjs} +1 -1
- package/dist/index-DP1V_VDl.cjs +10 -0
- package/dist/index-DYM7GA7s.js +4 -0
- package/dist/{index-zxyA8Keq.js → index-DaFOmX2X.js} +1 -1
- package/dist/{index-DqLjoo13.cjs → index-DxzmiGMB.cjs} +1 -1
- package/dist/{index-B4sqskGf.cjs → index-HUgegsXA.cjs} +1 -1
- package/dist/{index-Cctdx_Vq.js → index-RZhGRdhW.js} +1 -1
- package/dist/{index-Dz59dUur.cjs → index-b_SMxzas.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-DLmxP2vS.js → styleView-Bi4oL4aS.js} +1 -1
- package/dist/{styleView-CNmD046X.cjs → styleView-C1kBC_26.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-CXI_7l7O.js +0 -1422
- package/dist/index-DOZPyH6X.cjs +0 -10
- package/dist/index-JlyEcj-r.js +0 -4
package/dist/index-CXI_7l7O.js
DELETED
|
@@ -1,1422 +0,0 @@
|
|
|
1
|
-
import { ref as V, reactive as re, defineComponent as le, openBlock as z, createBlock as Q, unref as R, mergeProps as De, withCtx as T, renderSlot as H, getCurrentInstance as ue, inject as ee, watch as B, useAttrs as Re, provide as K, shallowRef as Ue, computed as Z, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as G, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as q, Fragment as Je, renderList as ze, nextTick as ce, effectScope as He, isRef as Ke, getCurrentScope as Ze, onScopeDispose as We, onMounted as Ae, normalizeClass as Ge, toRaw as xe } from "vue";
|
|
2
|
-
import { p as J, f as Qe, d as ae, a as W, b as Ve, c as Ye, E as se, l as oe, g as ke, e as qe } from "./pluginManager-BCnrHPYv.js";
|
|
3
|
-
import { a as pe, u as Oe } from "./index-B1s67XDZ.js";
|
|
4
|
-
import { a as _e } from "./axios-CXDYiOMX.js";
|
|
5
|
-
function Lt(e, n) {
|
|
6
|
-
let s = null;
|
|
7
|
-
return (...l) => {
|
|
8
|
-
s && clearTimeout(s), s = setTimeout(() => {
|
|
9
|
-
e(...l);
|
|
10
|
-
}, n);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
function Ce() {
|
|
14
|
-
const e = V({}), n = V({}), s = V(!1), l = V([]), c = re({});
|
|
15
|
-
function i(p) {
|
|
16
|
-
return e.value[p];
|
|
17
|
-
}
|
|
18
|
-
function g(p, b) {
|
|
19
|
-
e.value[p] = b;
|
|
20
|
-
}
|
|
21
|
-
function h(p) {
|
|
22
|
-
delete e.value[p];
|
|
23
|
-
}
|
|
24
|
-
function m(p, b = !1) {
|
|
25
|
-
const x = Object.entries(J.publicMethods).reduce(
|
|
26
|
-
(C, [w, U]) => (C[w] = U.handler, C),
|
|
27
|
-
{}
|
|
28
|
-
);
|
|
29
|
-
try {
|
|
30
|
-
new Function(`const epic = this;${p}`).bind({
|
|
31
|
-
...x,
|
|
32
|
-
getComponent: i,
|
|
33
|
-
find: i,
|
|
34
|
-
defineExpose: N,
|
|
35
|
-
publicMethods: x,
|
|
36
|
-
pluginManager: J
|
|
37
|
-
})();
|
|
38
|
-
} catch (C) {
|
|
39
|
-
b && console.error("[epic:自定义函数]异常:", C);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function N(p) {
|
|
43
|
-
p != null && (n.value = p);
|
|
44
|
-
}
|
|
45
|
-
function O(p, ...b) {
|
|
46
|
-
if (!p || p.length === 0) {
|
|
47
|
-
console.warn("未提供任何动作");
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
p.forEach((x) => {
|
|
51
|
-
const C = x.args ? JSON.parse(x.args) : b;
|
|
52
|
-
switch (x.type) {
|
|
53
|
-
case "public":
|
|
54
|
-
t(x, C);
|
|
55
|
-
break;
|
|
56
|
-
case "custom":
|
|
57
|
-
I(x, C);
|
|
58
|
-
break;
|
|
59
|
-
case "component":
|
|
60
|
-
u(x, C);
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
console.warn(`未知的动作类型: ${x.type}`);
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function t(p, b) {
|
|
69
|
-
var x;
|
|
70
|
-
try {
|
|
71
|
-
(x = J.publicMethods[p.methodName]) == null || x.handler(...b);
|
|
72
|
-
} catch (C) {
|
|
73
|
-
console.error(`[Epic:公共函数(${p.methodName})]执行异常:`, C);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function I(p, b) {
|
|
77
|
-
var x, C;
|
|
78
|
-
try {
|
|
79
|
-
(C = (x = n.value)[p.methodName]) == null || C.call(x, ...b);
|
|
80
|
-
} catch (w) {
|
|
81
|
-
console.error(`[Epic:自定义函数(${p.methodName})]执行异常:`, w);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function u(p, b) {
|
|
85
|
-
const x = p.componentId != null && i(p.componentId);
|
|
86
|
-
if (!x) {
|
|
87
|
-
console.warn(`[Epic:组件${p.componentId}]未找到`);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
try {
|
|
91
|
-
x[p.methodName](...b);
|
|
92
|
-
} catch (C) {
|
|
93
|
-
console.error(`[Epic:组件${p.componentId}函数(${p.methodName})]执行异常:`, C);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function y(p = !0) {
|
|
97
|
-
s.value = p;
|
|
98
|
-
}
|
|
99
|
-
function v(p) {
|
|
100
|
-
const b = Qe(p, () => !0);
|
|
101
|
-
l.value = b.map((x) => x.id);
|
|
102
|
-
}
|
|
103
|
-
function A(p, b = "default") {
|
|
104
|
-
if (c[b]) {
|
|
105
|
-
const x = c[b];
|
|
106
|
-
ae(p, x);
|
|
107
|
-
}
|
|
108
|
-
c[b] = p;
|
|
109
|
-
}
|
|
110
|
-
function P(p, b = "default") {
|
|
111
|
-
if (c[b]) {
|
|
112
|
-
ae(c[b], p, !1);
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
c[b] = p;
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
componentInstances: e,
|
|
119
|
-
funcs: n,
|
|
120
|
-
isDesignMode: s,
|
|
121
|
-
defaultComponentIds: l,
|
|
122
|
-
forms: c,
|
|
123
|
-
addFormData: A,
|
|
124
|
-
setFormData: P,
|
|
125
|
-
getComponentInstance: i,
|
|
126
|
-
// 简化查询函数, 推荐使用
|
|
127
|
-
find: i,
|
|
128
|
-
addComponentInstance: g,
|
|
129
|
-
removeComponentInstance: h,
|
|
130
|
-
setMethods: m,
|
|
131
|
-
doActions: O,
|
|
132
|
-
setDesignMode: y,
|
|
133
|
-
setDefaultComponentIds: v
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function Xe() {
|
|
137
|
-
const e = V([]), n = V([]), s = V(null);
|
|
138
|
-
let l = 0;
|
|
139
|
-
function c(m, N = "插入组件") {
|
|
140
|
-
const O = Date.now();
|
|
141
|
-
l + 150 > O || (l = O, s.value != null && (e.value.push(s.value), n.value.splice(0, n.value.length)), s.value = {
|
|
142
|
-
type: N,
|
|
143
|
-
componentSchema: JSON.stringify(m)
|
|
144
|
-
}, e.value.length > 60 && e.value.unshift());
|
|
145
|
-
}
|
|
146
|
-
function i() {
|
|
147
|
-
if (e.value.length === 0)
|
|
148
|
-
return !1;
|
|
149
|
-
const m = e.value.pop();
|
|
150
|
-
return s.value != null && n.value.push(s.value), s.value = m, JSON.parse(m.componentSchema);
|
|
151
|
-
}
|
|
152
|
-
function g() {
|
|
153
|
-
if (n.value.length === 0)
|
|
154
|
-
return !1;
|
|
155
|
-
const m = n.value.pop();
|
|
156
|
-
return s.value != null && e.value.push(s.value), s.value = m, JSON.parse(m.componentSchema);
|
|
157
|
-
}
|
|
158
|
-
function h() {
|
|
159
|
-
e.value = [], n.value = [], s.value = null;
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
recordList: e,
|
|
163
|
-
undoList: n,
|
|
164
|
-
currentRecord: s,
|
|
165
|
-
push: c,
|
|
166
|
-
undo: i,
|
|
167
|
-
redo: g,
|
|
168
|
-
reset: h
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
const je = /* @__PURE__ */ le({
|
|
172
|
-
__name: "dynamicFormItem",
|
|
173
|
-
props: {
|
|
174
|
-
hasFormItem: { type: Boolean },
|
|
175
|
-
formItemProps: {}
|
|
176
|
-
},
|
|
177
|
-
emits: ["updateFormItemRef"],
|
|
178
|
-
setup(e, { emit: n }) {
|
|
179
|
-
const s = J.getComponent("form-item"), l = e, c = n, i = V(), g = () => {
|
|
180
|
-
c("updateFormItemRef", i.value);
|
|
181
|
-
};
|
|
182
|
-
return (h, m) => l.hasFormItem ? (z(), Q(R(s), De({
|
|
183
|
-
key: 0,
|
|
184
|
-
ref_key: "formItemRef",
|
|
185
|
-
ref: i,
|
|
186
|
-
onVnodeMounted: g
|
|
187
|
-
}, l.formItemProps), {
|
|
188
|
-
default: T(() => [
|
|
189
|
-
H(h.$slots, "default")
|
|
190
|
-
]),
|
|
191
|
-
_: 3
|
|
192
|
-
}, 16, ["onVnodeMounted"])) : H(h.$slots, "default", { key: 1 });
|
|
193
|
-
}
|
|
194
|
-
}), et = /* @__PURE__ */ le({
|
|
195
|
-
name: "ENode",
|
|
196
|
-
__name: "node",
|
|
197
|
-
props: {
|
|
198
|
-
componentSchema: {},
|
|
199
|
-
modelValue: {},
|
|
200
|
-
ruleField: {},
|
|
201
|
-
resetFormData: { type: Boolean },
|
|
202
|
-
name: {},
|
|
203
|
-
dynamicId: {},
|
|
204
|
-
sourceDateUrl: {},
|
|
205
|
-
id: {}
|
|
206
|
-
},
|
|
207
|
-
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
208
|
-
setup(e, { emit: n }) {
|
|
209
|
-
const { proxy: s } = ue(), l = e, c = V(null);
|
|
210
|
-
let i = ee("formData", re({}));
|
|
211
|
-
const g = ee("slots", {}), h = ee("pageManager", {}), m = ee("disabled", { value: !1 }), N = ee("ruleFieldPrefix", null), O = ee("resetFormData", !1);
|
|
212
|
-
let t = re(W(l.componentSchema));
|
|
213
|
-
y();
|
|
214
|
-
async function I(o) {
|
|
215
|
-
if (["cascader", "checkbox", "select", "radio"].includes(o.type) && o.componentProps.dynamicId && l.sourceDateUrl) {
|
|
216
|
-
const f = (await _e({
|
|
217
|
-
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
218
|
-
url: l.sourceDateUrl,
|
|
219
|
-
method: "get",
|
|
220
|
-
params: {
|
|
221
|
-
id: o.componentProps.dynamicId
|
|
222
|
-
},
|
|
223
|
-
headers: {
|
|
224
|
-
Authorization: "Bearer " + pe.get("Admin-Token"),
|
|
225
|
-
lang: pe.get("saas-locale") || "zh-CN",
|
|
226
|
-
//语言
|
|
227
|
-
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
228
|
-
//时区
|
|
229
|
-
}
|
|
230
|
-
})).data.data;
|
|
231
|
-
let M = await _e({
|
|
232
|
-
url: f.url,
|
|
233
|
-
method: f.method,
|
|
234
|
-
data: JSON.parse(f.body),
|
|
235
|
-
params: JSON.parse(f.params),
|
|
236
|
-
headers: {
|
|
237
|
-
...JSON.parse(f.headers),
|
|
238
|
-
Authorization: "Bearer " + pe.get("Admin-Token"),
|
|
239
|
-
lang: pe.get("saas-locale") || "zh-CN",
|
|
240
|
-
//语言
|
|
241
|
-
zone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
242
|
-
//时区
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
if (f && (f != null && f.dataPath)) {
|
|
246
|
-
const ne = f.dataPath.split(".").reduce((de, fe) => de[fe], M.data);
|
|
247
|
-
o.componentProps.options = u(ne, f.dataKey, f.dataValue);
|
|
248
|
-
} else
|
|
249
|
-
o.componentProps.options = u(M.data, f.dataKey, f.dataValue);
|
|
250
|
-
return o;
|
|
251
|
-
}
|
|
252
|
-
return o;
|
|
253
|
-
}
|
|
254
|
-
function u(o, r, E) {
|
|
255
|
-
return o && Object.prototype.toString.call(o) === "[object Array]" ? o.map((f) => f.children && f.children.length ? {
|
|
256
|
-
label: f[r],
|
|
257
|
-
value: f[E] + "",
|
|
258
|
-
children: u(f.children, r, E)
|
|
259
|
-
} : {
|
|
260
|
-
label: f[r],
|
|
261
|
-
value: f[E] + ""
|
|
262
|
-
}) : [];
|
|
263
|
-
}
|
|
264
|
-
B(
|
|
265
|
-
() => l.componentSchema,
|
|
266
|
-
(o) => {
|
|
267
|
-
Ve(t, o, ["children"]) || (ae(t, W(o)), y());
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
deep: !0
|
|
271
|
-
}
|
|
272
|
-
);
|
|
273
|
-
function y() {
|
|
274
|
-
h.isDesignMode.value && typeof t.field == "string" && (t.field += "-design-mode");
|
|
275
|
-
}
|
|
276
|
-
(l.resetFormData || O) && (i = {});
|
|
277
|
-
const v = n, A = V(), P = V(), p = (o) => {
|
|
278
|
-
P.value = o;
|
|
279
|
-
}, b = Re();
|
|
280
|
-
Object.keys(b).length && K("nodeAttrs", b);
|
|
281
|
-
const x = Ue(null), C = Z(() => {
|
|
282
|
-
var o, r;
|
|
283
|
-
return (o = t.componentProps) != null && o.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((r = t.show) == null ? void 0 : r.call(t, { values: i })) ?? !0;
|
|
284
|
-
}), w = Z(() => {
|
|
285
|
-
var f;
|
|
286
|
-
const o = C.value && ((f = t.rules) == null ? void 0 : f.map((M) => ({
|
|
287
|
-
...M,
|
|
288
|
-
validator: M.validator && h.funcs.value[M.validator]
|
|
289
|
-
// 自定义校验函数
|
|
290
|
-
})));
|
|
291
|
-
let r = t.field;
|
|
292
|
-
l.ruleField ? r = l.ruleField : N && t.field && (r = W(N), r.push(t.field));
|
|
293
|
-
const E = {
|
|
294
|
-
...t,
|
|
295
|
-
rules: o,
|
|
296
|
-
rule: o,
|
|
297
|
-
field: r
|
|
298
|
-
};
|
|
299
|
-
return E.children && delete E.children, E;
|
|
300
|
-
}), U = Z(() => {
|
|
301
|
-
var E, f;
|
|
302
|
-
const o = ((E = L.value) == null ? void 0 : E.bindModel) ?? "modelValue", r = {};
|
|
303
|
-
return t.on && Object.keys(t.on).forEach((M) => {
|
|
304
|
-
r[`on${Ye(M)}`] = (...Y) => h.doActions(t.on[M], ...Y);
|
|
305
|
-
}), {
|
|
306
|
-
...l,
|
|
307
|
-
...t.componentProps,
|
|
308
|
-
disabled: (m == null ? void 0 : m.value) || ((f = t.componentProps) == null ? void 0 : f.disabled),
|
|
309
|
-
bindModel: o,
|
|
310
|
-
...r
|
|
311
|
-
};
|
|
312
|
-
}), L = Z(() => J.getComponentConfingByType(t.type) ?? null);
|
|
313
|
-
he(() => {
|
|
314
|
-
c.value = l.modelValue ?? i[t.field ?? ""];
|
|
315
|
-
}), B(
|
|
316
|
-
() => c.value,
|
|
317
|
-
() => {
|
|
318
|
-
c.value !== (l.modelValue ?? i[t.field ?? ""]) && a(c.value);
|
|
319
|
-
}
|
|
320
|
-
), B(
|
|
321
|
-
() => A.value,
|
|
322
|
-
() => {
|
|
323
|
-
_();
|
|
324
|
-
},
|
|
325
|
-
{ immediate: !0 }
|
|
326
|
-
);
|
|
327
|
-
function _() {
|
|
328
|
-
var r;
|
|
329
|
-
const o = A.value || s;
|
|
330
|
-
t.id && o && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (o.setValue = a, o.getValue = () => i[t.field] || l.modelValue), o.setAttr = (E, f) => (t.componentProps || (t.componentProps = {}), t.componentProps[E] = f), o.getAttr = (E) => t.componentProps[E], h.addComponentInstance(t.id, o), (r = L.value) != null && r.defaultSchema.input && t.noFormItem !== !0 && P.value && h.addComponentInstance(t.id + "formItem", P.value));
|
|
331
|
-
}
|
|
332
|
-
function S() {
|
|
333
|
-
var o;
|
|
334
|
-
t.id && (h.removeComponentInstance(t.id), (o = L.value) != null && o.defaultSchema.input && t.noFormItem !== !0 && h.removeComponentInstance(t.id + "formItem"));
|
|
335
|
-
}
|
|
336
|
-
async function X() {
|
|
337
|
-
var r, E, f;
|
|
338
|
-
if (t = await I(t), typeof ((r = t.componentProps) == null ? void 0 : r.defaultValue) < "u") {
|
|
339
|
-
const M = h.isDesignMode.value ? (E = t.componentProps) == null ? void 0 : E.defaultValue : i[t.field] ?? ((f = t.componentProps) == null ? void 0 : f.defaultValue);
|
|
340
|
-
a(W(M));
|
|
341
|
-
}
|
|
342
|
-
if (t.type === "slot") {
|
|
343
|
-
const M = t.slotName;
|
|
344
|
-
if (!M) return;
|
|
345
|
-
x.value = le({
|
|
346
|
-
setup() {
|
|
347
|
-
return () => H(g, M, {
|
|
348
|
-
componentSchema: t,
|
|
349
|
-
model: i
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
const o = J.getComponent(t.type);
|
|
356
|
-
if (!o) {
|
|
357
|
-
console.error(`组件${t.type}未注册`);
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
if (typeof o == "function") {
|
|
361
|
-
const M = await o();
|
|
362
|
-
x.value = M.default ?? M;
|
|
363
|
-
} else
|
|
364
|
-
x.value = o;
|
|
365
|
-
}
|
|
366
|
-
function d(o) {
|
|
367
|
-
Object.prototype.toString.call(o), Object.prototype.toString.call(o) === "[object Array]" ? o.forEach((r) => {
|
|
368
|
-
i[r.value] = r.label;
|
|
369
|
-
}) : i[o.value] = o.label, l.id && se.emit("updateformData" + l.id, i);
|
|
370
|
-
}
|
|
371
|
-
function a(o) {
|
|
372
|
-
v("update:modelValue", o), v("change", o), t.field && (i[t.field] = o), l.id && se.emit("updateformData" + l.id, i);
|
|
373
|
-
}
|
|
374
|
-
function F(o) {
|
|
375
|
-
v("update:dynamicId", o);
|
|
376
|
-
}
|
|
377
|
-
let $ = null;
|
|
378
|
-
return B(
|
|
379
|
-
() => t,
|
|
380
|
-
async (o) => {
|
|
381
|
-
const r = JSON.stringify({
|
|
382
|
-
...o,
|
|
383
|
-
children: void 0,
|
|
384
|
-
componentProps: {
|
|
385
|
-
...o.componentProps,
|
|
386
|
-
options: null
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
if (r === $)
|
|
390
|
-
return !1;
|
|
391
|
-
X(), $ = r;
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
immediate: !0,
|
|
395
|
-
deep: !0
|
|
396
|
-
}
|
|
397
|
-
), $e(S), (o, r) => {
|
|
398
|
-
var f;
|
|
399
|
-
const E = Te("ENode");
|
|
400
|
-
return x.value && C.value ? (z(), Q(je, {
|
|
401
|
-
key: 0,
|
|
402
|
-
hasFormItem: R(t).noFormItem !== !0 && ((f = L.value) == null ? void 0 : f.defaultSchema.input),
|
|
403
|
-
formItemProps: w.value,
|
|
404
|
-
onUpdateFormItemRef: p
|
|
405
|
-
}, {
|
|
406
|
-
default: T(() => [
|
|
407
|
-
(z(), Q(Be(x.value), De({
|
|
408
|
-
ref_key: "componentInstance",
|
|
409
|
-
ref: A,
|
|
410
|
-
onVnodeMounted: _,
|
|
411
|
-
model: R(i)
|
|
412
|
-
}, { ...U.value }, {
|
|
413
|
-
[U.value.bindModel]: c.value,
|
|
414
|
-
["onUpdate:" + U.value.bindModel]: r[0] || (r[0] = (M) => c.value = M),
|
|
415
|
-
[`onUpdate:${U.value.bindModel}` || ""]: a,
|
|
416
|
-
"onUpdate:modelValueLabel": d,
|
|
417
|
-
"onUpdate:dynamicId": F
|
|
418
|
-
}), {
|
|
419
|
-
node: T((M) => [
|
|
420
|
-
G(E, De({
|
|
421
|
-
id: l.id
|
|
422
|
-
}, M, {
|
|
423
|
-
sourceDateUrl: l.sourceDateUrl
|
|
424
|
-
}), null, 16, ["id", "sourceDateUrl"])
|
|
425
|
-
]),
|
|
426
|
-
"edit-node": T(() => [
|
|
427
|
-
H(o.$slots, "edit-node")
|
|
428
|
-
]),
|
|
429
|
-
_: 3
|
|
430
|
-
}, 16, ["model"]))
|
|
431
|
-
]),
|
|
432
|
-
_: 3
|
|
433
|
-
}, 8, ["hasFormItem", "formItemProps"])) : Ne("", !0);
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
function tt() {
|
|
438
|
-
const e = V(!1), n = Ce(), s = V({});
|
|
439
|
-
function l() {
|
|
440
|
-
return new Promise((u) => {
|
|
441
|
-
if (e.value)
|
|
442
|
-
u();
|
|
443
|
-
else {
|
|
444
|
-
const y = B(e, () => {
|
|
445
|
-
y(), u();
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
async function c(u = "default") {
|
|
451
|
-
var v;
|
|
452
|
-
await l();
|
|
453
|
-
const y = (v = s.value) == null ? void 0 : v[u];
|
|
454
|
-
if (!y) throw new Error(`表单 [name=${u}] 不存在`);
|
|
455
|
-
return y;
|
|
456
|
-
}
|
|
457
|
-
async function i(u, y) {
|
|
458
|
-
const v = await c(u);
|
|
459
|
-
return W(await y(v));
|
|
460
|
-
}
|
|
461
|
-
async function g(u = "default") {
|
|
462
|
-
return await i(u, (y) => y.getData());
|
|
463
|
-
}
|
|
464
|
-
function h(u, y = "default", v = void 0) {
|
|
465
|
-
var A, P;
|
|
466
|
-
if (v && Object.keys(v).length) {
|
|
467
|
-
let p = function(w) {
|
|
468
|
-
let U = [];
|
|
469
|
-
return w.forEach((L) => {
|
|
470
|
-
L.children && (U = [...U, ...p(L.children)]), U.push(L);
|
|
471
|
-
}), U;
|
|
472
|
-
}, x = function(w) {
|
|
473
|
-
var L;
|
|
474
|
-
let U = p((L = v == null ? void 0 : v.schemas[0]) == null ? void 0 : L.children);
|
|
475
|
-
return Object.keys(w).forEach((_) => {
|
|
476
|
-
var d, a, F, $, o;
|
|
477
|
-
const S = U.find((r) => r.field === _), X = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
478
|
-
if ((S && (S == null ? void 0 : S.type) === "checkbox" || (S == null ? void 0 : S.type) === "select" && ((d = S == null ? void 0 : S.componentProps) != null && d.multiple) || (S == null ? void 0 : S.type) === "date" && X.includes((a = S == null ? void 0 : S.componentProps) == null ? void 0 : a.type)) && typeof w[_] == "string")
|
|
479
|
-
w[_] = (F = w[_]) == null ? void 0 : F.split(",");
|
|
480
|
-
else if ((S == null ? void 0 : S.type) === "cascader" && ((o = ($ = S == null ? void 0 : S.componentProps) == null ? void 0 : $.props) != null && o.multiple) && typeof w[_] == "string")
|
|
481
|
-
w[_].indexOf(";") > -1 ? w[_] = w[_].split(";").map((r) => r.split(",")) : w[_] = w[_].split(","), w[_].indexOf(";") > -1 ? w[_] = w[_].split(";").map((r) => r.split(",")) : w[_] = w[_].split(",");
|
|
482
|
-
else if (((S == null ? void 0 : S.type) === "upload-image" || (S == null ? void 0 : S.type) === "upload-file") && typeof w[_] == "string") {
|
|
483
|
-
let r = [];
|
|
484
|
-
Object.entries(w).forEach(([E, f]) => {
|
|
485
|
-
w[_] === f && E !== S.field && E.indexOf("@") > -1 && E.indexOf(_) > -1 && (r = E.split("@")[1].split(","));
|
|
486
|
-
}), w[_] = w[_].split(",").map((E, f) => ({
|
|
487
|
-
url: E,
|
|
488
|
-
name: r[f] || E
|
|
489
|
-
}));
|
|
490
|
-
} else (S == null ? void 0 : S.type) === "number" || (S == null ? void 0 : S.type) === "slider" ? w[_] = Number(w[_]) : (S == null ? void 0 : S.type) === "switch" && (w[_] = typeof w[_] == "boolean" ? w[_] : w[_].indexOf("true") > -1);
|
|
491
|
-
}), w;
|
|
492
|
-
}(u);
|
|
493
|
-
n.setFormData(x, y);
|
|
494
|
-
const C = (A = s.value) == null ? void 0 : A[y];
|
|
495
|
-
C == null || C.clearValidate();
|
|
496
|
-
} else {
|
|
497
|
-
n.setFormData(u, y);
|
|
498
|
-
const p = (P = s.value) == null ? void 0 : P[y];
|
|
499
|
-
p == null || p.clearValidate();
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
async function m(u = "default") {
|
|
503
|
-
return await i(u, async (y) => (await y.validate(), await y.getData()));
|
|
504
|
-
}
|
|
505
|
-
async function N(u) {
|
|
506
|
-
await l();
|
|
507
|
-
const y = {};
|
|
508
|
-
for (const v in s.value) {
|
|
509
|
-
const A = s.value[v];
|
|
510
|
-
A && (y[v] = W(await u(A)));
|
|
511
|
-
}
|
|
512
|
-
return y;
|
|
513
|
-
}
|
|
514
|
-
async function O() {
|
|
515
|
-
return await N((u) => u.getData());
|
|
516
|
-
}
|
|
517
|
-
function t(u) {
|
|
518
|
-
for (const y in u)
|
|
519
|
-
h(u[y], y);
|
|
520
|
-
}
|
|
521
|
-
async function I() {
|
|
522
|
-
return await N(async (u) => (await u.validate(), await u.getData()));
|
|
523
|
-
}
|
|
524
|
-
return {
|
|
525
|
-
ready: e,
|
|
526
|
-
pageManager: n,
|
|
527
|
-
forms: s,
|
|
528
|
-
getData: g,
|
|
529
|
-
setData: h,
|
|
530
|
-
validate: m,
|
|
531
|
-
getForms: O,
|
|
532
|
-
setForms: t,
|
|
533
|
-
validateAll: I,
|
|
534
|
-
getFormInstance: c
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
const nt = {
|
|
538
|
-
key: 0,
|
|
539
|
-
class: "epic-loading-box"
|
|
540
|
-
}, ot = { class: "epic-builder-main" }, st = { class: "epic-loading-box" }, rt = /* @__PURE__ */ le({
|
|
541
|
-
__name: "builder",
|
|
542
|
-
props: {
|
|
543
|
-
pageSchema: {},
|
|
544
|
-
formData: {},
|
|
545
|
-
disabled: { type: Boolean },
|
|
546
|
-
sourceDateUrl: {},
|
|
547
|
-
id: {}
|
|
548
|
-
},
|
|
549
|
-
emits: ["change", "ready"],
|
|
550
|
-
setup(e, { expose: n, emit: s }) {
|
|
551
|
-
const l = oe(() => import("./index-DgcFxYFp.js")), c = s, i = V([]), g = V({}), { ready: h, pageManager: m, forms: N, getData: O, setData: t, validate: I, getForms: u, setForms: y, validateAll: v, getFormInstance: A } = tt(), P = e, p = re({
|
|
552
|
-
schemas: []
|
|
553
|
-
});
|
|
554
|
-
B(
|
|
555
|
-
() => P.pageSchema,
|
|
556
|
-
(d) => {
|
|
557
|
-
ae(p, d);
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
immediate: !0,
|
|
561
|
-
deep: !0
|
|
562
|
-
}
|
|
563
|
-
), B(
|
|
564
|
-
() => P.formData,
|
|
565
|
-
(d) => {
|
|
566
|
-
if (d) {
|
|
567
|
-
let a = L(d);
|
|
568
|
-
g.value = a, t(a);
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
immediate: !0,
|
|
573
|
-
deep: !0
|
|
574
|
-
}
|
|
575
|
-
);
|
|
576
|
-
function b(d) {
|
|
577
|
-
let a = [];
|
|
578
|
-
return d.forEach((F) => {
|
|
579
|
-
F.children && (a = [...a, ...b(F.children)]), a.push(F);
|
|
580
|
-
}), a;
|
|
581
|
-
}
|
|
582
|
-
function x(d, a) {
|
|
583
|
-
function F(o) {
|
|
584
|
-
return JSON.parse(JSON.stringify(o));
|
|
585
|
-
}
|
|
586
|
-
function $(o, r) {
|
|
587
|
-
if (o.type === "card" && o.multiple && o.field && Array.isArray(r[o.field]))
|
|
588
|
-
return r[o.field].map((f) => {
|
|
589
|
-
var Y;
|
|
590
|
-
const M = F({ ...o, multiple: !0 });
|
|
591
|
-
return M.children = (Y = M.children) == null ? void 0 : Y.map((ne) => $(ne, f)).flat(), M;
|
|
592
|
-
});
|
|
593
|
-
const E = F(o);
|
|
594
|
-
return Array.isArray(E.children) && (E.children = E.children.map((f) => $(f, r)).flat()), E;
|
|
595
|
-
}
|
|
596
|
-
return d.map((o) => $(o, a)).flat();
|
|
597
|
-
}
|
|
598
|
-
function C(d, a = "", F = { root: 0 }) {
|
|
599
|
-
const $ = a || "root";
|
|
600
|
-
return a || (F.root = 0), F[$] === void 0 && (F[$] = 0), d.map((o) => {
|
|
601
|
-
o.field && (o.oldField = JSON.parse(JSON.stringify(o.field)));
|
|
602
|
-
const r = { ...o };
|
|
603
|
-
if (o.type === "card") {
|
|
604
|
-
const E = o.field || "";
|
|
605
|
-
o.multiple ? (r.field = a ? `${a}.${E}[${F[$]}]` : `${E}[${F[$]}]`, F[$]++) : o.field && a && (r.field = `${a}.${E}`);
|
|
606
|
-
const f = r.field || a;
|
|
607
|
-
F[f] = 0;
|
|
608
|
-
} else o.field && a && (r.field = `${a}.${o.field}`);
|
|
609
|
-
return o.children && (r.children = C(o.children, r.field || a, F)), r;
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
function w(d, a, F = "", $ = {}) {
|
|
613
|
-
const o = F || "root";
|
|
614
|
-
return $[o] === void 0 && ($[o] = 0), d.forEach((r) => {
|
|
615
|
-
const E = r.field || "";
|
|
616
|
-
let f = F ? `${F}.${E}` : `${E}`;
|
|
617
|
-
r.type === "card" && r.multiple ? (typeof a[f][`${$[o]}`] == "object" ? Object.keys(a[f][`${$[o]}`]).forEach((M) => {
|
|
618
|
-
a[`${f}[${$[o]}].${M}`] = a[f][`${$[o]}`][M];
|
|
619
|
-
}) : a[`${f}[${$[o]}]`] = a[f][`${$[o]}`], r.children && (r.children = w(r.children, a, `${f}[${$[o]}]` || F, $)), $[o]++) : r.children && (r.children = w(r.children, a, F, $));
|
|
620
|
-
}), $[o] = 0, a;
|
|
621
|
-
}
|
|
622
|
-
function U(d, a, F) {
|
|
623
|
-
let $ = w(W(d), W(a));
|
|
624
|
-
return {
|
|
625
|
-
obj: C(d),
|
|
626
|
-
dataObj: $
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
function L(d) {
|
|
630
|
-
let a = b(P.pageSchema.schemas[0].children);
|
|
631
|
-
i.value = a.filter((r) => r.type === "card" && r.multiple);
|
|
632
|
-
const F = x(P.pageSchema.schemas[0].children, d);
|
|
633
|
-
let { obj: $, dataObj: o } = U(F, d, i.value);
|
|
634
|
-
return d = o, console.log("%c [ ]-277", "font-size:13px; background:pink; color:#bf2c9f;", $, o), P.pageSchema.schemas[0].children = $, Object.keys(d).forEach((r) => {
|
|
635
|
-
var E, f, M, Y, ne, de, fe;
|
|
636
|
-
if (r.indexOf("@") < 0) {
|
|
637
|
-
const D = a.find((k) => k.field === r), Pe = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
638
|
-
if ((D && (D == null ? void 0 : D.type) === "checkbox" || (D == null ? void 0 : D.type) === "select" && ((E = D == null ? void 0 : D.componentProps) != null && E.multiple) || (D == null ? void 0 : D.type) === "cascader" && !((M = (f = D == null ? void 0 : D.componentProps) == null ? void 0 : f.props) != null && M.multiple) || (D == null ? void 0 : D.type) === "date" && Pe.includes((Y = D == null ? void 0 : D.componentProps) == null ? void 0 : Y.type)) && typeof d[r] == "string")
|
|
639
|
-
d[r] = (ne = d[r]) == null ? void 0 : ne.split(",");
|
|
640
|
-
else if ((D == null ? void 0 : D.type) === "cascader" && ((fe = (de = D == null ? void 0 : D.componentProps) == null ? void 0 : de.props) != null && fe.multiple) && typeof d[r] == "string")
|
|
641
|
-
d[r].indexOf(";") > -1 ? d[r] = d[r].split(";").map((k) => k.split(",")) : d[r] = d[r].split(","), d[r].indexOf(";") > -1 ? d[r] = d[r].split(";").map((k) => k.split(",")) : d[r] = d[r].split(",");
|
|
642
|
-
else if (((D == null ? void 0 : D.type) === "upload-image" || (D == null ? void 0 : D.type) === "upload-file") && typeof d[r] == "string") {
|
|
643
|
-
let k = [];
|
|
644
|
-
Object.entries(d).forEach(([j, ye]) => {
|
|
645
|
-
d[r] === ye && j !== D.field && j.indexOf("@") > -1 && j.indexOf(r) > -1 && (k = j.split("@")[1].split(","));
|
|
646
|
-
}), d[r] = d[r].split(",").map((j, ye) => ({
|
|
647
|
-
url: j,
|
|
648
|
-
name: k[ye] || j
|
|
649
|
-
}));
|
|
650
|
-
} else (D == null ? void 0 : D.type) === "number" || (D == null ? void 0 : D.type) === "slider" ? d[r] = Number(d[r]) : (D == null ? void 0 : D.type) === "switch" && (d[r] = typeof d[r] == "boolean" ? d[r] : d[r].indexOf("true") > -1);
|
|
651
|
-
}
|
|
652
|
-
}), d;
|
|
653
|
-
}
|
|
654
|
-
B(
|
|
655
|
-
() => p.script,
|
|
656
|
-
(d) => {
|
|
657
|
-
d && m.setMethods(d, !0);
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
immediate: !0
|
|
661
|
-
}
|
|
662
|
-
), K("slots", Le()), K("pageManager", m), K("forms", N), K("pageSchema", p), K(
|
|
663
|
-
"disabled",
|
|
664
|
-
Z(() => P.disabled)
|
|
665
|
-
);
|
|
666
|
-
const _ = ue(), S = _ == null ? void 0 : _.proxy;
|
|
667
|
-
function X() {
|
|
668
|
-
ce(() => {
|
|
669
|
-
h.value = !0, c("ready", m), S && m.addComponentInstance("builder", S);
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
return se.on("updateformData" + P.id, (d) => {
|
|
673
|
-
P.id && c("change", d);
|
|
674
|
-
}), n({
|
|
675
|
-
ready: h,
|
|
676
|
-
pageManager: m,
|
|
677
|
-
getData: O,
|
|
678
|
-
setData: t,
|
|
679
|
-
validate: I,
|
|
680
|
-
getForms: u,
|
|
681
|
-
setForms: y,
|
|
682
|
-
validateAll: v,
|
|
683
|
-
getFormInstance: A
|
|
684
|
-
}), (d, a) => R(J).initialized.value ? (z(), Q(Fe, {
|
|
685
|
-
key: 1,
|
|
686
|
-
onResolve: X
|
|
687
|
-
}, {
|
|
688
|
-
default: T(() => [
|
|
689
|
-
q("div", ot, [
|
|
690
|
-
(z(!0), Ee(Je, null, ze(p.schemas, (F, $) => (z(), Q(R(et), {
|
|
691
|
-
id: P.id,
|
|
692
|
-
key: $,
|
|
693
|
-
sourceDateUrl: P.sourceDateUrl,
|
|
694
|
-
componentSchema: F
|
|
695
|
-
}, null, 8, ["id", "sourceDateUrl", "componentSchema"]))), 128))
|
|
696
|
-
])
|
|
697
|
-
]),
|
|
698
|
-
fallback: T(() => [
|
|
699
|
-
q("div", st, [
|
|
700
|
-
G(R(l))
|
|
701
|
-
])
|
|
702
|
-
]),
|
|
703
|
-
_: 1
|
|
704
|
-
})) : (z(), Ee("div", nt));
|
|
705
|
-
}
|
|
706
|
-
});
|
|
707
|
-
function Ie(e) {
|
|
708
|
-
return Ze() ? (We(e), !0) : !1;
|
|
709
|
-
}
|
|
710
|
-
function lt(e) {
|
|
711
|
-
let n = 0, s, l;
|
|
712
|
-
const c = () => {
|
|
713
|
-
n -= 1, l && n <= 0 && (l.stop(), s = void 0, l = void 0);
|
|
714
|
-
};
|
|
715
|
-
return (...i) => (n += 1, l || (l = He(!0), s = l.run(() => e(...i))), Ie(c), s);
|
|
716
|
-
}
|
|
717
|
-
function ie(e) {
|
|
718
|
-
return typeof e == "function" ? e() : R(e);
|
|
719
|
-
}
|
|
720
|
-
const at = typeof window < "u" && typeof document < "u";
|
|
721
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
722
|
-
const it = (e) => typeof e < "u", ct = Object.prototype.toString, ut = (e) => ct.call(e) === "[object Object]", dt = () => {
|
|
723
|
-
};
|
|
724
|
-
function ft(e) {
|
|
725
|
-
return ue();
|
|
726
|
-
}
|
|
727
|
-
function pt(e, n = !0, s) {
|
|
728
|
-
ft() ? Ae(e, s) : n ? e() : ce(e);
|
|
729
|
-
}
|
|
730
|
-
function mt(e = !1, n = {}) {
|
|
731
|
-
const {
|
|
732
|
-
truthyValue: s = !0,
|
|
733
|
-
falsyValue: l = !1
|
|
734
|
-
} = n, c = Ke(e), i = V(e);
|
|
735
|
-
function g(h) {
|
|
736
|
-
if (arguments.length)
|
|
737
|
-
return i.value = h, i.value;
|
|
738
|
-
{
|
|
739
|
-
const m = ie(s);
|
|
740
|
-
return i.value = i.value === m ? ie(l) : m, i.value;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
return c ? g : [i, g];
|
|
744
|
-
}
|
|
745
|
-
function Jt(e, n, s) {
|
|
746
|
-
const l = B(e, (...c) => (ce(() => l()), n(...c)), s);
|
|
747
|
-
return l;
|
|
748
|
-
}
|
|
749
|
-
const ve = at ? window : void 0;
|
|
750
|
-
function te(e) {
|
|
751
|
-
var n;
|
|
752
|
-
const s = ie(e);
|
|
753
|
-
return (n = s == null ? void 0 : s.$el) != null ? n : s;
|
|
754
|
-
}
|
|
755
|
-
function ht(...e) {
|
|
756
|
-
let n, s, l, c;
|
|
757
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, l, c] = e, n = ve) : [n, s, l, c] = e, !n)
|
|
758
|
-
return dt;
|
|
759
|
-
Array.isArray(s) || (s = [s]), Array.isArray(l) || (l = [l]);
|
|
760
|
-
const i = [], g = () => {
|
|
761
|
-
i.forEach((O) => O()), i.length = 0;
|
|
762
|
-
}, h = (O, t, I, u) => (O.addEventListener(t, I, u), () => O.removeEventListener(t, I, u)), m = B(
|
|
763
|
-
() => [te(n), ie(c)],
|
|
764
|
-
([O, t]) => {
|
|
765
|
-
if (g(), !O)
|
|
766
|
-
return;
|
|
767
|
-
const I = ut(t) ? { ...t } : t;
|
|
768
|
-
i.push(
|
|
769
|
-
...s.flatMap((u) => l.map((y) => h(O, u, y, I)))
|
|
770
|
-
);
|
|
771
|
-
},
|
|
772
|
-
{ immediate: !0, flush: "post" }
|
|
773
|
-
), N = () => {
|
|
774
|
-
m(), g();
|
|
775
|
-
};
|
|
776
|
-
return Ie(N), N;
|
|
777
|
-
}
|
|
778
|
-
function vt(e) {
|
|
779
|
-
return typeof e == "function" ? e : typeof e == "string" ? (n) => n.key === e : Array.isArray(e) ? (n) => e.includes(n.key) : () => !0;
|
|
780
|
-
}
|
|
781
|
-
function Me(...e) {
|
|
782
|
-
let n, s, l = {};
|
|
783
|
-
e.length === 3 ? (n = e[0], s = e[1], l = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (n = !0, s = e[0], l = e[1]) : (n = e[0], s = e[1]) : (n = !0, s = e[0]);
|
|
784
|
-
const {
|
|
785
|
-
target: c = ve,
|
|
786
|
-
eventName: i = "keydown",
|
|
787
|
-
passive: g = !1,
|
|
788
|
-
dedupe: h = !1
|
|
789
|
-
} = l, m = vt(n);
|
|
790
|
-
return ht(c, i, (O) => {
|
|
791
|
-
O.repeat && ie(h) || m(O) && s(O);
|
|
792
|
-
}, g);
|
|
793
|
-
}
|
|
794
|
-
function we(e, n, s = {}) {
|
|
795
|
-
return Me(e, n, { ...s, eventName: "keydown" });
|
|
796
|
-
}
|
|
797
|
-
function Se(e, n, s = {}) {
|
|
798
|
-
return Me(e, n, { ...s, eventName: "keyup" });
|
|
799
|
-
}
|
|
800
|
-
function gt() {
|
|
801
|
-
const e = V(!1), n = ue();
|
|
802
|
-
return n && Ae(() => {
|
|
803
|
-
e.value = !0;
|
|
804
|
-
}, n), e;
|
|
805
|
-
}
|
|
806
|
-
function yt(e) {
|
|
807
|
-
const n = gt();
|
|
808
|
-
return Z(() => (n.value, !!e()));
|
|
809
|
-
}
|
|
810
|
-
function wt(e) {
|
|
811
|
-
return JSON.parse(JSON.stringify(e));
|
|
812
|
-
}
|
|
813
|
-
function St(e, n, s = {}) {
|
|
814
|
-
const { window: l = ve, ...c } = s;
|
|
815
|
-
let i;
|
|
816
|
-
const g = yt(() => l && "ResizeObserver" in l), h = () => {
|
|
817
|
-
i && (i.disconnect(), i = void 0);
|
|
818
|
-
}, m = Z(() => {
|
|
819
|
-
const t = ie(e);
|
|
820
|
-
return Array.isArray(t) ? t.map((I) => te(I)) : [te(t)];
|
|
821
|
-
}), N = B(
|
|
822
|
-
m,
|
|
823
|
-
(t) => {
|
|
824
|
-
if (h(), g.value && l) {
|
|
825
|
-
i = new ResizeObserver(n);
|
|
826
|
-
for (const I of t)
|
|
827
|
-
I && i.observe(I, c);
|
|
828
|
-
}
|
|
829
|
-
},
|
|
830
|
-
{ immediate: !0, flush: "post" }
|
|
831
|
-
), O = () => {
|
|
832
|
-
h(), N();
|
|
833
|
-
};
|
|
834
|
-
return Ie(O), {
|
|
835
|
-
isSupported: g,
|
|
836
|
-
stop: O
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
840
|
-
const { window: l = ve, box: c = "content-box" } = s, i = Z(() => {
|
|
841
|
-
var t, I;
|
|
842
|
-
return (I = (t = te(e)) == null ? void 0 : t.namespaceURI) == null ? void 0 : I.includes("svg");
|
|
843
|
-
}), g = V(n.width), h = V(n.height), { stop: m } = St(
|
|
844
|
-
e,
|
|
845
|
-
([t]) => {
|
|
846
|
-
const I = c === "border-box" ? t.borderBoxSize : c === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
847
|
-
if (l && i.value) {
|
|
848
|
-
const u = te(e);
|
|
849
|
-
if (u) {
|
|
850
|
-
const y = u.getBoundingClientRect();
|
|
851
|
-
g.value = y.width, h.value = y.height;
|
|
852
|
-
}
|
|
853
|
-
} else if (I) {
|
|
854
|
-
const u = Array.isArray(I) ? I : [I];
|
|
855
|
-
g.value = u.reduce((y, { inlineSize: v }) => y + v, 0), h.value = u.reduce((y, { blockSize: v }) => y + v, 0);
|
|
856
|
-
} else
|
|
857
|
-
g.value = t.contentRect.width, h.value = t.contentRect.height;
|
|
858
|
-
},
|
|
859
|
-
s
|
|
860
|
-
);
|
|
861
|
-
pt(() => {
|
|
862
|
-
const t = te(e);
|
|
863
|
-
t && (g.value = "offsetWidth" in t ? t.offsetWidth : n.width, h.value = "offsetHeight" in t ? t.offsetHeight : n.height);
|
|
864
|
-
});
|
|
865
|
-
const N = B(
|
|
866
|
-
() => te(e),
|
|
867
|
-
(t) => {
|
|
868
|
-
g.value = t ? n.width : 0, h.value = t ? n.height : 0;
|
|
869
|
-
}
|
|
870
|
-
);
|
|
871
|
-
function O() {
|
|
872
|
-
m(), N();
|
|
873
|
-
}
|
|
874
|
-
return {
|
|
875
|
-
width: g,
|
|
876
|
-
height: h,
|
|
877
|
-
stop: O
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
function Ht(e, n, s, l = {}) {
|
|
881
|
-
var c, i, g;
|
|
882
|
-
const {
|
|
883
|
-
clone: h = !1,
|
|
884
|
-
passive: m = !1,
|
|
885
|
-
eventName: N,
|
|
886
|
-
deep: O = !1,
|
|
887
|
-
defaultValue: t,
|
|
888
|
-
shouldEmit: I
|
|
889
|
-
} = l, u = ue(), y = s || (u == null ? void 0 : u.emit) || ((c = u == null ? void 0 : u.$emit) == null ? void 0 : c.bind(u)) || ((g = (i = u == null ? void 0 : u.proxy) == null ? void 0 : i.$emit) == null ? void 0 : g.bind(u == null ? void 0 : u.proxy));
|
|
890
|
-
let v = N;
|
|
891
|
-
n || (n = "modelValue"), v = v || `update:${n.toString()}`;
|
|
892
|
-
const A = (b) => h ? typeof h == "function" ? h(b) : wt(b) : b, P = () => it(e[n]) ? A(e[n]) : t, p = (b) => {
|
|
893
|
-
I ? I(b) && y(v, b) : y(v, b);
|
|
894
|
-
};
|
|
895
|
-
if (m) {
|
|
896
|
-
const b = P(), x = V(b);
|
|
897
|
-
let C = !1;
|
|
898
|
-
return B(
|
|
899
|
-
() => e[n],
|
|
900
|
-
(w) => {
|
|
901
|
-
C || (C = !0, x.value = A(w), ce(() => C = !1));
|
|
902
|
-
}
|
|
903
|
-
), B(
|
|
904
|
-
x,
|
|
905
|
-
(w) => {
|
|
906
|
-
!C && (w !== e[n] || O) && p(w);
|
|
907
|
-
},
|
|
908
|
-
{ deep: O }
|
|
909
|
-
), x;
|
|
910
|
-
} else
|
|
911
|
-
return Z({
|
|
912
|
-
get() {
|
|
913
|
-
return P();
|
|
914
|
-
},
|
|
915
|
-
set(b) {
|
|
916
|
-
p(b);
|
|
917
|
-
}
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
function Kt() {
|
|
921
|
-
const { isDark: e } = ge(), n = mt(e);
|
|
922
|
-
return {
|
|
923
|
-
isDark: e,
|
|
924
|
-
toggleDark: n
|
|
925
|
-
};
|
|
926
|
-
}
|
|
927
|
-
function bt() {
|
|
928
|
-
const e = V(!1);
|
|
929
|
-
return Ae(() => {
|
|
930
|
-
Dt(e), Et(e);
|
|
931
|
-
}), B(
|
|
932
|
-
() => e.value,
|
|
933
|
-
() => {
|
|
934
|
-
e.value ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
935
|
-
}
|
|
936
|
-
), {
|
|
937
|
-
isDark: e
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
function Dt(e) {
|
|
941
|
-
var n = document.documentElement;
|
|
942
|
-
n && (n.classList.contains("dark") ? e.value = !0 : e.value = !1);
|
|
943
|
-
}
|
|
944
|
-
function Et(e) {
|
|
945
|
-
var n = document.querySelector("html"), s = new MutationObserver(function(l) {
|
|
946
|
-
for (var c of l)
|
|
947
|
-
if (c.type === "attributes" && c.attributeName === "class") {
|
|
948
|
-
const i = c.target;
|
|
949
|
-
new Array(...i.classList).includes("dark") ? e.value = !0 : e.value = !1;
|
|
950
|
-
}
|
|
951
|
-
});
|
|
952
|
-
s.observe(n, {
|
|
953
|
-
attributes: !0,
|
|
954
|
-
attributeFilter: ["class"]
|
|
955
|
-
}), $e(() => {
|
|
956
|
-
s.disconnect();
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
function At() {
|
|
960
|
-
const e = V(1), n = V(!1), { isDark: s } = bt(), { pressSpace: l, pressShift: c, pressCtrl: i } = Ot();
|
|
961
|
-
return {
|
|
962
|
-
canvasScale: e,
|
|
963
|
-
pressSpace: l,
|
|
964
|
-
pressShift: c,
|
|
965
|
-
pressCtrl: i,
|
|
966
|
-
disabledZoom: n,
|
|
967
|
-
isDark: s
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
const ge = lt(At);
|
|
971
|
-
function Ot() {
|
|
972
|
-
const e = V(!1), n = V(!1), s = V(!1);
|
|
973
|
-
return we(" ", () => {
|
|
974
|
-
e.value = !0;
|
|
975
|
-
}), Se(" ", () => {
|
|
976
|
-
e.value = !1;
|
|
977
|
-
}), we("Shift", (l) => {
|
|
978
|
-
l.preventDefault(), n.value = !0;
|
|
979
|
-
}), Se("Shift", () => {
|
|
980
|
-
n.value = !1;
|
|
981
|
-
}), we("Control", (l) => {
|
|
982
|
-
l.preventDefault(), s.value = !0;
|
|
983
|
-
}), Se("Control", () => {
|
|
984
|
-
s.value = !1;
|
|
985
|
-
}), { pressSpace: e, pressShift: n, pressCtrl: s };
|
|
986
|
-
}
|
|
987
|
-
function Zt(e) {
|
|
988
|
-
const { pressSpace: n } = ge(), s = new Image(1, 1);
|
|
989
|
-
s.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
990
|
-
let l = 0, c = 0;
|
|
991
|
-
function i(m) {
|
|
992
|
-
var N;
|
|
993
|
-
n.value && (l = m.x, c = m.y, (N = m.dataTransfer) == null || N.setDragImage(document.createElement("div"), 0, 0));
|
|
994
|
-
}
|
|
995
|
-
function g(m) {
|
|
996
|
-
if (m.preventDefault(), !m.x || !m.y || !n.value)
|
|
997
|
-
return;
|
|
998
|
-
const N = m.x - l, O = m.y - c;
|
|
999
|
-
l = m.x, c = m.y, e.value && (e.value.scrollTop -= O, e.value.scrollLeft -= N);
|
|
1000
|
-
}
|
|
1001
|
-
function h() {
|
|
1002
|
-
n.value = !1;
|
|
1003
|
-
}
|
|
1004
|
-
return { handleElementDragStart: i, handleElementDrag: g, handleElementDragEnd: h };
|
|
1005
|
-
}
|
|
1006
|
-
function Wt(e) {
|
|
1007
|
-
const { pressCtrl: n, canvasScale: s, disabledZoom: l } = ge();
|
|
1008
|
-
function c(i) {
|
|
1009
|
-
if (!n.value || l.value)
|
|
1010
|
-
return;
|
|
1011
|
-
i.preventDefault();
|
|
1012
|
-
let g = 0;
|
|
1013
|
-
i.deltaY < 0 ? g = s.value + 0.05 : g = s.value - 0.05, !(g > 150 || g < 0.5) && (s.value = g);
|
|
1014
|
-
}
|
|
1015
|
-
return B(
|
|
1016
|
-
() => s.value,
|
|
1017
|
-
(i) => {
|
|
1018
|
-
e.value && !l.value && (e.value.style.transform = `scale(${i})`);
|
|
1019
|
-
}
|
|
1020
|
-
), { handleZoom: c, canvasScale: s };
|
|
1021
|
-
}
|
|
1022
|
-
function Gt(e, n = 16.66) {
|
|
1023
|
-
let s;
|
|
1024
|
-
function l() {
|
|
1025
|
-
c(), s = window.setInterval(e, n);
|
|
1026
|
-
}
|
|
1027
|
-
function c() {
|
|
1028
|
-
window.clearInterval(s);
|
|
1029
|
-
}
|
|
1030
|
-
return {
|
|
1031
|
-
startTimedQuery: l,
|
|
1032
|
-
stopTimedQuery: c
|
|
1033
|
-
};
|
|
1034
|
-
}
|
|
1035
|
-
const It = { class: "min-w-750px rounded" }, xt = { class: "h-full rounded" }, _t = /* @__PURE__ */ le({
|
|
1036
|
-
__name: "index",
|
|
1037
|
-
setup(e, { expose: n }) {
|
|
1038
|
-
const s = J.getComponent("monacoEditor"), l = J.getComponent("modal"), c = V(null), i = V(!1), g = V(!1), h = V({}), m = ee("pageSchema"), N = V(null), O = V("");
|
|
1039
|
-
function t() {
|
|
1040
|
-
g.value = !1;
|
|
1041
|
-
}
|
|
1042
|
-
function I() {
|
|
1043
|
-
i.value = !1;
|
|
1044
|
-
}
|
|
1045
|
-
function u() {
|
|
1046
|
-
i.value = !0, O.value = ke();
|
|
1047
|
-
}
|
|
1048
|
-
async function y() {
|
|
1049
|
-
try {
|
|
1050
|
-
let v = await N.value.validateAll();
|
|
1051
|
-
if (!Object.keys(v).length) {
|
|
1052
|
-
alert("请添加表单组件后再尝试!");
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
Object.keys(v).length === 1 && (v = v.default), h.value = JSON.stringify(v, null, 2), ce(() => {
|
|
1056
|
-
var A;
|
|
1057
|
-
(A = c.value) == null || A.setValue(h.value);
|
|
1058
|
-
}), g.value = !0;
|
|
1059
|
-
} catch (v) {
|
|
1060
|
-
console.error(v);
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
return n({
|
|
1064
|
-
handleOpen: u
|
|
1065
|
-
}), (v, A) => (z(), Q(R(l), {
|
|
1066
|
-
modelValue: i.value,
|
|
1067
|
-
"onUpdate:modelValue": A[1] || (A[1] = (P) => i.value = P),
|
|
1068
|
-
title: "预览",
|
|
1069
|
-
class: "w-900px",
|
|
1070
|
-
width: "900px",
|
|
1071
|
-
onClose: I,
|
|
1072
|
-
onOk: y,
|
|
1073
|
-
okText: "表单数据"
|
|
1074
|
-
}, {
|
|
1075
|
-
default: T(() => [
|
|
1076
|
-
q("div", It, [
|
|
1077
|
-
(z(), Q(R(rt), {
|
|
1078
|
-
key: O.value,
|
|
1079
|
-
ref_key: "kb",
|
|
1080
|
-
ref: N,
|
|
1081
|
-
"page-schema": R(m)
|
|
1082
|
-
}, null, 8, ["page-schema"])),
|
|
1083
|
-
G(R(l), {
|
|
1084
|
-
modelValue: g.value,
|
|
1085
|
-
"onUpdate:modelValue": A[0] || (A[0] = (P) => g.value = P),
|
|
1086
|
-
title: "表单数据",
|
|
1087
|
-
class: "w-860px",
|
|
1088
|
-
width: "860px",
|
|
1089
|
-
onClose: t,
|
|
1090
|
-
onOk: t
|
|
1091
|
-
}, {
|
|
1092
|
-
default: T(() => [
|
|
1093
|
-
q("div", xt, [
|
|
1094
|
-
G(R(s), {
|
|
1095
|
-
ref_key: "monacoEditorRef",
|
|
1096
|
-
ref: c,
|
|
1097
|
-
autoToggleTheme: "",
|
|
1098
|
-
readOnly: "",
|
|
1099
|
-
class: "h-full editor",
|
|
1100
|
-
"model-value": h.value
|
|
1101
|
-
}, null, 8, ["model-value"])
|
|
1102
|
-
])
|
|
1103
|
-
]),
|
|
1104
|
-
_: 1
|
|
1105
|
-
}, 8, ["modelValue"])
|
|
1106
|
-
])
|
|
1107
|
-
]),
|
|
1108
|
-
_: 1
|
|
1109
|
-
}, 8, ["modelValue"]));
|
|
1110
|
-
}
|
|
1111
|
-
}), $t = {
|
|
1112
|
-
key: 0,
|
|
1113
|
-
class: "epic-loading-box"
|
|
1114
|
-
}, Nt = { class: "epic-designer-main" }, Ft = { class: "epic-header-container" }, Vt = { class: "epic-loading-box" }, Qt = /* @__PURE__ */ le({
|
|
1115
|
-
__name: "designer",
|
|
1116
|
-
props: {
|
|
1117
|
-
disabledZoom: { type: Boolean, default: !1 },
|
|
1118
|
-
hiddenHeader: { type: Boolean, default: !1 },
|
|
1119
|
-
lockDefaultSchemaEdit: { type: Boolean, default: !1 },
|
|
1120
|
-
formMode: { type: Boolean, default: !1 },
|
|
1121
|
-
title: { default: "EpicDesigner默认项目" },
|
|
1122
|
-
defaultSchema: {},
|
|
1123
|
-
sourceCodeReadOnly: { type: Boolean },
|
|
1124
|
-
source: { default: [] },
|
|
1125
|
-
updateSourceId: {}
|
|
1126
|
-
},
|
|
1127
|
-
emits: [
|
|
1128
|
-
"ready",
|
|
1129
|
-
"save",
|
|
1130
|
-
"reset",
|
|
1131
|
-
"toggleDeviceMode",
|
|
1132
|
-
"saveSourceData",
|
|
1133
|
-
"deleteSourceData",
|
|
1134
|
-
"updateSourceData"
|
|
1135
|
-
],
|
|
1136
|
-
setup(e, { expose: n, emit: s }) {
|
|
1137
|
-
const { t: l } = Oe(), c = oe(() => import("./index-IGxCNti8.js")), i = oe(() => import("./index-WkZdU_zw.js")), g = oe(() => import("./index-BJHU3Dzu.js")), h = oe(() => import("./index-Cln9MN7u.js")), m = oe(() => import("./index-DgcFxYFp.js")), N = Ce(), O = Xe(), t = e;
|
|
1138
|
-
let I = {
|
|
1139
|
-
schemas: [
|
|
1140
|
-
{
|
|
1141
|
-
type: "form",
|
|
1142
|
-
id: "root",
|
|
1143
|
-
label: l("page"),
|
|
1144
|
-
children: [],
|
|
1145
|
-
componentProps: {
|
|
1146
|
-
name: l("form"),
|
|
1147
|
-
style: {
|
|
1148
|
-
padding: "16px"
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
// {
|
|
1153
|
-
// type: "form",
|
|
1154
|
-
// id: "root",
|
|
1155
|
-
// label: "表单",
|
|
1156
|
-
// children: [],
|
|
1157
|
-
// componentProps: {
|
|
1158
|
-
// style: {
|
|
1159
|
-
// margin: "0px",
|
|
1160
|
-
// },
|
|
1161
|
-
// name: "default",
|
|
1162
|
-
// labelWidth: "100px",
|
|
1163
|
-
// labelLayout: "fixed",
|
|
1164
|
-
// labelCol: {
|
|
1165
|
-
// span: 5,
|
|
1166
|
-
// },
|
|
1167
|
-
// wrapperCol: {
|
|
1168
|
-
// span: 19,
|
|
1169
|
-
// },
|
|
1170
|
-
// },
|
|
1171
|
-
// },
|
|
1172
|
-
],
|
|
1173
|
-
script: `const { defineExpose, find } = epic;
|
|
1174
|
-
|
|
1175
|
-
function test (){
|
|
1176
|
-
console.log('test')
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
// 通过defineExpose暴露的函数或者属性
|
|
1180
|
-
defineExpose({
|
|
1181
|
-
test
|
|
1182
|
-
})`
|
|
1183
|
-
};
|
|
1184
|
-
he(() => {
|
|
1185
|
-
if (t.defaultSchema) {
|
|
1186
|
-
I = t.defaultSchema;
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
t.source && J.setSourceData(t.source), t.formMode && (I.schemas = J.formSchemas);
|
|
1190
|
-
}), N.setDesignMode(), N.setDefaultComponentIds(I.schemas);
|
|
1191
|
-
const u = s, y = V(null), v = re({
|
|
1192
|
-
checkedNode: null,
|
|
1193
|
-
hoverNode: null,
|
|
1194
|
-
disableHover: !1,
|
|
1195
|
-
matched: []
|
|
1196
|
-
}), A = re({
|
|
1197
|
-
schemas: [],
|
|
1198
|
-
script: I.script
|
|
1199
|
-
}), { disabledZoom: P } = ge();
|
|
1200
|
-
he(() => {
|
|
1201
|
-
P.value = t.disabledZoom;
|
|
1202
|
-
}), he(() => {
|
|
1203
|
-
const a = A.script;
|
|
1204
|
-
a && a !== "" && N.setMethods(a);
|
|
1205
|
-
}), K("pageSchema", A), K("revoke", O), K("pageManager", N), K(
|
|
1206
|
-
"designerProps",
|
|
1207
|
-
Z(() => t)
|
|
1208
|
-
), K("designer", {
|
|
1209
|
-
setCheckedNode: b,
|
|
1210
|
-
setHoverNode: x,
|
|
1211
|
-
setDisableHover: w,
|
|
1212
|
-
handleToggleDeviceMode: X,
|
|
1213
|
-
reset: _,
|
|
1214
|
-
state: v
|
|
1215
|
-
}), se.on("saveSourceData", (a) => {
|
|
1216
|
-
u("saveSourceData", a);
|
|
1217
|
-
}), se.on("deleteSourceData", (a) => {
|
|
1218
|
-
u("deleteSourceData", a);
|
|
1219
|
-
}), se.on("updateSourceData", (a) => {
|
|
1220
|
-
u("updateSourceData", a);
|
|
1221
|
-
});
|
|
1222
|
-
function p() {
|
|
1223
|
-
A.schemas = W(I.schemas), b(A.schemas[0]), O.push(A.schemas, "初始化撤销功能");
|
|
1224
|
-
}
|
|
1225
|
-
async function b(a = A.schemas[0]) {
|
|
1226
|
-
v.checkedNode = a, v.matched = qe(A.schemas, a.id);
|
|
1227
|
-
}
|
|
1228
|
-
async function x(a = null) {
|
|
1229
|
-
var F;
|
|
1230
|
-
if (!a || v.disableHover)
|
|
1231
|
-
return v.hoverNode = null, !1;
|
|
1232
|
-
if ((a == null ? void 0 : a.id) === ((F = v.hoverNode) == null ? void 0 : F.id))
|
|
1233
|
-
return !1;
|
|
1234
|
-
v.hoverNode = a;
|
|
1235
|
-
}
|
|
1236
|
-
function C() {
|
|
1237
|
-
ce(() => {
|
|
1238
|
-
u("ready", { pageManager: N });
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
async function w(a = !1) {
|
|
1242
|
-
v.disableHover = a;
|
|
1243
|
-
}
|
|
1244
|
-
function U(a) {
|
|
1245
|
-
ae(A, W(a));
|
|
1246
|
-
}
|
|
1247
|
-
function L() {
|
|
1248
|
-
return xe(A);
|
|
1249
|
-
}
|
|
1250
|
-
function _() {
|
|
1251
|
-
Ve(A.schemas, I.schemas) && A.script === I.script || (ae(A.schemas, I.schemas), A.script = I.script, b(A.schemas[0]), O.push(A.schemas, "重置操作"), u("reset", A));
|
|
1252
|
-
}
|
|
1253
|
-
function S() {
|
|
1254
|
-
u("save", xe(A));
|
|
1255
|
-
}
|
|
1256
|
-
function X(a) {
|
|
1257
|
-
u("toggleDeviceMode", a);
|
|
1258
|
-
}
|
|
1259
|
-
function d() {
|
|
1260
|
-
y.value.handleOpen();
|
|
1261
|
-
}
|
|
1262
|
-
return p(), n({
|
|
1263
|
-
revoke: O,
|
|
1264
|
-
setData: U,
|
|
1265
|
-
getData: L,
|
|
1266
|
-
reset: _,
|
|
1267
|
-
preview: d
|
|
1268
|
-
}), (a, F) => R(J).initialized.value ? (z(), Q(Fe, {
|
|
1269
|
-
key: 1,
|
|
1270
|
-
onResolve: C
|
|
1271
|
-
}, {
|
|
1272
|
-
default: T(() => [
|
|
1273
|
-
q("div", Nt, [
|
|
1274
|
-
q("div", Ft, [
|
|
1275
|
-
H(a.$slots, "header", {}, () => [
|
|
1276
|
-
t.hiddenHeader ? Ne("", !0) : (z(), Q(R(c), {
|
|
1277
|
-
key: 0,
|
|
1278
|
-
onPreview: d,
|
|
1279
|
-
onSave: S
|
|
1280
|
-
}, {
|
|
1281
|
-
header: T(() => [
|
|
1282
|
-
H(a.$slots, "header-prefix")
|
|
1283
|
-
]),
|
|
1284
|
-
prefix: T(() => [
|
|
1285
|
-
H(a.$slots, "header-prefix")
|
|
1286
|
-
]),
|
|
1287
|
-
title: T(() => [
|
|
1288
|
-
H(a.$slots, "header-title")
|
|
1289
|
-
]),
|
|
1290
|
-
"right-prefix": T(() => [
|
|
1291
|
-
H(a.$slots, "header-right-prefix")
|
|
1292
|
-
]),
|
|
1293
|
-
"right-action": T(() => [
|
|
1294
|
-
H(a.$slots, "header-right-action")
|
|
1295
|
-
]),
|
|
1296
|
-
"right-suffix": T(() => [
|
|
1297
|
-
H(a.$slots, "header-right-suffix")
|
|
1298
|
-
]),
|
|
1299
|
-
_: 3
|
|
1300
|
-
}))
|
|
1301
|
-
])
|
|
1302
|
-
]),
|
|
1303
|
-
q("div", {
|
|
1304
|
-
class: Ge(["epic-split-view-container", { "hidden-header": a.hiddenHeader }])
|
|
1305
|
-
}, [
|
|
1306
|
-
G(R(i)),
|
|
1307
|
-
G(R(g)),
|
|
1308
|
-
G(R(h))
|
|
1309
|
-
], 2),
|
|
1310
|
-
G(_t, {
|
|
1311
|
-
ref_key: "previewRef",
|
|
1312
|
-
ref: y
|
|
1313
|
-
}, null, 512)
|
|
1314
|
-
])
|
|
1315
|
-
]),
|
|
1316
|
-
fallback: T(() => [
|
|
1317
|
-
q("div", Vt, [
|
|
1318
|
-
G(R(m))
|
|
1319
|
-
])
|
|
1320
|
-
]),
|
|
1321
|
-
_: 3
|
|
1322
|
-
})) : (z(), Ee("div", $t));
|
|
1323
|
-
}
|
|
1324
|
-
}), Ct = {
|
|
1325
|
-
component: async () => await import("./index-zxyA8Keq.js"),
|
|
1326
|
-
defaultSchema: {
|
|
1327
|
-
label: "代码编辑器",
|
|
1328
|
-
type: "monacoEditor",
|
|
1329
|
-
field: "monacoEditor",
|
|
1330
|
-
icon: "epic-icon-write",
|
|
1331
|
-
input: !0
|
|
1332
|
-
},
|
|
1333
|
-
config: {
|
|
1334
|
-
attribute: [
|
|
1335
|
-
{
|
|
1336
|
-
label: "字段名",
|
|
1337
|
-
type: "input",
|
|
1338
|
-
field: "field"
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
label: "标题",
|
|
1342
|
-
type: "input",
|
|
1343
|
-
field: "label"
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
label: "默认值",
|
|
1347
|
-
type: "monacoEditor",
|
|
1348
|
-
field: "componentProps.defaultValue"
|
|
1349
|
-
}
|
|
1350
|
-
]
|
|
1351
|
-
},
|
|
1352
|
-
bindModel: "model-value"
|
|
1353
|
-
}, { t: be } = Oe(), Mt = {
|
|
1354
|
-
component: async () => await import("./index-DiDIFoTk.js"),
|
|
1355
|
-
defaultSchema: {
|
|
1356
|
-
label: be("page"),
|
|
1357
|
-
type: "page",
|
|
1358
|
-
componentProps: {},
|
|
1359
|
-
children: []
|
|
1360
|
-
},
|
|
1361
|
-
config: {
|
|
1362
|
-
attribute: [
|
|
1363
|
-
{
|
|
1364
|
-
label: be("pageName"),
|
|
1365
|
-
type: "input",
|
|
1366
|
-
componentProps: {
|
|
1367
|
-
placeholder: be("pleaseEnter")
|
|
1368
|
-
},
|
|
1369
|
-
field: "componentProps.name"
|
|
1370
|
-
}
|
|
1371
|
-
]
|
|
1372
|
-
}
|
|
1373
|
-
}, { t: me } = Oe();
|
|
1374
|
-
function Pt(e) {
|
|
1375
|
-
e.component("EInputSize", async () => await import("./index-Cx7gKpkD.js")), e.component("EColEditor", async () => await import("./index-CpTA2IRB.js")), e.component("EActionEditor", async () => await import("./index--PWf2Ut2.js")), e.component("ERuleEditor", async () => await import("./index-Cctdx_Vq.js")), e.component("EOptionsEditor", async () => await import("./index-DzC3poxn.js")), e.component("ENode", async () => await import("./index-JlyEcj-r.js")), e.component("EDataSource", async () => await import("./index-B0OgKtuT.js")), e.component("EColumnEditor", async () => await import("./index-DiQ4ZTF7.js")), e.component("PaddingMarginControl", async () => await import("./index-CdnV7DS4.js")), e.registerActivitybar({
|
|
1376
|
-
id: "component_view",
|
|
1377
|
-
title: me("component"),
|
|
1378
|
-
icon: "icon--epic--extension-outline",
|
|
1379
|
-
component: async () => await import("./index-CraRg8wh.js")
|
|
1380
|
-
}), e.registerActivitybar({
|
|
1381
|
-
id: "outline_view",
|
|
1382
|
-
title: me("outline"),
|
|
1383
|
-
icon: "icon--epic--account-tree-outline-rounded",
|
|
1384
|
-
component: async () => await import("./outline-Ch5PHy3c.js")
|
|
1385
|
-
}), e.registerRightSidebar({
|
|
1386
|
-
id: "attribute_view",
|
|
1387
|
-
title: me("attribute"),
|
|
1388
|
-
component: async () => await import("./attributeView-4j---k7X.js")
|
|
1389
|
-
}), e.registerRightSidebar({
|
|
1390
|
-
id: "style_view",
|
|
1391
|
-
title: me("style"),
|
|
1392
|
-
component: async () => await import("./styleView-DLmxP2vS.js")
|
|
1393
|
-
}), e.registerRightSidebar({
|
|
1394
|
-
id: "event_view",
|
|
1395
|
-
title: "事件",
|
|
1396
|
-
component: async () => await import("./eventView-C2wKhfU_.js")
|
|
1397
|
-
}), [Ct, Mt].forEach((s) => {
|
|
1398
|
-
e.registerComponent(s);
|
|
1399
|
-
});
|
|
1400
|
-
}
|
|
1401
|
-
Pt(J);
|
|
1402
|
-
export {
|
|
1403
|
-
et as _,
|
|
1404
|
-
Gt as a,
|
|
1405
|
-
St as b,
|
|
1406
|
-
Zt as c,
|
|
1407
|
-
zt as d,
|
|
1408
|
-
Wt as e,
|
|
1409
|
-
Lt as f,
|
|
1410
|
-
Ht as g,
|
|
1411
|
-
Kt as h,
|
|
1412
|
-
rt as i,
|
|
1413
|
-
Qt as j,
|
|
1414
|
-
Ce as k,
|
|
1415
|
-
Xe as l,
|
|
1416
|
-
Ot as m,
|
|
1417
|
-
bt as n,
|
|
1418
|
-
Dt as o,
|
|
1419
|
-
At as p,
|
|
1420
|
-
ge as u,
|
|
1421
|
-
Jt as w
|
|
1422
|
-
};
|