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