epic-designer-gold 1.0.7 → 1.0.9
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-CcnkUeu9.js → attributeView-BvXOVbk7.js} +1 -1
- package/dist/{attributeView-BCjRZKcy.cjs → attributeView-iVaomUyI.cjs} +1 -1
- package/dist/{index-BydHABbW.js → index-B-VAOMev.js} +1 -1
- package/dist/{index-BvvGezNc.js → index-B3keiKRy.js} +1 -1
- package/dist/index-B8Ir-lho.js +4 -0
- package/dist/{index-E8jDNKrc.js → index-BUloiuNZ.js} +1 -1
- package/dist/{index-CpBfljmg.cjs → index-BhYl2S9H.cjs} +1 -1
- package/dist/{index-BU05X44j.cjs → index-CXN5JcDN.cjs} +1 -1
- package/dist/{index-CD00bJyK.js → index-CXXMKZDX.js} +1 -1
- package/dist/index-CgboTSgt.cjs +10 -0
- package/dist/{index-BHEw6RsQ.cjs → index-D-MYAFvk.cjs} +1 -1
- package/dist/{index-GIYb626z.js → index-DChr8CfB.js} +443 -443
- package/dist/{index-C2s4IuAR.cjs → index-DDxqWsLh.cjs} +1 -1
- package/dist/{index-IPz4bbk7.cjs → index-Dmfk0xI0.cjs} +1 -1
- package/dist/{index-CG0UEELU.js → index-DqPRxkxh.js} +1 -1
- package/dist/{index-vCJWgHu-.js → index-Lc9Y13sl.js} +1 -1
- package/dist/{index-BvfkMKTv.cjs → index-QROM92Xw.cjs} +1 -1
- package/dist/{index-5yjG3fiB.cjs → index-jgqfPmDS.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{styleView-Dhj1GDqf.js → styleView-BAOpKnjx.js} +1 -1
- package/dist/{styleView-DocskQJQ.cjs → styleView-rQBBbLFF.cjs} +1 -1
- package/package.json +1 -1
- package/vite.config.ts.timestamp-1748427578982-d7ce374e905ab.mjs +78 -0
- package/dist/index-0WmqAKuy.js +0 -4
- package/dist/index-BY37Ndo7.cjs +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as C, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as R, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as ee, watch as B, useAttrs as Re, provide as Z, shallowRef as Ue, computed as W, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as Q, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as
|
|
2
|
-
import { p as J, f as Qe, d as
|
|
1
|
+
import { ref as C, reactive as re, defineComponent as le, openBlock as H, createBlock as Y, unref as R, mergeProps as be, withCtx as T, renderSlot as K, getCurrentInstance as ue, inject as ee, watch as B, useAttrs as Re, provide as Z, shallowRef as Ue, computed as W, watchEffect as he, onUnmounted as $e, resolveComponent as Te, resolveDynamicComponent as Be, createVNode as Q, createCommentVNode as Ne, useSlots as Le, createElementBlock as Ee, Suspense as Fe, createElementVNode as X, 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 Ie } from "vue";
|
|
2
|
+
import { p as J, f as Qe, d as ie, a as G, b as Ve, c as Ye, E as se, l as oe, g as qe, e as Xe } from "./pluginManager-BCnrHPYv.js";
|
|
3
3
|
import { a as pe, u as Oe } from "./index-B1s67XDZ.js";
|
|
4
4
|
import { a as _e } from "./axios-CXDYiOMX.js";
|
|
5
5
|
function Lt(e, n) {
|
|
@@ -12,25 +12,25 @@ function Lt(e, n) {
|
|
|
12
12
|
}
|
|
13
13
|
function Ce() {
|
|
14
14
|
const e = C({}), n = C({}), s = C(!1), r = C([]), c = re({});
|
|
15
|
-
function
|
|
15
|
+
function a(p) {
|
|
16
16
|
return e.value[p];
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function w(p, D) {
|
|
19
19
|
e.value[p] = D;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function g(p) {
|
|
22
22
|
delete e.value[p];
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function h(p, D = !1) {
|
|
25
25
|
const I = Object.entries(J.publicMethods).reduce(
|
|
26
|
-
(M, [
|
|
26
|
+
(M, [m, U]) => (M[m] = U.handler, M),
|
|
27
27
|
{}
|
|
28
28
|
);
|
|
29
29
|
try {
|
|
30
30
|
new Function(`const epic = this;${p}`).bind({
|
|
31
31
|
...I,
|
|
32
|
-
getComponent:
|
|
33
|
-
find:
|
|
32
|
+
getComponent: a,
|
|
33
|
+
find: a,
|
|
34
34
|
defineExpose: F,
|
|
35
35
|
publicMethods: I,
|
|
36
36
|
pluginManager: J
|
|
@@ -42,7 +42,7 @@ function Ce() {
|
|
|
42
42
|
function F(p) {
|
|
43
43
|
p != null && (n.value = p);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function O(p, ...D) {
|
|
46
46
|
if (!p || p.length === 0) {
|
|
47
47
|
console.warn("未提供任何动作");
|
|
48
48
|
return;
|
|
@@ -54,10 +54,10 @@ function Ce() {
|
|
|
54
54
|
t(I, M);
|
|
55
55
|
break;
|
|
56
56
|
case "custom":
|
|
57
|
-
|
|
57
|
+
x(I, M);
|
|
58
58
|
break;
|
|
59
59
|
case "component":
|
|
60
|
-
|
|
60
|
+
d(I, M);
|
|
61
61
|
break;
|
|
62
62
|
default:
|
|
63
63
|
console.warn(`未知的动作类型: ${I.type}`);
|
|
@@ -73,16 +73,16 @@ function Ce() {
|
|
|
73
73
|
console.error(`[Epic:公共函数(${p.methodName})]执行异常:`, M);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function x(p, D) {
|
|
77
77
|
var I, M;
|
|
78
78
|
try {
|
|
79
79
|
(M = (I = n.value)[p.methodName]) == null || M.call(I, ...D);
|
|
80
|
-
} catch (
|
|
81
|
-
console.error(`[Epic:自定义函数(${p.methodName})]执行异常:`,
|
|
80
|
+
} catch (m) {
|
|
81
|
+
console.error(`[Epic:自定义函数(${p.methodName})]执行异常:`, m);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const I = p.componentId != null &&
|
|
84
|
+
function d(p, D) {
|
|
85
|
+
const I = p.componentId != null && a(p.componentId);
|
|
86
86
|
if (!I) {
|
|
87
87
|
console.warn(`[Epic:组件${p.componentId}]未找到`);
|
|
88
88
|
return;
|
|
@@ -93,23 +93,23 @@ function Ce() {
|
|
|
93
93
|
console.error(`[Epic:组件${p.componentId}函数(${p.methodName})]执行异常:`, M);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function S(p = !0) {
|
|
97
97
|
s.value = p;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function y(p) {
|
|
100
100
|
const D = Qe(p, () => !0);
|
|
101
101
|
r.value = D.map((I) => I.id);
|
|
102
102
|
}
|
|
103
103
|
function E(p, D = "default") {
|
|
104
104
|
if (c[D]) {
|
|
105
105
|
const I = c[D];
|
|
106
|
-
|
|
106
|
+
ie(p, I);
|
|
107
107
|
}
|
|
108
108
|
c[D] = p;
|
|
109
109
|
}
|
|
110
110
|
function P(p, D = "default") {
|
|
111
111
|
if (c[D]) {
|
|
112
|
-
|
|
112
|
+
ie(c[D], p, !1);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
c[D] = p;
|
|
@@ -122,40 +122,40 @@ function Ce() {
|
|
|
122
122
|
forms: c,
|
|
123
123
|
addFormData: E,
|
|
124
124
|
setFormData: P,
|
|
125
|
-
getComponentInstance:
|
|
125
|
+
getComponentInstance: a,
|
|
126
126
|
// 简化查询函数, 推荐使用
|
|
127
|
-
find:
|
|
128
|
-
addComponentInstance:
|
|
129
|
-
removeComponentInstance:
|
|
130
|
-
setMethods:
|
|
131
|
-
doActions:
|
|
132
|
-
setDesignMode:
|
|
133
|
-
setDefaultComponentIds:
|
|
127
|
+
find: a,
|
|
128
|
+
addComponentInstance: w,
|
|
129
|
+
removeComponentInstance: g,
|
|
130
|
+
setMethods: h,
|
|
131
|
+
doActions: O,
|
|
132
|
+
setDesignMode: S,
|
|
133
|
+
setDefaultComponentIds: y
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ke() {
|
|
137
137
|
const e = C([]), n = C([]), s = C(null);
|
|
138
138
|
let r = 0;
|
|
139
|
-
function c(
|
|
140
|
-
const
|
|
141
|
-
r + 150 >
|
|
139
|
+
function c(h, F = "插入组件") {
|
|
140
|
+
const O = Date.now();
|
|
141
|
+
r + 150 > O || (r = O, s.value != null && (e.value.push(s.value), n.value.splice(0, n.value.length)), s.value = {
|
|
142
142
|
type: F,
|
|
143
|
-
componentSchema: JSON.stringify(
|
|
143
|
+
componentSchema: JSON.stringify(h)
|
|
144
144
|
}, e.value.length > 60 && e.value.unshift());
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function a() {
|
|
147
147
|
if (e.value.length === 0)
|
|
148
148
|
return !1;
|
|
149
|
-
const
|
|
150
|
-
return s.value != null && n.value.push(s.value), s.value =
|
|
149
|
+
const h = e.value.pop();
|
|
150
|
+
return s.value != null && n.value.push(s.value), s.value = h, JSON.parse(h.componentSchema);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function w() {
|
|
153
153
|
if (n.value.length === 0)
|
|
154
154
|
return !1;
|
|
155
|
-
const
|
|
156
|
-
return s.value != null && e.value.push(s.value), s.value =
|
|
155
|
+
const h = n.value.pop();
|
|
156
|
+
return s.value != null && e.value.push(s.value), s.value = h, JSON.parse(h.componentSchema);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function g() {
|
|
159
159
|
e.value = [], n.value = [], s.value = null;
|
|
160
160
|
}
|
|
161
161
|
return {
|
|
@@ -163,9 +163,9 @@ function Xe() {
|
|
|
163
163
|
undoList: n,
|
|
164
164
|
currentRecord: s,
|
|
165
165
|
push: c,
|
|
166
|
-
undo:
|
|
167
|
-
redo:
|
|
168
|
-
reset:
|
|
166
|
+
undo: a,
|
|
167
|
+
redo: w,
|
|
168
|
+
reset: g
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
const je = /* @__PURE__ */ le({
|
|
@@ -176,20 +176,20 @@ const je = /* @__PURE__ */ le({
|
|
|
176
176
|
},
|
|
177
177
|
emits: ["updateFormItemRef"],
|
|
178
178
|
setup(e, { emit: n }) {
|
|
179
|
-
const s = J.getComponent("form-item"), r = e, c = n,
|
|
180
|
-
c("updateFormItemRef",
|
|
179
|
+
const s = J.getComponent("form-item"), r = e, c = n, a = C(), w = () => {
|
|
180
|
+
c("updateFormItemRef", a.value);
|
|
181
181
|
};
|
|
182
|
-
return (
|
|
182
|
+
return (g, h) => r.hasFormItem ? (H(), Y(R(s), be({
|
|
183
183
|
key: 0,
|
|
184
184
|
ref_key: "formItemRef",
|
|
185
|
-
ref:
|
|
186
|
-
onVnodeMounted:
|
|
185
|
+
ref: a,
|
|
186
|
+
onVnodeMounted: w
|
|
187
187
|
}, r.formItemProps), {
|
|
188
188
|
default: T(() => [
|
|
189
|
-
K(
|
|
189
|
+
K(g.$slots, "default")
|
|
190
190
|
]),
|
|
191
191
|
_: 3
|
|
192
|
-
}, 16, ["onVnodeMounted"])) : K(
|
|
192
|
+
}, 16, ["onVnodeMounted"])) : K(g.$slots, "default", { key: 1 });
|
|
193
193
|
}
|
|
194
194
|
}), et = /* @__PURE__ */ le({
|
|
195
195
|
name: "ENode",
|
|
@@ -207,13 +207,13 @@ const je = /* @__PURE__ */ le({
|
|
|
207
207
|
emits: ["update:modelValue", "change", "update:dynamicId"],
|
|
208
208
|
setup(e, { emit: n }) {
|
|
209
209
|
const { proxy: s } = ue(), r = e, c = C(null);
|
|
210
|
-
let
|
|
211
|
-
const
|
|
210
|
+
let a = ee("formData", re({}));
|
|
211
|
+
const w = ee("slots", {}), g = ee("pageManager", {}), h = ee("disabled", { value: !1 }), F = ee("ruleFieldPrefix", null), O = ee("resetFormData", !1);
|
|
212
212
|
let t = re(G(r.componentSchema));
|
|
213
|
-
|
|
214
|
-
async function
|
|
213
|
+
S();
|
|
214
|
+
async function x(o) {
|
|
215
215
|
if (["cascader", "checkbox", "select", "radio"].includes(o.type) && o.componentProps.dynamicId && r.sourceDateUrl) {
|
|
216
|
-
const
|
|
216
|
+
const u = (await _e({
|
|
217
217
|
// || "http://192.168.28.205:3000/dev-api/data-source
|
|
218
218
|
url: r.sourceDateUrl,
|
|
219
219
|
method: "get",
|
|
@@ -228,13 +228,13 @@ const je = /* @__PURE__ */ le({
|
|
|
228
228
|
//时区
|
|
229
229
|
}
|
|
230
230
|
})).data.data;
|
|
231
|
-
let
|
|
232
|
-
url:
|
|
233
|
-
method:
|
|
234
|
-
data: JSON.parse(
|
|
235
|
-
params: JSON.parse(
|
|
231
|
+
let _ = await _e({
|
|
232
|
+
url: u.url,
|
|
233
|
+
method: u.method,
|
|
234
|
+
data: u.body ? JSON.parse(u.body) : {},
|
|
235
|
+
params: u.params ? JSON.parse(u.params) : {},
|
|
236
236
|
headers: {
|
|
237
|
-
...JSON.parse(
|
|
237
|
+
...JSON.parse(u.headers),
|
|
238
238
|
Authorization: "Bearer " + pe.get("Admin-Token"),
|
|
239
239
|
lang: pe.get("saas-locale") || "zh-CN",
|
|
240
240
|
//语言
|
|
@@ -242,111 +242,111 @@ const je = /* @__PURE__ */ le({
|
|
|
242
242
|
//时区
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
|
-
if (
|
|
246
|
-
const ne =
|
|
247
|
-
o.componentProps.options =
|
|
245
|
+
if (u && (u != null && u.dataPath)) {
|
|
246
|
+
const ne = u.dataPath.split(".").reduce((de, fe) => de[fe], _.data);
|
|
247
|
+
o.componentProps.options = d(ne, u.dataKey, u.dataValue);
|
|
248
248
|
} else
|
|
249
|
-
o.componentProps.options =
|
|
249
|
+
o.componentProps.options = d(_.data, u.dataKey, u.dataValue);
|
|
250
250
|
return o;
|
|
251
251
|
}
|
|
252
252
|
return o;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
return o && Object.prototype.toString.call(o) === "[object Array]" ? o.map((
|
|
256
|
-
label:
|
|
257
|
-
value:
|
|
258
|
-
children: u
|
|
254
|
+
function d(o, l, $) {
|
|
255
|
+
return o && Object.prototype.toString.call(o) === "[object Array]" ? o.map((u) => u.children && u.children.length ? {
|
|
256
|
+
label: u[l],
|
|
257
|
+
value: u[$] + "",
|
|
258
|
+
children: d(u.children, l, $)
|
|
259
259
|
} : {
|
|
260
|
-
label:
|
|
261
|
-
value:
|
|
260
|
+
label: u[l],
|
|
261
|
+
value: u[$] + ""
|
|
262
262
|
}) : [];
|
|
263
263
|
}
|
|
264
264
|
B(
|
|
265
265
|
() => r.componentSchema,
|
|
266
266
|
(o) => {
|
|
267
|
-
Ve(t, o, ["children"]) || (
|
|
267
|
+
Ve(t, o, ["children"]) || (ie(t, G(o)), S());
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
deep: !0
|
|
271
271
|
}
|
|
272
272
|
);
|
|
273
|
-
function
|
|
274
|
-
|
|
273
|
+
function S() {
|
|
274
|
+
g.isDesignMode.value && typeof t.field == "string" && (t.field += "-design-mode");
|
|
275
275
|
}
|
|
276
|
-
(r.resetFormData ||
|
|
277
|
-
const
|
|
276
|
+
(r.resetFormData || O) && (a = {});
|
|
277
|
+
const y = n, E = C(), P = C(), p = (o) => {
|
|
278
278
|
P.value = o;
|
|
279
279
|
}, D = Re();
|
|
280
280
|
Object.keys(D).length && Z("nodeAttrs", D);
|
|
281
281
|
const I = Ue(null), M = W(() => {
|
|
282
282
|
var o, l;
|
|
283
|
-
return (o = t.componentProps) != null && o.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((l = t.show) == null ? void 0 : l.call(t, { values:
|
|
284
|
-
}),
|
|
285
|
-
var
|
|
286
|
-
const o = M.value && ((
|
|
287
|
-
...
|
|
288
|
-
validator:
|
|
283
|
+
return (o = t.componentProps) != null && o.hidden ? !1 : typeof t.show == "boolean" ? t.show : ((l = t.show) == null ? void 0 : l.call(t, { values: a })) ?? !0;
|
|
284
|
+
}), m = W(() => {
|
|
285
|
+
var u;
|
|
286
|
+
const o = M.value && ((u = t.rules) == null ? void 0 : u.map((_) => ({
|
|
287
|
+
..._,
|
|
288
|
+
validator: _.validator && g.funcs.value[_.validator]
|
|
289
289
|
// 自定义校验函数
|
|
290
290
|
})));
|
|
291
291
|
let l = t.field;
|
|
292
292
|
r.ruleField ? l = r.ruleField : F && t.field && (l = G(F), l.push(t.field));
|
|
293
|
-
const
|
|
293
|
+
const $ = {
|
|
294
294
|
...t,
|
|
295
295
|
rules: o,
|
|
296
296
|
rule: o,
|
|
297
297
|
field: l
|
|
298
298
|
};
|
|
299
|
-
return
|
|
299
|
+
return $.children && delete $.children, $;
|
|
300
300
|
}), U = W(() => {
|
|
301
|
-
var
|
|
302
|
-
const o = ((
|
|
303
|
-
return t.on && Object.keys(t.on).forEach((
|
|
304
|
-
l[`on${Ye(
|
|
301
|
+
var $, u;
|
|
302
|
+
const o = (($ = L.value) == null ? void 0 : $.bindModel) ?? "modelValue", l = {};
|
|
303
|
+
return t.on && Object.keys(t.on).forEach((_) => {
|
|
304
|
+
l[`on${Ye(_)}`] = (...z) => g.doActions(t.on[_], ...z);
|
|
305
305
|
}), {
|
|
306
306
|
...r,
|
|
307
307
|
...t.componentProps,
|
|
308
|
-
disabled: (
|
|
308
|
+
disabled: (h == null ? void 0 : h.value) || ((u = t.componentProps) == null ? void 0 : u.disabled),
|
|
309
309
|
bindModel: o,
|
|
310
310
|
...l
|
|
311
311
|
};
|
|
312
312
|
}), L = W(() => J.getComponentConfingByType(t.type) ?? null);
|
|
313
313
|
he(() => {
|
|
314
|
-
c.value = r.modelValue ??
|
|
314
|
+
c.value = r.modelValue ?? a[t.field ?? ""];
|
|
315
315
|
}), B(
|
|
316
316
|
() => c.value,
|
|
317
317
|
() => {
|
|
318
|
-
c.value !== (r.modelValue ??
|
|
318
|
+
c.value !== (r.modelValue ?? a[t.field ?? ""]) && i(c.value);
|
|
319
319
|
}
|
|
320
320
|
), B(
|
|
321
321
|
() => E.value,
|
|
322
322
|
() => {
|
|
323
|
-
|
|
323
|
+
A();
|
|
324
324
|
},
|
|
325
325
|
{ immediate: !0 }
|
|
326
326
|
);
|
|
327
|
-
function
|
|
327
|
+
function A() {
|
|
328
328
|
var l;
|
|
329
329
|
const o = E.value || s;
|
|
330
|
-
t.id && o && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (o.setValue =
|
|
330
|
+
t.id && o && ((t.input || t.type === "table" && t.field || t.type === "card" && t.field && t.multiple) && (o.setValue = i, o.getValue = () => a[t.field] || r.modelValue), o.setAttr = ($, u) => (t.componentProps || (t.componentProps = {}), t.componentProps[$] = u), o.getAttr = ($) => t.componentProps[$], g.addComponentInstance(t.id, o), (l = L.value) != null && l.defaultSchema.input && t.noFormItem !== !0 && P.value && g.addComponentInstance(t.id + "formItem", P.value));
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function v() {
|
|
333
333
|
var o;
|
|
334
|
-
t.id && (
|
|
334
|
+
t.id && (g.removeComponentInstance(t.id), (o = L.value) != null && o.defaultSchema.input && t.noFormItem !== !0 && g.removeComponentInstance(t.id + "formItem"));
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
337
|
-
var l,
|
|
338
|
-
if (t = await
|
|
339
|
-
const
|
|
340
|
-
|
|
336
|
+
async function k() {
|
|
337
|
+
var l, $, u;
|
|
338
|
+
if (t = await x(t), typeof ((l = t.componentProps) == null ? void 0 : l.defaultValue) < "u") {
|
|
339
|
+
const _ = g.isDesignMode.value ? ($ = t.componentProps) == null ? void 0 : $.defaultValue : a[t.field] ?? ((u = t.componentProps) == null ? void 0 : u.defaultValue);
|
|
340
|
+
i(G(_));
|
|
341
341
|
}
|
|
342
342
|
if (t.type === "slot") {
|
|
343
|
-
const
|
|
344
|
-
if (!
|
|
343
|
+
const _ = t.slotName;
|
|
344
|
+
if (!_) return;
|
|
345
345
|
I.value = le({
|
|
346
346
|
setup() {
|
|
347
|
-
return () => K(
|
|
347
|
+
return () => K(w, _, {
|
|
348
348
|
componentSchema: t,
|
|
349
|
-
model:
|
|
349
|
+
model: a
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
});
|
|
@@ -358,21 +358,21 @@ const je = /* @__PURE__ */ le({
|
|
|
358
358
|
return;
|
|
359
359
|
}
|
|
360
360
|
if (typeof o == "function") {
|
|
361
|
-
const
|
|
362
|
-
I.value =
|
|
361
|
+
const _ = await o();
|
|
362
|
+
I.value = _.default ?? _;
|
|
363
363
|
} else
|
|
364
364
|
I.value = o;
|
|
365
365
|
}
|
|
366
366
|
function f(o) {
|
|
367
367
|
Object.prototype.toString.call(o), Object.prototype.toString.call(o) === "[object Array]" ? o.forEach((l) => {
|
|
368
|
-
|
|
369
|
-
}) :
|
|
368
|
+
a[l.value] = l.label;
|
|
369
|
+
}) : a[o.value] = o.label, r.id && se.emit("updateformData" + r.id, a);
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
|
|
371
|
+
function i(o) {
|
|
372
|
+
y("update:modelValue", o), y("change", o), t.field && (a[t.field] = o), r.id && se.emit("updateformData" + r.id, a);
|
|
373
373
|
}
|
|
374
374
|
function V(o) {
|
|
375
|
-
|
|
375
|
+
y("update:dynamicId", o);
|
|
376
376
|
}
|
|
377
377
|
let N = null;
|
|
378
378
|
return B(
|
|
@@ -388,38 +388,38 @@ const je = /* @__PURE__ */ le({
|
|
|
388
388
|
});
|
|
389
389
|
if (l === N)
|
|
390
390
|
return !1;
|
|
391
|
-
N = l,
|
|
391
|
+
N = l, k();
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
immediate: !0,
|
|
395
395
|
deep: !0
|
|
396
396
|
}
|
|
397
|
-
), $e(
|
|
398
|
-
var
|
|
399
|
-
const
|
|
397
|
+
), $e(v), (o, l) => {
|
|
398
|
+
var u;
|
|
399
|
+
const $ = Te("ENode");
|
|
400
400
|
return I.value && M.value ? (H(), Y(je, {
|
|
401
401
|
key: 0,
|
|
402
|
-
hasFormItem: R(t).noFormItem !== !0 && ((
|
|
403
|
-
formItemProps:
|
|
402
|
+
hasFormItem: R(t).noFormItem !== !0 && ((u = L.value) == null ? void 0 : u.defaultSchema.input),
|
|
403
|
+
formItemProps: m.value,
|
|
404
404
|
onUpdateFormItemRef: p
|
|
405
405
|
}, {
|
|
406
406
|
default: T(() => [
|
|
407
407
|
(H(), Y(Be(I.value), be({
|
|
408
408
|
ref_key: "componentInstance",
|
|
409
409
|
ref: E,
|
|
410
|
-
onVnodeMounted:
|
|
411
|
-
model: R(
|
|
410
|
+
onVnodeMounted: A,
|
|
411
|
+
model: R(a)
|
|
412
412
|
}, { ...U.value }, {
|
|
413
413
|
[U.value.bindModel]: c.value,
|
|
414
|
-
["onUpdate:" + U.value.bindModel]: l[0] || (l[0] = (
|
|
415
|
-
[`onUpdate:${U.value.bindModel}` || ""]:
|
|
414
|
+
["onUpdate:" + U.value.bindModel]: l[0] || (l[0] = (_) => c.value = _),
|
|
415
|
+
[`onUpdate:${U.value.bindModel}` || ""]: i,
|
|
416
416
|
"onUpdate:modelValueLabel": f,
|
|
417
417
|
"onUpdate:dynamicId": V
|
|
418
418
|
}), {
|
|
419
|
-
node: T((
|
|
420
|
-
Q(
|
|
419
|
+
node: T((_) => [
|
|
420
|
+
Q($, be({
|
|
421
421
|
id: r.id
|
|
422
|
-
},
|
|
422
|
+
}, _, {
|
|
423
423
|
sourceDateUrl: r.sourceDateUrl
|
|
424
424
|
}), null, 16, ["id", "sourceDateUrl"])
|
|
425
425
|
]),
|
|
@@ -437,100 +437,100 @@ const je = /* @__PURE__ */ le({
|
|
|
437
437
|
function tt() {
|
|
438
438
|
const e = C(!1), n = Ce(), s = C({});
|
|
439
439
|
function r() {
|
|
440
|
-
return new Promise((
|
|
440
|
+
return new Promise((d) => {
|
|
441
441
|
if (e.value)
|
|
442
|
-
|
|
442
|
+
d();
|
|
443
443
|
else {
|
|
444
|
-
const
|
|
445
|
-
|
|
444
|
+
const S = B(e, () => {
|
|
445
|
+
S(), d();
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
async function c(
|
|
451
|
-
var
|
|
450
|
+
async function c(d = "default") {
|
|
451
|
+
var y;
|
|
452
452
|
await r();
|
|
453
|
-
const
|
|
454
|
-
if (!
|
|
455
|
-
return
|
|
453
|
+
const S = (y = s.value) == null ? void 0 : y[d];
|
|
454
|
+
if (!S) throw new Error(`表单 [name=${d}] 不存在`);
|
|
455
|
+
return S;
|
|
456
456
|
}
|
|
457
|
-
async function
|
|
458
|
-
const
|
|
459
|
-
return G(await
|
|
457
|
+
async function a(d, S) {
|
|
458
|
+
const y = await c(d);
|
|
459
|
+
return G(await S(y));
|
|
460
460
|
}
|
|
461
|
-
async function
|
|
462
|
-
return await
|
|
461
|
+
async function w(d = "default") {
|
|
462
|
+
return await a(d, (S) => S.getData());
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function g(d, S = "default", y = void 0) {
|
|
465
465
|
var E, P;
|
|
466
|
-
if (
|
|
467
|
-
let p = function(
|
|
466
|
+
if (y && Object.keys(y).length) {
|
|
467
|
+
let p = function(m) {
|
|
468
468
|
let U = [];
|
|
469
|
-
return
|
|
469
|
+
return m.forEach((L) => {
|
|
470
470
|
L.children && (U = [...U, ...p(L.children)]), U.push(L);
|
|
471
471
|
}), U;
|
|
472
|
-
}, I = function(
|
|
472
|
+
}, I = function(m) {
|
|
473
473
|
var L;
|
|
474
|
-
let U = p((L =
|
|
475
|
-
return Object.keys(
|
|
476
|
-
var f,
|
|
477
|
-
const
|
|
478
|
-
if ((
|
|
479
|
-
|
|
480
|
-
else if ((
|
|
481
|
-
|
|
482
|
-
else if (((
|
|
483
|
-
let
|
|
484
|
-
Object.entries(
|
|
485
|
-
|
|
486
|
-
}),
|
|
487
|
-
url:
|
|
488
|
-
name:
|
|
474
|
+
let U = p((L = y == null ? void 0 : y.schemas[0]) == null ? void 0 : L.children);
|
|
475
|
+
return Object.keys(m).forEach((A) => {
|
|
476
|
+
var f, i, V, N, o, l, $;
|
|
477
|
+
const v = U.find((u) => u.field === A), k = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
478
|
+
if ((v && (v == null ? void 0 : v.type) === "checkbox" || (v == null ? void 0 : v.type) === "select" && ((f = v == null ? void 0 : v.componentProps) != null && f.multiple) || (v == null ? void 0 : v.type) === "cascader" && !((V = (i = v == null ? void 0 : v.componentProps) == null ? void 0 : i.props) != null && V.multiple) || (v == null ? void 0 : v.type) === "date" && k.includes((N = v == null ? void 0 : v.componentProps) == null ? void 0 : N.type)) && typeof m[A] == "string")
|
|
479
|
+
m[A] = (o = m[A]) == null ? void 0 : o.split(",");
|
|
480
|
+
else if ((v == null ? void 0 : v.type) === "cascader" && (($ = (l = v == null ? void 0 : v.componentProps) == null ? void 0 : l.props) != null && $.multiple) && typeof m[A] == "string")
|
|
481
|
+
m[A].indexOf(";") === -1 && m[A].indexOf(";") === -1 ? m[A][m[A]] : m[A].indexOf(";") > -1 ? m[A] = m[A].split(";").map((u) => u.split(",")) : m[A].indexOf(";") === -1 ? m[A] = m[A].split(",") : m[A].indexOf(";") > -1 ? m[A] = m[A].split(";").map((u) => u.split(",")) : m[A].indexOf(";") === -1 && (m[A] = m[A].split(","));
|
|
482
|
+
else if (((v == null ? void 0 : v.type) === "upload-image" || (v == null ? void 0 : v.type) === "upload-file") && typeof m[A] == "string") {
|
|
483
|
+
let u = [];
|
|
484
|
+
Object.entries(m).forEach(([_, z]) => {
|
|
485
|
+
m[A] === z && _ !== v.field && _.indexOf("@") > -1 && _.indexOf(A) > -1 && (u = _.split("@")[1].split(","));
|
|
486
|
+
}), m[A] = m[A].split(",").map((_, z) => ({
|
|
487
|
+
url: _,
|
|
488
|
+
name: u[z] || _
|
|
489
489
|
}));
|
|
490
|
-
} else (
|
|
491
|
-
}),
|
|
492
|
-
}(
|
|
493
|
-
n.setFormData(I,
|
|
494
|
-
const M = (E = s.value) == null ? void 0 : E[
|
|
490
|
+
} else (v == null ? void 0 : v.type) === "number" || (v == null ? void 0 : v.type) === "slider" ? m[A] = Number(m[A]) : (v == null ? void 0 : v.type) === "switch" && (m[A] = typeof m[A] == "boolean" ? m[A] : m[A].indexOf("true") > -1);
|
|
491
|
+
}), m;
|
|
492
|
+
}(d);
|
|
493
|
+
n.setFormData(I, S);
|
|
494
|
+
const M = (E = s.value) == null ? void 0 : E[S];
|
|
495
495
|
M == null || M.clearValidate();
|
|
496
496
|
} else {
|
|
497
|
-
n.setFormData(
|
|
498
|
-
const p = (P = s.value) == null ? void 0 : P[
|
|
497
|
+
n.setFormData(d, S);
|
|
498
|
+
const p = (P = s.value) == null ? void 0 : P[S];
|
|
499
499
|
p == null || p.clearValidate();
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
async function
|
|
503
|
-
return await
|
|
502
|
+
async function h(d = "default") {
|
|
503
|
+
return await a(d, async (S) => (await S.validate(), await S.getData()));
|
|
504
504
|
}
|
|
505
|
-
async function F(
|
|
505
|
+
async function F(d) {
|
|
506
506
|
await r();
|
|
507
|
-
const
|
|
508
|
-
for (const
|
|
509
|
-
const E = s.value[
|
|
510
|
-
E && (
|
|
507
|
+
const S = {};
|
|
508
|
+
for (const y in s.value) {
|
|
509
|
+
const E = s.value[y];
|
|
510
|
+
E && (S[y] = G(await d(E)));
|
|
511
511
|
}
|
|
512
|
-
return
|
|
512
|
+
return S;
|
|
513
513
|
}
|
|
514
|
-
async function
|
|
515
|
-
return await F((
|
|
514
|
+
async function O() {
|
|
515
|
+
return await F((d) => d.getData());
|
|
516
516
|
}
|
|
517
|
-
function t(
|
|
518
|
-
for (const
|
|
519
|
-
|
|
517
|
+
function t(d) {
|
|
518
|
+
for (const S in d)
|
|
519
|
+
g(d[S], S);
|
|
520
520
|
}
|
|
521
|
-
async function
|
|
522
|
-
return await F(async (
|
|
521
|
+
async function x() {
|
|
522
|
+
return await F(async (d) => (await d.validate(), await d.getData()));
|
|
523
523
|
}
|
|
524
524
|
return {
|
|
525
525
|
ready: e,
|
|
526
526
|
pageManager: n,
|
|
527
527
|
forms: s,
|
|
528
|
-
getData:
|
|
529
|
-
setData:
|
|
530
|
-
validate:
|
|
531
|
-
getForms:
|
|
528
|
+
getData: w,
|
|
529
|
+
setData: g,
|
|
530
|
+
validate: h,
|
|
531
|
+
getForms: O,
|
|
532
532
|
setForms: t,
|
|
533
|
-
validateAll:
|
|
533
|
+
validateAll: x,
|
|
534
534
|
getFormInstance: c
|
|
535
535
|
};
|
|
536
536
|
}
|
|
@@ -548,13 +548,13 @@ const nt = {
|
|
|
548
548
|
},
|
|
549
549
|
emits: ["change", "ready"],
|
|
550
550
|
setup(e, { expose: n, emit: s }) {
|
|
551
|
-
const r = oe(() => import("./index-DgcFxYFp.js")), c = s,
|
|
551
|
+
const r = oe(() => import("./index-DgcFxYFp.js")), c = s, a = C([]), w = C({}), { ready: g, pageManager: h, forms: F, getData: O, setData: t, validate: x, getForms: d, setForms: S, validateAll: y, getFormInstance: E } = tt(), P = e, p = re({
|
|
552
552
|
schemas: []
|
|
553
553
|
});
|
|
554
554
|
B(
|
|
555
555
|
() => P.pageSchema,
|
|
556
556
|
(f) => {
|
|
557
|
-
|
|
557
|
+
ie(p, f);
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
immediate: !0,
|
|
@@ -564,8 +564,8 @@ const nt = {
|
|
|
564
564
|
() => P.formData,
|
|
565
565
|
(f) => {
|
|
566
566
|
if (f) {
|
|
567
|
-
let
|
|
568
|
-
|
|
567
|
+
let i = L(f);
|
|
568
|
+
w.value = i, t(i);
|
|
569
569
|
}
|
|
570
570
|
},
|
|
571
571
|
{
|
|
@@ -574,78 +574,78 @@ const nt = {
|
|
|
574
574
|
}
|
|
575
575
|
);
|
|
576
576
|
function D(f) {
|
|
577
|
-
let
|
|
577
|
+
let i = [];
|
|
578
578
|
return f.forEach((V) => {
|
|
579
|
-
V.children && (
|
|
580
|
-
}),
|
|
579
|
+
V.children && (i = [...i, ...D(V.children)]), i.push(V);
|
|
580
|
+
}), i;
|
|
581
581
|
}
|
|
582
|
-
function I(f,
|
|
582
|
+
function I(f, i) {
|
|
583
583
|
function V(o) {
|
|
584
584
|
return JSON.parse(JSON.stringify(o));
|
|
585
585
|
}
|
|
586
586
|
function N(o, l) {
|
|
587
587
|
if (o.type === "card" && o.multiple && o.field && Array.isArray(l[o.field]))
|
|
588
|
-
return l[o.field].map((
|
|
588
|
+
return l[o.field].map((u) => {
|
|
589
589
|
var z;
|
|
590
|
-
const
|
|
591
|
-
return
|
|
590
|
+
const _ = V({ ...o, multiple: !0 });
|
|
591
|
+
return _.children = (z = _.children) == null ? void 0 : z.map((ne) => N(ne, u)).flat(), _;
|
|
592
592
|
});
|
|
593
|
-
const
|
|
594
|
-
return Array.isArray(
|
|
593
|
+
const $ = V(o);
|
|
594
|
+
return Array.isArray($.children) && ($.children = $.children.map((u) => N(u, l)).flat()), $;
|
|
595
595
|
}
|
|
596
|
-
return f.map((o) => N(o,
|
|
596
|
+
return f.map((o) => N(o, i)).flat();
|
|
597
597
|
}
|
|
598
|
-
function M(f,
|
|
599
|
-
const N =
|
|
600
|
-
return
|
|
598
|
+
function M(f, i = "", V = { root: 0 }) {
|
|
599
|
+
const N = i || "root";
|
|
600
|
+
return i || (V.root = 0), V[N] === void 0 && (V[N] = 0), f.map((o) => {
|
|
601
601
|
o.field && (o.oldField = JSON.parse(JSON.stringify(o.field)));
|
|
602
602
|
const l = { ...o };
|
|
603
603
|
if (o.type === "card") {
|
|
604
|
-
const
|
|
605
|
-
o.multiple ? (l.field =
|
|
606
|
-
const
|
|
607
|
-
V[
|
|
608
|
-
} else o.field &&
|
|
609
|
-
return o.children && (l.children = M(o.children, l.field ||
|
|
604
|
+
const $ = o.field || "";
|
|
605
|
+
o.multiple ? (l.field = i ? `${i}.${$}[${V[N]}]` : `${$}[${V[N]}]`, V[N]++) : o.field && i && (l.field = `${i}.${$}`);
|
|
606
|
+
const u = l.field || i;
|
|
607
|
+
V[u] = 0;
|
|
608
|
+
} else o.field && i && (l.field = `${i}.${o.field}`);
|
|
609
|
+
return o.children && (l.children = M(o.children, l.field || i, V)), l;
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function m(f, i, V = "", N = {}) {
|
|
613
613
|
const o = V || "root";
|
|
614
614
|
return N[o] === void 0 && (N[o] = 0), f.forEach((l) => {
|
|
615
|
-
const
|
|
616
|
-
let
|
|
617
|
-
l.type === "card" && l.multiple ? (typeof
|
|
618
|
-
|
|
619
|
-
}) :
|
|
620
|
-
}), N[o] = 0,
|
|
615
|
+
const $ = l.field || "";
|
|
616
|
+
let u = V ? `${V}.${$}` : `${$}`;
|
|
617
|
+
l.type === "card" && l.multiple ? (typeof i[u][`${N[o]}`] == "object" ? Object.keys(i[u][`${N[o]}`]).forEach((_) => {
|
|
618
|
+
i[`${u}[${N[o]}].${_}`] = i[u][`${N[o]}`][_];
|
|
619
|
+
}) : i[`${u}[${N[o]}]`] = i[u][`${N[o]}`], l.children && (l.children = m(l.children, i, `${u}[${N[o]}]` || V, N)), N[o]++) : l.children && (l.children = m(l.children, i, V, N));
|
|
620
|
+
}), N[o] = 0, i;
|
|
621
621
|
}
|
|
622
|
-
function U(f,
|
|
623
|
-
let N =
|
|
622
|
+
function U(f, i, V) {
|
|
623
|
+
let N = m(G(f), G(i));
|
|
624
624
|
return {
|
|
625
625
|
obj: M(f),
|
|
626
626
|
dataObj: N
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
function L(f) {
|
|
630
|
-
let
|
|
631
|
-
|
|
630
|
+
let i = D(P.pageSchema.schemas[0].children);
|
|
631
|
+
a.value = i.filter((l) => l.type === "card" && l.multiple);
|
|
632
632
|
const V = I(P.pageSchema.schemas[0].children, f);
|
|
633
|
-
let { obj: N, dataObj: o } = U(V, f,
|
|
633
|
+
let { obj: N, dataObj: o } = U(V, f, a.value);
|
|
634
634
|
return f = o, console.log("%c [ ]-277", "font-size:13px; background:pink; color:#bf2c9f;", N, o), P.pageSchema.schemas[0].children = N, Object.keys(f).forEach((l) => {
|
|
635
|
-
var
|
|
635
|
+
var $, u, _, z, ne, de, fe;
|
|
636
636
|
if (l.indexOf("@") < 0) {
|
|
637
|
-
const b =
|
|
638
|
-
if ((b && (b == null ? void 0 : b.type) === "checkbox" || (b == null ? void 0 : b.type) === "select" && ((
|
|
637
|
+
const b = i.find((q) => q.field === l), Pe = ["datetimerange", "daterange", "monthrange", "dates"];
|
|
638
|
+
if ((b && (b == null ? void 0 : b.type) === "checkbox" || (b == null ? void 0 : b.type) === "select" && (($ = b == null ? void 0 : b.componentProps) != null && $.multiple) || (b == null ? void 0 : b.type) === "cascader" && !((_ = (u = b == null ? void 0 : b.componentProps) == null ? void 0 : u.props) != null && _.multiple) || (b == null ? void 0 : b.type) === "date" && Pe.includes((z = b == null ? void 0 : b.componentProps) == null ? void 0 : z.type)) && typeof f[l] == "string")
|
|
639
639
|
f[l] = (ne = f[l]) == null ? void 0 : ne.split(",");
|
|
640
640
|
else if ((b == null ? void 0 : b.type) === "cascader" && ((fe = (de = b == null ? void 0 : b.componentProps) == null ? void 0 : de.props) != null && fe.multiple) && typeof f[l] == "string")
|
|
641
|
-
f[l].indexOf(";") > -1 ? f[l] = f[l].split(";").map((
|
|
641
|
+
f[l].indexOf(";") > -1 ? f[l] = f[l].split(";").map((q) => q.split(",")) : f[l] = f[l].split(","), f[l].indexOf(";") > -1 ? f[l] = f[l].split(";").map((q) => q.split(",")) : f[l] = f[l].split(",");
|
|
642
642
|
else if (((b == null ? void 0 : b.type) === "upload-image" || (b == null ? void 0 : b.type) === "upload-file") && typeof f[l] == "string") {
|
|
643
|
-
let
|
|
643
|
+
let q = [];
|
|
644
644
|
Object.entries(f).forEach(([j, ye]) => {
|
|
645
|
-
f[l] === ye && j !== b.field && j.indexOf("@") > -1 && j.indexOf(l) > -1 && (
|
|
645
|
+
f[l] === ye && j !== b.field && j.indexOf("@") > -1 && j.indexOf(l) > -1 && (q = j.split("@")[1].split(","));
|
|
646
646
|
}), f[l] = f[l].split(",").map((j, ye) => ({
|
|
647
647
|
url: j,
|
|
648
|
-
name:
|
|
648
|
+
name: q[ye] || j
|
|
649
649
|
}));
|
|
650
650
|
} else (b == null ? void 0 : b.type) === "number" || (b == null ? void 0 : b.type) === "slider" ? f[l] = Number(f[l]) : (b == null ? void 0 : b.type) === "switch" && (f[l] = typeof f[l] == "boolean" ? f[l] : f[l].indexOf("true") > -1);
|
|
651
651
|
}
|
|
@@ -654,39 +654,39 @@ const nt = {
|
|
|
654
654
|
B(
|
|
655
655
|
() => p.script,
|
|
656
656
|
(f) => {
|
|
657
|
-
f &&
|
|
657
|
+
f && h.setMethods(f, !0);
|
|
658
658
|
},
|
|
659
659
|
{
|
|
660
660
|
immediate: !0
|
|
661
661
|
}
|
|
662
|
-
), Z("slots", Le()), Z("pageManager",
|
|
662
|
+
), Z("slots", Le()), Z("pageManager", h), Z("forms", F), Z("pageSchema", p), Z(
|
|
663
663
|
"disabled",
|
|
664
664
|
W(() => P.disabled)
|
|
665
665
|
);
|
|
666
|
-
const
|
|
667
|
-
function
|
|
666
|
+
const A = ue(), v = A == null ? void 0 : A.proxy;
|
|
667
|
+
function k() {
|
|
668
668
|
ce(() => {
|
|
669
|
-
|
|
669
|
+
g.value = !0, c("ready", h), v && h.addComponentInstance("builder", v);
|
|
670
670
|
});
|
|
671
671
|
}
|
|
672
672
|
return se.on("updateformData" + P.id, (f) => {
|
|
673
673
|
P.id && c("change", f);
|
|
674
674
|
}), n({
|
|
675
|
-
ready:
|
|
676
|
-
pageManager:
|
|
677
|
-
getData:
|
|
675
|
+
ready: g,
|
|
676
|
+
pageManager: h,
|
|
677
|
+
getData: O,
|
|
678
678
|
setData: t,
|
|
679
|
-
validate:
|
|
680
|
-
getForms:
|
|
681
|
-
setForms:
|
|
682
|
-
validateAll:
|
|
679
|
+
validate: x,
|
|
680
|
+
getForms: d,
|
|
681
|
+
setForms: S,
|
|
682
|
+
validateAll: y,
|
|
683
683
|
getFormInstance: E
|
|
684
|
-
}), (f,
|
|
684
|
+
}), (f, i) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
685
685
|
key: 1,
|
|
686
|
-
onResolve:
|
|
686
|
+
onResolve: k
|
|
687
687
|
}, {
|
|
688
688
|
default: T(() => [
|
|
689
|
-
|
|
689
|
+
X("div", ot, [
|
|
690
690
|
(H(!0), Ee(Je, null, ze(p.schemas, (V, N) => (H(), Y(R(et), {
|
|
691
691
|
id: P.id,
|
|
692
692
|
key: N,
|
|
@@ -696,7 +696,7 @@ const nt = {
|
|
|
696
696
|
])
|
|
697
697
|
]),
|
|
698
698
|
fallback: T(() => [
|
|
699
|
-
|
|
699
|
+
X("div", st, [
|
|
700
700
|
Q(R(r))
|
|
701
701
|
])
|
|
702
702
|
]),
|
|
@@ -704,7 +704,7 @@ const nt = {
|
|
|
704
704
|
})) : (H(), Ee("div", nt));
|
|
705
705
|
}
|
|
706
706
|
});
|
|
707
|
-
function
|
|
707
|
+
function xe(e) {
|
|
708
708
|
return Ze() ? (We(e), !0) : !1;
|
|
709
709
|
}
|
|
710
710
|
function lt(e) {
|
|
@@ -712,14 +712,14 @@ function lt(e) {
|
|
|
712
712
|
const c = () => {
|
|
713
713
|
n -= 1, r && n <= 0 && (r.stop(), s = void 0, r = void 0);
|
|
714
714
|
};
|
|
715
|
-
return (...
|
|
715
|
+
return (...a) => (n += 1, r || (r = He(!0), s = r.run(() => e(...a))), xe(c), s);
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function ae(e) {
|
|
718
718
|
return typeof e == "function" ? e() : R(e);
|
|
719
719
|
}
|
|
720
|
-
const
|
|
720
|
+
const it = typeof window < "u" && typeof document < "u";
|
|
721
721
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
722
|
-
const
|
|
722
|
+
const at = (e) => typeof e < "u", ct = Object.prototype.toString, ut = (e) => ct.call(e) === "[object Object]", dt = () => {
|
|
723
723
|
};
|
|
724
724
|
function ft(e) {
|
|
725
725
|
return ue();
|
|
@@ -731,25 +731,25 @@ function mt(e = !1, n = {}) {
|
|
|
731
731
|
const {
|
|
732
732
|
truthyValue: s = !0,
|
|
733
733
|
falsyValue: r = !1
|
|
734
|
-
} = n, c = Ke(e),
|
|
735
|
-
function
|
|
734
|
+
} = n, c = Ke(e), a = C(e);
|
|
735
|
+
function w(g) {
|
|
736
736
|
if (arguments.length)
|
|
737
|
-
return
|
|
737
|
+
return a.value = g, a.value;
|
|
738
738
|
{
|
|
739
|
-
const
|
|
740
|
-
return
|
|
739
|
+
const h = ae(s);
|
|
740
|
+
return a.value = a.value === h ? ae(r) : h, a.value;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
return c ?
|
|
743
|
+
return c ? w : [a, w];
|
|
744
744
|
}
|
|
745
745
|
function Jt(e, n, s) {
|
|
746
746
|
const r = B(e, (...c) => (ce(() => r()), n(...c)), s);
|
|
747
747
|
return r;
|
|
748
748
|
}
|
|
749
|
-
const ve =
|
|
749
|
+
const ve = it ? window : void 0;
|
|
750
750
|
function te(e) {
|
|
751
751
|
var n;
|
|
752
|
-
const s =
|
|
752
|
+
const s = ae(e);
|
|
753
753
|
return (n = s == null ? void 0 : s.$el) != null ? n : s;
|
|
754
754
|
}
|
|
755
755
|
function ht(...e) {
|
|
@@ -757,23 +757,23 @@ function ht(...e) {
|
|
|
757
757
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, r, c] = e, n = ve) : [n, s, r, c] = e, !n)
|
|
758
758
|
return dt;
|
|
759
759
|
Array.isArray(s) || (s = [s]), Array.isArray(r) || (r = [r]);
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
},
|
|
763
|
-
() => [te(n),
|
|
764
|
-
([
|
|
765
|
-
if (
|
|
760
|
+
const a = [], w = () => {
|
|
761
|
+
a.forEach((O) => O()), a.length = 0;
|
|
762
|
+
}, g = (O, t, x, d) => (O.addEventListener(t, x, d), () => O.removeEventListener(t, x, d)), h = B(
|
|
763
|
+
() => [te(n), ae(c)],
|
|
764
|
+
([O, t]) => {
|
|
765
|
+
if (w(), !O)
|
|
766
766
|
return;
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
...s.flatMap((
|
|
767
|
+
const x = ut(t) ? { ...t } : t;
|
|
768
|
+
a.push(
|
|
769
|
+
...s.flatMap((d) => r.map((S) => g(O, d, S, x)))
|
|
770
770
|
);
|
|
771
771
|
},
|
|
772
772
|
{ immediate: !0, flush: "post" }
|
|
773
773
|
), F = () => {
|
|
774
|
-
|
|
774
|
+
h(), w();
|
|
775
775
|
};
|
|
776
|
-
return
|
|
776
|
+
return xe(F), F;
|
|
777
777
|
}
|
|
778
778
|
function vt(e) {
|
|
779
779
|
return typeof e == "function" ? e : typeof e == "string" ? (n) => n.key === e : Array.isArray(e) ? (n) => e.includes(n.key) : () => !0;
|
|
@@ -783,13 +783,13 @@ function Me(...e) {
|
|
|
783
783
|
e.length === 3 ? (n = e[0], s = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (n = !0, s = e[0], r = e[1]) : (n = e[0], s = e[1]) : (n = !0, s = e[0]);
|
|
784
784
|
const {
|
|
785
785
|
target: c = ve,
|
|
786
|
-
eventName:
|
|
787
|
-
passive:
|
|
788
|
-
dedupe:
|
|
789
|
-
} = r,
|
|
790
|
-
return ht(c,
|
|
791
|
-
|
|
792
|
-
},
|
|
786
|
+
eventName: a = "keydown",
|
|
787
|
+
passive: w = !1,
|
|
788
|
+
dedupe: g = !1
|
|
789
|
+
} = r, h = vt(n);
|
|
790
|
+
return ht(c, a, (O) => {
|
|
791
|
+
O.repeat && ae(g) || h(O) && s(O);
|
|
792
|
+
}, w);
|
|
793
793
|
}
|
|
794
794
|
function we(e, n, s = {}) {
|
|
795
795
|
return Me(e, n, { ...s, eventName: "keydown" });
|
|
@@ -812,100 +812,100 @@ function wt(e) {
|
|
|
812
812
|
}
|
|
813
813
|
function St(e, n, s = {}) {
|
|
814
814
|
const { window: r = ve, ...c } = s;
|
|
815
|
-
let
|
|
816
|
-
const
|
|
817
|
-
|
|
818
|
-
},
|
|
819
|
-
const t =
|
|
820
|
-
return Array.isArray(t) ? t.map((
|
|
815
|
+
let a;
|
|
816
|
+
const w = yt(() => r && "ResizeObserver" in r), g = () => {
|
|
817
|
+
a && (a.disconnect(), a = void 0);
|
|
818
|
+
}, h = W(() => {
|
|
819
|
+
const t = ae(e);
|
|
820
|
+
return Array.isArray(t) ? t.map((x) => te(x)) : [te(t)];
|
|
821
821
|
}), F = B(
|
|
822
|
-
|
|
822
|
+
h,
|
|
823
823
|
(t) => {
|
|
824
|
-
if (
|
|
825
|
-
|
|
826
|
-
for (const
|
|
827
|
-
|
|
824
|
+
if (g(), w.value && r) {
|
|
825
|
+
a = new ResizeObserver(n);
|
|
826
|
+
for (const x of t)
|
|
827
|
+
x && a.observe(x, c);
|
|
828
828
|
}
|
|
829
829
|
},
|
|
830
830
|
{ immediate: !0, flush: "post" }
|
|
831
|
-
),
|
|
832
|
-
|
|
831
|
+
), O = () => {
|
|
832
|
+
g(), F();
|
|
833
833
|
};
|
|
834
|
-
return
|
|
835
|
-
isSupported:
|
|
836
|
-
stop:
|
|
834
|
+
return xe(O), {
|
|
835
|
+
isSupported: w,
|
|
836
|
+
stop: O
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
839
|
function zt(e, n = { width: 0, height: 0 }, s = {}) {
|
|
840
|
-
const { window: r = ve, box: c = "content-box" } = s,
|
|
841
|
-
var t,
|
|
842
|
-
return (
|
|
843
|
-
}),
|
|
840
|
+
const { window: r = ve, box: c = "content-box" } = s, a = W(() => {
|
|
841
|
+
var t, x;
|
|
842
|
+
return (x = (t = te(e)) == null ? void 0 : t.namespaceURI) == null ? void 0 : x.includes("svg");
|
|
843
|
+
}), w = C(n.width), g = C(n.height), { stop: h } = St(
|
|
844
844
|
e,
|
|
845
845
|
([t]) => {
|
|
846
|
-
const
|
|
847
|
-
if (r &&
|
|
848
|
-
const
|
|
849
|
-
if (
|
|
850
|
-
const
|
|
851
|
-
|
|
846
|
+
const x = c === "border-box" ? t.borderBoxSize : c === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
847
|
+
if (r && a.value) {
|
|
848
|
+
const d = te(e);
|
|
849
|
+
if (d) {
|
|
850
|
+
const S = d.getBoundingClientRect();
|
|
851
|
+
w.value = S.width, g.value = S.height;
|
|
852
852
|
}
|
|
853
|
-
} else if (
|
|
854
|
-
const
|
|
855
|
-
|
|
853
|
+
} else if (x) {
|
|
854
|
+
const d = Array.isArray(x) ? x : [x];
|
|
855
|
+
w.value = d.reduce((S, { inlineSize: y }) => S + y, 0), g.value = d.reduce((S, { blockSize: y }) => S + y, 0);
|
|
856
856
|
} else
|
|
857
|
-
|
|
857
|
+
w.value = t.contentRect.width, g.value = t.contentRect.height;
|
|
858
858
|
},
|
|
859
859
|
s
|
|
860
860
|
);
|
|
861
861
|
pt(() => {
|
|
862
862
|
const t = te(e);
|
|
863
|
-
t && (
|
|
863
|
+
t && (w.value = "offsetWidth" in t ? t.offsetWidth : n.width, g.value = "offsetHeight" in t ? t.offsetHeight : n.height);
|
|
864
864
|
});
|
|
865
865
|
const F = B(
|
|
866
866
|
() => te(e),
|
|
867
867
|
(t) => {
|
|
868
|
-
|
|
868
|
+
w.value = t ? n.width : 0, g.value = t ? n.height : 0;
|
|
869
869
|
}
|
|
870
870
|
);
|
|
871
|
-
function
|
|
872
|
-
|
|
871
|
+
function O() {
|
|
872
|
+
h(), F();
|
|
873
873
|
}
|
|
874
874
|
return {
|
|
875
|
-
width:
|
|
876
|
-
height:
|
|
877
|
-
stop:
|
|
875
|
+
width: w,
|
|
876
|
+
height: g,
|
|
877
|
+
stop: O
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
880
|
function Ht(e, n, s, r = {}) {
|
|
881
|
-
var c,
|
|
881
|
+
var c, a, w;
|
|
882
882
|
const {
|
|
883
|
-
clone:
|
|
884
|
-
passive:
|
|
883
|
+
clone: g = !1,
|
|
884
|
+
passive: h = !1,
|
|
885
885
|
eventName: F,
|
|
886
|
-
deep:
|
|
886
|
+
deep: O = !1,
|
|
887
887
|
defaultValue: t,
|
|
888
|
-
shouldEmit:
|
|
889
|
-
} = r,
|
|
890
|
-
let
|
|
891
|
-
n || (n = "modelValue"),
|
|
892
|
-
const E = (D) =>
|
|
893
|
-
|
|
888
|
+
shouldEmit: x
|
|
889
|
+
} = r, d = ue(), S = s || (d == null ? void 0 : d.emit) || ((c = d == null ? void 0 : d.$emit) == null ? void 0 : c.bind(d)) || ((w = (a = d == null ? void 0 : d.proxy) == null ? void 0 : a.$emit) == null ? void 0 : w.bind(d == null ? void 0 : d.proxy));
|
|
890
|
+
let y = F;
|
|
891
|
+
n || (n = "modelValue"), y = y || `update:${n.toString()}`;
|
|
892
|
+
const E = (D) => g ? typeof g == "function" ? g(D) : wt(D) : D, P = () => at(e[n]) ? E(e[n]) : t, p = (D) => {
|
|
893
|
+
x ? x(D) && S(y, D) : S(y, D);
|
|
894
894
|
};
|
|
895
|
-
if (
|
|
895
|
+
if (h) {
|
|
896
896
|
const D = P(), I = C(D);
|
|
897
897
|
let M = !1;
|
|
898
898
|
return B(
|
|
899
899
|
() => e[n],
|
|
900
|
-
(
|
|
901
|
-
M || (M = !0, I.value = E(
|
|
900
|
+
(m) => {
|
|
901
|
+
M || (M = !0, I.value = E(m), ce(() => M = !1));
|
|
902
902
|
}
|
|
903
903
|
), B(
|
|
904
904
|
I,
|
|
905
|
-
(
|
|
906
|
-
!M && (
|
|
905
|
+
(m) => {
|
|
906
|
+
!M && (m !== e[n] || O) && p(m);
|
|
907
907
|
},
|
|
908
|
-
{ deep:
|
|
908
|
+
{ deep: O }
|
|
909
909
|
), I;
|
|
910
910
|
} else
|
|
911
911
|
return W({
|
|
@@ -945,8 +945,8 @@ function Et(e) {
|
|
|
945
945
|
var n = document.querySelector("html"), s = new MutationObserver(function(r) {
|
|
946
946
|
for (var c of r)
|
|
947
947
|
if (c.type === "attributes" && c.attributeName === "class") {
|
|
948
|
-
const
|
|
949
|
-
new Array(...
|
|
948
|
+
const a = c.target;
|
|
949
|
+
new Array(...a.classList).includes("dark") ? e.value = !0 : e.value = !1;
|
|
950
950
|
}
|
|
951
951
|
});
|
|
952
952
|
s.observe(n, {
|
|
@@ -957,12 +957,12 @@ function Et(e) {
|
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
959
|
function At() {
|
|
960
|
-
const e = C(1), n = C(!1), { isDark: s } = Dt(), { pressSpace: r, pressShift: c, pressCtrl:
|
|
960
|
+
const e = C(1), n = C(!1), { isDark: s } = Dt(), { pressSpace: r, pressShift: c, pressCtrl: a } = Ot();
|
|
961
961
|
return {
|
|
962
962
|
canvasScale: e,
|
|
963
963
|
pressSpace: r,
|
|
964
964
|
pressShift: c,
|
|
965
|
-
pressCtrl:
|
|
965
|
+
pressCtrl: a,
|
|
966
966
|
disabledZoom: n,
|
|
967
967
|
isDark: s
|
|
968
968
|
};
|
|
@@ -988,34 +988,34 @@ function Zt(e) {
|
|
|
988
988
|
const { pressSpace: n } = ge(), s = new Image(1, 1);
|
|
989
989
|
s.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";
|
|
990
990
|
let r = 0, c = 0;
|
|
991
|
-
function
|
|
991
|
+
function a(h) {
|
|
992
992
|
var F;
|
|
993
|
-
n.value && (r =
|
|
993
|
+
n.value && (r = h.x, c = h.y, (F = h.dataTransfer) == null || F.setDragImage(document.createElement("div"), 0, 0));
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
if (
|
|
995
|
+
function w(h) {
|
|
996
|
+
if (h.preventDefault(), !h.x || !h.y || !n.value)
|
|
997
997
|
return;
|
|
998
|
-
const F =
|
|
999
|
-
r =
|
|
998
|
+
const F = h.x - r, O = h.y - c;
|
|
999
|
+
r = h.x, c = h.y, e.value && (e.value.scrollTop -= O, e.value.scrollLeft -= F);
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function g() {
|
|
1002
1002
|
n.value = !1;
|
|
1003
1003
|
}
|
|
1004
|
-
return { handleElementDragStart:
|
|
1004
|
+
return { handleElementDragStart: a, handleElementDrag: w, handleElementDragEnd: g };
|
|
1005
1005
|
}
|
|
1006
1006
|
function Wt(e) {
|
|
1007
1007
|
const { pressCtrl: n, canvasScale: s, disabledZoom: r } = ge();
|
|
1008
|
-
function c(
|
|
1008
|
+
function c(a) {
|
|
1009
1009
|
if (!n.value || r.value)
|
|
1010
1010
|
return;
|
|
1011
|
-
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1011
|
+
a.preventDefault();
|
|
1012
|
+
let w = 0;
|
|
1013
|
+
a.deltaY < 0 ? w = s.value + 0.05 : w = s.value - 0.05, !(w > 150 || w < 0.5) && (s.value = w);
|
|
1014
1014
|
}
|
|
1015
1015
|
return B(
|
|
1016
1016
|
() => s.value,
|
|
1017
|
-
(
|
|
1018
|
-
e.value && !r.value && (e.value.style.transform = `scale(${
|
|
1017
|
+
(a) => {
|
|
1018
|
+
e.value && !r.value && (e.value.style.transform = `scale(${a})`);
|
|
1019
1019
|
}
|
|
1020
1020
|
), { handleZoom: c, canvasScale: s };
|
|
1021
1021
|
}
|
|
@@ -1032,57 +1032,57 @@ function Gt(e, n = 16.66) {
|
|
|
1032
1032
|
stopTimedQuery: c
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1035
|
+
const xt = { class: "min-w-750px rounded" }, It = { class: "h-full rounded" }, _t = /* @__PURE__ */ le({
|
|
1036
1036
|
__name: "index",
|
|
1037
1037
|
setup(e, { expose: n }) {
|
|
1038
|
-
const s = J.getComponent("monacoEditor"), r = J.getComponent("modal"), c = C(null),
|
|
1038
|
+
const s = J.getComponent("monacoEditor"), r = J.getComponent("modal"), c = C(null), a = C(!1), w = C(!1), g = C({}), h = ee("pageSchema"), F = C(null), O = C("");
|
|
1039
1039
|
function t() {
|
|
1040
|
-
|
|
1040
|
+
w.value = !1;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1042
|
+
function x() {
|
|
1043
|
+
a.value = !1;
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
|
|
1045
|
+
function d() {
|
|
1046
|
+
a.value = !0, O.value = qe();
|
|
1047
1047
|
}
|
|
1048
|
-
async function
|
|
1048
|
+
async function S() {
|
|
1049
1049
|
try {
|
|
1050
|
-
let
|
|
1051
|
-
if (!Object.keys(
|
|
1050
|
+
let y = await F.value.validateAll();
|
|
1051
|
+
if (!Object.keys(y).length) {
|
|
1052
1052
|
alert("请添加表单组件后再尝试!");
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
Object.keys(
|
|
1055
|
+
Object.keys(y).length === 1 && (y = y.default), g.value = JSON.stringify(y, null, 2), ce(() => {
|
|
1056
1056
|
var E;
|
|
1057
|
-
(E = c.value) == null || E.setValue(
|
|
1058
|
-
}),
|
|
1059
|
-
} catch (
|
|
1060
|
-
console.error(
|
|
1057
|
+
(E = c.value) == null || E.setValue(g.value);
|
|
1058
|
+
}), w.value = !0;
|
|
1059
|
+
} catch (y) {
|
|
1060
|
+
console.error(y);
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
return n({
|
|
1064
|
-
handleOpen:
|
|
1065
|
-
}), (
|
|
1066
|
-
modelValue:
|
|
1067
|
-
"onUpdate:modelValue": E[1] || (E[1] = (P) =>
|
|
1064
|
+
handleOpen: d
|
|
1065
|
+
}), (y, E) => (H(), Y(R(r), {
|
|
1066
|
+
modelValue: a.value,
|
|
1067
|
+
"onUpdate:modelValue": E[1] || (E[1] = (P) => a.value = P),
|
|
1068
1068
|
title: "预览",
|
|
1069
1069
|
class: "w-900px",
|
|
1070
1070
|
width: "900px",
|
|
1071
|
-
onClose:
|
|
1072
|
-
onOk:
|
|
1071
|
+
onClose: x,
|
|
1072
|
+
onOk: S,
|
|
1073
1073
|
okText: "表单数据"
|
|
1074
1074
|
}, {
|
|
1075
1075
|
default: T(() => [
|
|
1076
|
-
|
|
1076
|
+
X("div", xt, [
|
|
1077
1077
|
(H(), Y(R(rt), {
|
|
1078
|
-
key:
|
|
1078
|
+
key: O.value,
|
|
1079
1079
|
ref_key: "kb",
|
|
1080
1080
|
ref: F,
|
|
1081
|
-
"page-schema": R(
|
|
1081
|
+
"page-schema": R(h)
|
|
1082
1082
|
}, null, 8, ["page-schema"])),
|
|
1083
1083
|
Q(R(r), {
|
|
1084
|
-
modelValue:
|
|
1085
|
-
"onUpdate:modelValue": E[0] || (E[0] = (P) =>
|
|
1084
|
+
modelValue: w.value,
|
|
1085
|
+
"onUpdate:modelValue": E[0] || (E[0] = (P) => w.value = P),
|
|
1086
1086
|
title: "表单数据",
|
|
1087
1087
|
class: "w-860px",
|
|
1088
1088
|
width: "860px",
|
|
@@ -1090,14 +1090,14 @@ const It = { class: "min-w-750px rounded" }, xt = { class: "h-full rounded" }, _
|
|
|
1090
1090
|
onOk: t
|
|
1091
1091
|
}, {
|
|
1092
1092
|
default: T(() => [
|
|
1093
|
-
|
|
1093
|
+
X("div", It, [
|
|
1094
1094
|
Q(R(s), {
|
|
1095
1095
|
ref_key: "monacoEditorRef",
|
|
1096
1096
|
ref: c,
|
|
1097
1097
|
autoToggleTheme: "",
|
|
1098
1098
|
readOnly: "",
|
|
1099
1099
|
class: "h-full editor",
|
|
1100
|
-
"model-value":
|
|
1100
|
+
"model-value": g.value
|
|
1101
1101
|
}, null, 8, ["model-value"])
|
|
1102
1102
|
])
|
|
1103
1103
|
]),
|
|
@@ -1134,8 +1134,8 @@ const It = { class: "min-w-750px rounded" }, xt = { class: "h-full rounded" }, _
|
|
|
1134
1134
|
"updateSourceData"
|
|
1135
1135
|
],
|
|
1136
1136
|
setup(e, { expose: n, emit: s }) {
|
|
1137
|
-
const { t: r } = Oe(), c = oe(() => import("./index-IGxCNti8.js")),
|
|
1138
|
-
let
|
|
1137
|
+
const { t: r } = Oe(), c = oe(() => import("./index-IGxCNti8.js")), a = oe(() => import("./index-WkZdU_zw.js")), w = oe(() => import("./index-CXXMKZDX.js")), g = oe(() => import("./index-Cln9MN7u.js")), h = oe(() => import("./index-DgcFxYFp.js")), F = Ce(), O = ke(), t = e;
|
|
1138
|
+
let x = {
|
|
1139
1139
|
schemas: [
|
|
1140
1140
|
{
|
|
1141
1141
|
type: "form",
|
|
@@ -1183,146 +1183,146 @@ defineExpose({
|
|
|
1183
1183
|
};
|
|
1184
1184
|
he(() => {
|
|
1185
1185
|
if (t.defaultSchema) {
|
|
1186
|
-
|
|
1186
|
+
x = t.defaultSchema;
|
|
1187
1187
|
return;
|
|
1188
1188
|
}
|
|
1189
|
-
t.source && J.setSourceData(t.source), t.formMode && (
|
|
1190
|
-
}), F.setDesignMode(), F.setDefaultComponentIds(
|
|
1191
|
-
const
|
|
1189
|
+
t.source && J.setSourceData(t.source), t.formMode && (x.schemas = J.formSchemas);
|
|
1190
|
+
}), F.setDesignMode(), F.setDefaultComponentIds(x.schemas);
|
|
1191
|
+
const d = s, S = C(null), y = re({
|
|
1192
1192
|
checkedNode: null,
|
|
1193
1193
|
hoverNode: null,
|
|
1194
1194
|
disableHover: !1,
|
|
1195
1195
|
matched: []
|
|
1196
1196
|
}), E = re({
|
|
1197
1197
|
schemas: [],
|
|
1198
|
-
script:
|
|
1198
|
+
script: x.script
|
|
1199
1199
|
}), { disabledZoom: P } = ge();
|
|
1200
1200
|
he(() => {
|
|
1201
1201
|
P.value = t.disabledZoom;
|
|
1202
1202
|
}), he(() => {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
}), Z("pageSchema", E), Z("revoke",
|
|
1203
|
+
const i = E.script;
|
|
1204
|
+
i && i !== "" && F.setMethods(i);
|
|
1205
|
+
}), Z("pageSchema", E), Z("revoke", O), Z("pageManager", F), Z(
|
|
1206
1206
|
"designerProps",
|
|
1207
1207
|
W(() => t)
|
|
1208
1208
|
), Z("designer", {
|
|
1209
1209
|
setCheckedNode: D,
|
|
1210
1210
|
setHoverNode: I,
|
|
1211
|
-
setDisableHover:
|
|
1212
|
-
handleToggleDeviceMode:
|
|
1213
|
-
reset:
|
|
1214
|
-
state:
|
|
1215
|
-
}), se.on("saveSourceData", (
|
|
1216
|
-
|
|
1217
|
-
}), se.on("deleteSourceData", (
|
|
1218
|
-
|
|
1219
|
-
}), se.on("updateSourceData", (
|
|
1220
|
-
|
|
1211
|
+
setDisableHover: m,
|
|
1212
|
+
handleToggleDeviceMode: k,
|
|
1213
|
+
reset: A,
|
|
1214
|
+
state: y
|
|
1215
|
+
}), se.on("saveSourceData", (i) => {
|
|
1216
|
+
d("saveSourceData", i);
|
|
1217
|
+
}), se.on("deleteSourceData", (i) => {
|
|
1218
|
+
d("deleteSourceData", i);
|
|
1219
|
+
}), se.on("updateSourceData", (i) => {
|
|
1220
|
+
d("updateSourceData", i);
|
|
1221
1221
|
});
|
|
1222
1222
|
function p() {
|
|
1223
|
-
E.schemas = G(
|
|
1223
|
+
E.schemas = G(x.schemas), D(E.schemas[0]), O.push(E.schemas, "初始化撤销功能");
|
|
1224
1224
|
}
|
|
1225
|
-
async function D(
|
|
1226
|
-
|
|
1225
|
+
async function D(i = E.schemas[0]) {
|
|
1226
|
+
y.checkedNode = i, y.matched = Xe(E.schemas, i.id);
|
|
1227
1227
|
}
|
|
1228
|
-
async function I(
|
|
1228
|
+
async function I(i = null) {
|
|
1229
1229
|
var V;
|
|
1230
|
-
if (!
|
|
1231
|
-
return
|
|
1232
|
-
if ((
|
|
1230
|
+
if (!i || y.disableHover)
|
|
1231
|
+
return y.hoverNode = null, !1;
|
|
1232
|
+
if ((i == null ? void 0 : i.id) === ((V = y.hoverNode) == null ? void 0 : V.id))
|
|
1233
1233
|
return !1;
|
|
1234
|
-
|
|
1234
|
+
y.hoverNode = i;
|
|
1235
1235
|
}
|
|
1236
1236
|
function M() {
|
|
1237
1237
|
ce(() => {
|
|
1238
|
-
|
|
1238
|
+
d("ready", { pageManager: F });
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
|
-
async function
|
|
1242
|
-
|
|
1241
|
+
async function m(i = !1) {
|
|
1242
|
+
y.disableHover = i;
|
|
1243
1243
|
}
|
|
1244
|
-
function U(
|
|
1245
|
-
|
|
1244
|
+
function U(i) {
|
|
1245
|
+
ie(E, G(i));
|
|
1246
1246
|
}
|
|
1247
1247
|
function L() {
|
|
1248
|
-
return
|
|
1248
|
+
return Ie(E);
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1251
|
-
Ve(E.schemas,
|
|
1250
|
+
function A() {
|
|
1251
|
+
Ve(E.schemas, x.schemas) && E.script === x.script || (ie(E.schemas, x.schemas), E.script = x.script, D(E.schemas[0]), O.push(E.schemas, "重置操作"), d("reset", E));
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1254
|
-
|
|
1253
|
+
function v() {
|
|
1254
|
+
d("save", Ie(E));
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1257
|
-
|
|
1256
|
+
function k(i) {
|
|
1257
|
+
d("toggleDeviceMode", i);
|
|
1258
1258
|
}
|
|
1259
1259
|
function f() {
|
|
1260
|
-
|
|
1260
|
+
S.value.handleOpen();
|
|
1261
1261
|
}
|
|
1262
1262
|
return p(), n({
|
|
1263
|
-
revoke:
|
|
1263
|
+
revoke: O,
|
|
1264
1264
|
setData: U,
|
|
1265
1265
|
getData: L,
|
|
1266
|
-
reset:
|
|
1266
|
+
reset: A,
|
|
1267
1267
|
preview: f
|
|
1268
|
-
}), (
|
|
1268
|
+
}), (i, V) => R(J).initialized.value ? (H(), Y(Fe, {
|
|
1269
1269
|
key: 1,
|
|
1270
1270
|
onResolve: M
|
|
1271
1271
|
}, {
|
|
1272
1272
|
default: T(() => [
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
K(
|
|
1273
|
+
X("div", Nt, [
|
|
1274
|
+
X("div", Ft, [
|
|
1275
|
+
K(i.$slots, "header", {}, () => [
|
|
1276
1276
|
t.hiddenHeader ? Ne("", !0) : (H(), Y(R(c), {
|
|
1277
1277
|
key: 0,
|
|
1278
1278
|
onPreview: f,
|
|
1279
|
-
onSave:
|
|
1279
|
+
onSave: v
|
|
1280
1280
|
}, {
|
|
1281
1281
|
header: T(() => [
|
|
1282
|
-
K(
|
|
1282
|
+
K(i.$slots, "header-prefix")
|
|
1283
1283
|
]),
|
|
1284
1284
|
prefix: T(() => [
|
|
1285
|
-
K(
|
|
1285
|
+
K(i.$slots, "header-prefix")
|
|
1286
1286
|
]),
|
|
1287
1287
|
title: T(() => [
|
|
1288
|
-
K(
|
|
1288
|
+
K(i.$slots, "header-title")
|
|
1289
1289
|
]),
|
|
1290
1290
|
"right-prefix": T(() => [
|
|
1291
|
-
K(
|
|
1291
|
+
K(i.$slots, "header-right-prefix")
|
|
1292
1292
|
]),
|
|
1293
1293
|
"right-action": T(() => [
|
|
1294
|
-
K(
|
|
1294
|
+
K(i.$slots, "header-right-action")
|
|
1295
1295
|
]),
|
|
1296
1296
|
"right-suffix": T(() => [
|
|
1297
|
-
K(
|
|
1297
|
+
K(i.$slots, "header-right-suffix")
|
|
1298
1298
|
]),
|
|
1299
1299
|
_: 3
|
|
1300
1300
|
}))
|
|
1301
1301
|
])
|
|
1302
1302
|
]),
|
|
1303
|
-
|
|
1304
|
-
class: Ge(["epic-split-view-container", { "hidden-header":
|
|
1303
|
+
X("div", {
|
|
1304
|
+
class: Ge(["epic-split-view-container", { "hidden-header": i.hiddenHeader }])
|
|
1305
1305
|
}, [
|
|
1306
|
-
Q(R(
|
|
1307
|
-
Q(R(
|
|
1308
|
-
Q(R(
|
|
1306
|
+
Q(R(a)),
|
|
1307
|
+
Q(R(w)),
|
|
1308
|
+
Q(R(g))
|
|
1309
1309
|
], 2),
|
|
1310
1310
|
Q(_t, {
|
|
1311
1311
|
ref_key: "previewRef",
|
|
1312
|
-
ref:
|
|
1312
|
+
ref: S
|
|
1313
1313
|
}, null, 512)
|
|
1314
1314
|
])
|
|
1315
1315
|
]),
|
|
1316
1316
|
fallback: T(() => [
|
|
1317
|
-
|
|
1318
|
-
Q(R(
|
|
1317
|
+
X("div", Vt, [
|
|
1318
|
+
Q(R(h))
|
|
1319
1319
|
])
|
|
1320
1320
|
]),
|
|
1321
1321
|
_: 3
|
|
1322
1322
|
})) : (H(), Ee("div", $t));
|
|
1323
1323
|
}
|
|
1324
1324
|
}), Ct = {
|
|
1325
|
-
component: async () => await import("./index-
|
|
1325
|
+
component: async () => await import("./index-DqPRxkxh.js"),
|
|
1326
1326
|
defaultSchema: {
|
|
1327
1327
|
label: "代码编辑器",
|
|
1328
1328
|
type: "monacoEditor",
|
|
@@ -1372,7 +1372,7 @@ defineExpose({
|
|
|
1372
1372
|
}
|
|
1373
1373
|
}, { t: me } = Oe();
|
|
1374
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-
|
|
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-B-VAOMev.js")), e.component("ERuleEditor", async () => await import("./index-BUloiuNZ.js")), e.component("EOptionsEditor", async () => await import("./index-B3keiKRy.js")), e.component("ENode", async () => await import("./index-B8Ir-lho.js")), e.component("EDataSource", async () => await import("./index-B0OgKtuT.js")), e.component("EColumnEditor", async () => await import("./index-Lc9Y13sl.js")), e.component("PaddingMarginControl", async () => await import("./index-CdnV7DS4.js")), e.registerActivitybar({
|
|
1376
1376
|
id: "component_view",
|
|
1377
1377
|
title: me("component"),
|
|
1378
1378
|
icon: "icon--epic--extension-outline",
|
|
@@ -1385,11 +1385,11 @@ function Pt(e) {
|
|
|
1385
1385
|
}), e.registerRightSidebar({
|
|
1386
1386
|
id: "attribute_view",
|
|
1387
1387
|
title: me("attribute"),
|
|
1388
|
-
component: async () => await import("./attributeView-
|
|
1388
|
+
component: async () => await import("./attributeView-BvXOVbk7.js")
|
|
1389
1389
|
}), e.registerRightSidebar({
|
|
1390
1390
|
id: "style_view",
|
|
1391
1391
|
title: me("style"),
|
|
1392
|
-
component: async () => await import("./styleView-
|
|
1392
|
+
component: async () => await import("./styleView-BAOpKnjx.js")
|
|
1393
1393
|
}), e.registerRightSidebar({
|
|
1394
1394
|
id: "event_view",
|
|
1395
1395
|
title: "事件",
|
|
@@ -1412,7 +1412,7 @@ export {
|
|
|
1412
1412
|
rt as i,
|
|
1413
1413
|
Qt as j,
|
|
1414
1414
|
Ce as k,
|
|
1415
|
-
|
|
1415
|
+
ke as l,
|
|
1416
1416
|
Ot as m,
|
|
1417
1417
|
Dt as n,
|
|
1418
1418
|
bt as o,
|