@vtj/designer 0.12.35 → 0.12.37
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.
@@ -19,10 +19,10 @@ import { editor as Cc } from "monaco-editor";
|
|
19
19
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
20
20
|
* @name @vtj/designer
|
21
21
|
* @author CHC chenhuachun1549@dingtalk.com
|
22
|
-
* @version 0.12.
|
22
|
+
* @version 0.12.37
|
23
23
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
24
24
|
*/
|
25
|
-
const jn = "0.12.
|
25
|
+
const jn = "0.12.37", xc = {
|
26
26
|
width: 390,
|
27
27
|
height: 844
|
28
28
|
}, Ac = {
|
@@ -233,25 +233,25 @@ function Uc() {
|
|
233
233
|
te(
|
234
234
|
e,
|
235
235
|
() => {
|
236
|
-
const { platform:
|
237
|
-
|
236
|
+
const { platform: p = "web" } = r.project.value || {};
|
237
|
+
p === "uniapp" && Lc(e.value);
|
238
238
|
},
|
239
239
|
{ immediate: !0 }
|
240
240
|
);
|
241
241
|
const a = St({}), l = x(() => {
|
242
|
-
const
|
242
|
+
const p = {};
|
243
243
|
return e.value && e.value.forEach((v) => {
|
244
|
-
|
245
|
-
}),
|
246
|
-
}), o = x(() => e.value ? e.value.map((
|
247
|
-
label: `${
|
248
|
-
name:
|
249
|
-
disabled: !
|
250
|
-
})) : []), i = C(o.value[0]?.name), c = C(""),
|
244
|
+
p[v.name] = v;
|
245
|
+
}), p;
|
246
|
+
}), o = x(() => e.value ? e.value.map((p) => ({
|
247
|
+
label: `${p.label} (${p.count})`,
|
248
|
+
name: p.name,
|
249
|
+
disabled: !p.children?.length
|
250
|
+
})) : []), i = C(o.value[0]?.name), c = C(""), m = x(() => l.value[i.value]);
|
251
251
|
te(
|
252
252
|
o,
|
253
|
-
(
|
254
|
-
const v =
|
253
|
+
(p) => {
|
254
|
+
const v = p.reduce(
|
255
255
|
(h, f) => (h[f.name] = zc(
|
256
256
|
l.value[f.name].children
|
257
257
|
), h),
|
@@ -262,14 +262,14 @@ function Uc() {
|
|
262
262
|
{ immediate: !0 }
|
263
263
|
), te(
|
264
264
|
o,
|
265
|
-
(
|
266
|
-
|
265
|
+
(p) => {
|
266
|
+
p.length && !i.value && (i.value = p[0].name);
|
267
267
|
},
|
268
268
|
{ immediate: !0 }
|
269
269
|
);
|
270
270
|
const g = x(() => {
|
271
|
-
const
|
272
|
-
return !
|
271
|
+
const p = c.value.toLowerCase();
|
272
|
+
return !p || !t ? [] : t.filter((v) => v.name.toLowerCase().includes(p) || v.label?.toLowerCase().includes(p));
|
273
273
|
});
|
274
274
|
return {
|
275
275
|
components: t,
|
@@ -279,7 +279,7 @@ function Uc() {
|
|
279
279
|
tabs: o,
|
280
280
|
model: a,
|
281
281
|
currentTab: i,
|
282
|
-
currentGroup:
|
282
|
+
currentGroup: m,
|
283
283
|
searchKey: c,
|
284
284
|
searchResult: g
|
285
285
|
};
|
@@ -298,29 +298,29 @@ function Fc(r, t, e, s, a, l) {
|
|
298
298
|
o.simulator.init(r, t, e, s, a, l);
|
299
299
|
const i = x(() => o.simulator.designer.value), c = x(
|
300
300
|
() => Ts("hover", i.value?.hover.value)
|
301
|
-
),
|
301
|
+
), m = x(
|
302
302
|
() => Ts("dropping", i.value?.dropping.value)
|
303
303
|
), g = x(
|
304
304
|
() => Ts("selected", i.value?.selected.value)
|
305
|
-
),
|
305
|
+
), p = x(
|
306
306
|
() => o.state.outlineEnabled ? Wc(i.value?.lines.value || []) : []
|
307
307
|
);
|
308
308
|
return te(o.changed, () => {
|
309
309
|
i.value?.updateRect(), i.value?.updateLines();
|
310
310
|
}), {
|
311
311
|
designer: i,
|
312
|
-
dropping:
|
312
|
+
dropping: m,
|
313
313
|
hover: c,
|
314
314
|
selected: g,
|
315
|
-
lines:
|
315
|
+
lines: p
|
316
316
|
};
|
317
317
|
}
|
318
318
|
function Jc(r, t = !0) {
|
319
319
|
const { top: e, height: s, width: a, left: l, right: o } = r || {}, i = 250;
|
320
320
|
if (s > 100 && a > i)
|
321
321
|
return "inner";
|
322
|
-
let c,
|
323
|
-
return
|
322
|
+
let c, m;
|
323
|
+
return m = e > 30 ? "top" : "bottom", c = t || l < i && a < i ? "left" : "right", c = o > i ? "right" : "left", [c, m].join("-");
|
324
324
|
}
|
325
325
|
function $c(r) {
|
326
326
|
const { rect: t, type: e } = r, { left: s, width: a, top: l, height: o } = t, i = { left: s, width: a, top: l, height: o };
|
@@ -379,9 +379,9 @@ function It() {
|
|
379
379
|
}
|
380
380
|
function Hc(r, t) {
|
381
381
|
const e = C(""), { selected: s, isSelectBlock: a } = It(), l = x(() => s.value?.model.id), o = x(() => {
|
382
|
-
const c = ut(r),
|
382
|
+
const c = ut(r), m = ut(t), g = [];
|
383
383
|
if (!c) return g;
|
384
|
-
const
|
384
|
+
const p = m?.__contextRefs[l.value || ""], h = m === p || a.value ? [] : Object.keys(p?.context || {}).filter((N) => !["context", "ref"].includes(N)).map((N) => `this.context.${N}`);
|
385
385
|
h.length && g.push({ title: "上下文", items: h });
|
386
386
|
const f = c.inject.map((N) => `this.${N.name}`);
|
387
387
|
f.length && g.push({ title: "注入", items: f });
|
@@ -401,22 +401,22 @@ function Hc(r, t) {
|
|
401
401
|
(N) => `this.${N}`
|
402
402
|
);
|
403
403
|
A.length && g.push({ title: "数据源", items: A });
|
404
|
-
const V = Object.keys(
|
404
|
+
const V = Object.keys(m?.$refs || {}).map(
|
405
405
|
(N) => `this.$refs.${N}`
|
406
406
|
);
|
407
407
|
return V.length && g.push({ title: "refs", items: V }), g;
|
408
408
|
}), i = x(() => {
|
409
409
|
if (!e.value) return o.value;
|
410
|
-
const c = e.value.toLowerCase(),
|
410
|
+
const c = e.value.toLowerCase(), m = [];
|
411
411
|
return o.value.forEach((g) => {
|
412
|
-
const
|
412
|
+
const p = g.items.filter(
|
413
413
|
(v) => v.toLowerCase().includes(c)
|
414
414
|
);
|
415
|
-
|
415
|
+
p.length && m.push({
|
416
416
|
title: g.title,
|
417
|
-
items:
|
417
|
+
items: p
|
418
418
|
});
|
419
|
-
}),
|
419
|
+
}), m;
|
420
420
|
});
|
421
421
|
return {
|
422
422
|
keyword: e,
|
@@ -436,13 +436,13 @@ const Jn = [
|
|
436
436
|
];
|
437
437
|
function Kc(r) {
|
438
438
|
const t = Ne(), e = x(() => {
|
439
|
-
const
|
440
|
-
return Pe(
|
439
|
+
const p = r.value?.model || null;
|
440
|
+
return Pe(p) ? null : p;
|
441
441
|
}), s = C();
|
442
442
|
te(
|
443
443
|
e,
|
444
|
-
async (
|
445
|
-
|
444
|
+
async (p) => {
|
445
|
+
p?.from ? s.value = await t.assets.getBlockMaterial(p.from) || void 0 : s.value = void 0;
|
446
446
|
},
|
447
447
|
{ immediate: !0 }
|
448
448
|
);
|
@@ -487,29 +487,29 @@ function Kc(r) {
|
|
487
487
|
}
|
488
488
|
] : []), l = x(() => {
|
489
489
|
if (!e.value) return [];
|
490
|
-
const
|
491
|
-
return
|
490
|
+
const p = s.value || t.assets.componentMap.get(e.value.name);
|
491
|
+
return p ? (p.props || []).map((h) => ({
|
492
492
|
...h,
|
493
493
|
value: e.value?.getPropValue(h.name) ?? h.defaultValue
|
494
494
|
})) : [];
|
495
|
-
}), o = (
|
496
|
-
name:
|
495
|
+
}), o = (p) => a.value.some((v) => v.name === p) || l.value.some((v) => v.name === p) || p === "style", i = x(() => e.value ? Object.keys(e.value.props).filter((p) => !o(p)).map((p) => ({
|
496
|
+
name: p,
|
497
497
|
setters: "InputSetter",
|
498
|
-
value: e.value?.getPropValue(
|
498
|
+
value: e.value?.getPropValue(p)
|
499
499
|
})) : []);
|
500
500
|
return {
|
501
501
|
commonProps: a,
|
502
502
|
componentProps: l,
|
503
503
|
customProps: i,
|
504
504
|
node: e,
|
505
|
-
change: (
|
506
|
-
e.value && (
|
505
|
+
change: (p, v) => {
|
506
|
+
e.value && (p === "children" ? e.value.setChildren(v) : e.value.setProp(p, v));
|
507
507
|
},
|
508
|
-
addCustom: (
|
509
|
-
|
508
|
+
addCustom: (p) => {
|
509
|
+
p && e.value?.setProp(p, "");
|
510
510
|
},
|
511
|
-
removeCustom: (
|
512
|
-
e.value?.removeProp(
|
511
|
+
removeCustom: (p) => {
|
512
|
+
e.value?.removeProp(p);
|
513
513
|
},
|
514
514
|
isExist: o
|
515
515
|
};
|
@@ -573,7 +573,7 @@ function qc(r) {
|
|
573
573
|
function zs(r = {}) {
|
574
574
|
const t = {};
|
575
575
|
for (const [e, s] of Object.entries(r))
|
576
|
-
t[Ul(e)] = s;
|
576
|
+
t[e.startsWith("-") ? e : Ul(e)] = s;
|
577
577
|
return t;
|
578
578
|
}
|
579
579
|
function Qc(r) {
|
@@ -609,8 +609,8 @@ function To() {
|
|
609
609
|
t.value?.cleanHelper(), e.value?.forward();
|
610
610
|
}, l = () => {
|
611
611
|
e.value?.backward(), t.value?.cleanHelper();
|
612
|
-
}, o = (
|
613
|
-
t.value?.cleanHelper(), e.value?.load(
|
612
|
+
}, o = (m) => {
|
613
|
+
t.value?.cleanHelper(), e.value?.load(m), De("已载入历史记录", "success");
|
614
614
|
}, i = x(() => s.value <= 1 ? !0 : (e.value?.index || -1) <= 0), c = x(() => s.value <= 1 ? !0 : (e.value?.index || -1) >= s.value - 1);
|
615
615
|
return {
|
616
616
|
engine: r,
|
@@ -661,8 +661,8 @@ function Xc(r) {
|
|
661
661
|
}), o = x(() => {
|
662
662
|
if (!e.value || Pe(e.value)) return [];
|
663
663
|
const i = e.value.events || {};
|
664
|
-
return (s.value?.events || t.assets.componentMap.get(e.value.name)?.events || []).map((
|
665
|
-
const g = typeof
|
664
|
+
return (s.value?.events || t.assets.componentMap.get(e.value.name)?.events || []).map((m) => {
|
665
|
+
const g = typeof m == "string" ? m : m.name;
|
666
666
|
return {
|
667
667
|
name: g,
|
668
668
|
event: i[g]
|
@@ -714,12 +714,12 @@ function eu(r) {
|
|
714
714
|
) || Yc(W.name));
|
715
715
|
}), o = () => x(() => e.value ? (e.value.directives || []).filter(
|
716
716
|
(T) => !ci.includes(T.name)
|
717
|
-
) : []), i = a("vIf"), c = a("vElseIf"),
|
717
|
+
) : []), i = a("vIf"), c = a("vElseIf"), m = a("vElse"), g = a("vShow"), p = a("vBind"), v = a("vFor"), h = a("vHtml"), f = l(), _ = o(), w = {
|
718
718
|
vIf: i,
|
719
719
|
vElseIf: c,
|
720
|
-
vElse:
|
720
|
+
vElse: m,
|
721
721
|
vShow: g,
|
722
|
-
vBind:
|
722
|
+
vBind: p,
|
723
723
|
vFor: v,
|
724
724
|
vHtml: h
|
725
725
|
};
|
@@ -728,9 +728,9 @@ function eu(r) {
|
|
728
728
|
node: e,
|
729
729
|
vIf: i,
|
730
730
|
vElseIf: c,
|
731
|
-
vElse:
|
731
|
+
vElse: m,
|
732
732
|
vShow: g,
|
733
|
-
vBind:
|
733
|
+
vBind: p,
|
734
734
|
vFor: v,
|
735
735
|
vHtml: h,
|
736
736
|
vModels: f,
|
@@ -815,7 +815,7 @@ function nn() {
|
|
815
815
|
return $ && $.data ? (t?.login($.data), !0) : !1;
|
816
816
|
}
|
817
817
|
return !1;
|
818
|
-
},
|
818
|
+
}, m = async (M = "web") => {
|
819
819
|
if (s?.getTemplates)
|
820
820
|
return await s?.getTemplates(M);
|
821
821
|
const U = `${e}/api/open/templates`, $ = t?.getData()?.token;
|
@@ -827,7 +827,7 @@ function nn() {
|
|
827
827
|
return await s?.getTemplateById(M);
|
828
828
|
const U = t?.getData()?.token, $ = `${e}/api/open/template/${U}`;
|
829
829
|
return (await Xt($, { query: { id: M } }))?.data || null;
|
830
|
-
},
|
830
|
+
}, p = async (M) => {
|
831
831
|
if (s?.removeTemplate)
|
832
832
|
return await s?.removeTemplate(M);
|
833
833
|
const U = t?.getData()?.token, $ = `${e}/api/open/template/remove/${U}`;
|
@@ -850,7 +850,7 @@ function nn() {
|
|
850
850
|
loginBySign: o,
|
851
851
|
toRemoteAuth: i,
|
852
852
|
isLogined: c,
|
853
|
-
getTemplates:
|
853
|
+
getTemplates: m,
|
854
854
|
getTemplateDsl: v,
|
855
855
|
getDictOptions: h,
|
856
856
|
getTemplateCategories: () => h("TemplateCategory"),
|
@@ -866,7 +866,7 @@ function nn() {
|
|
866
866
|
}).then((we) => we.json());
|
867
867
|
},
|
868
868
|
getTemplateById: g,
|
869
|
-
removeTemplate:
|
869
|
+
removeTemplate: p,
|
870
870
|
postTopic: async (M) => {
|
871
871
|
if (s?.postTopic)
|
872
872
|
return await s?.postTopic(M);
|
@@ -1049,7 +1049,7 @@ function nu() {
|
|
1049
1049
|
getTemplates: a,
|
1050
1050
|
getTemplateDsl: l,
|
1051
1051
|
removeTemplate: o
|
1052
|
-
} = nn(), i = C([]), c = C(!1),
|
1052
|
+
} = nn(), i = C([]), c = C(!1), m = async (v) => {
|
1053
1053
|
const h = r.current.value, f = r.project.value;
|
1054
1054
|
if (!f) return;
|
1055
1055
|
if (!h) {
|
@@ -1075,7 +1075,7 @@ function nu() {
|
|
1075
1075
|
}, g = x(() => {
|
1076
1076
|
const v = t?.getData()?.id;
|
1077
1077
|
return In(i.value, (h) => h.author === v ? "我的" : h.category);
|
1078
|
-
}),
|
1078
|
+
}), p = () => {
|
1079
1079
|
const v = r.project.value;
|
1080
1080
|
c.value = !0, a(v?.platform).then((h) => {
|
1081
1081
|
i.value = h;
|
@@ -1083,18 +1083,18 @@ function nu() {
|
|
1083
1083
|
c.value = !1;
|
1084
1084
|
});
|
1085
1085
|
};
|
1086
|
-
return
|
1086
|
+
return p(), {
|
1087
1087
|
engine: r,
|
1088
1088
|
templates: i,
|
1089
1089
|
toRemoteAuth: e,
|
1090
1090
|
isLogined: s,
|
1091
1091
|
getTemplates: a,
|
1092
1092
|
getTemplateDsl: l,
|
1093
|
-
installTemplate:
|
1093
|
+
installTemplate: m,
|
1094
1094
|
removeTemplate: o,
|
1095
1095
|
groups: g,
|
1096
1096
|
access: t,
|
1097
|
-
refreshTemplates:
|
1097
|
+
refreshTemplates: p,
|
1098
1098
|
loading: c
|
1099
1099
|
};
|
1100
1100
|
}
|
@@ -1148,14 +1148,14 @@ function du(r, t, e = {}) {
|
|
1148
1148
|
function c() {
|
1149
1149
|
l.value = !1, i();
|
1150
1150
|
}
|
1151
|
-
function
|
1151
|
+
function m(...g) {
|
1152
1152
|
a && r(), i(), l.value = !0, o = setTimeout(() => {
|
1153
1153
|
l.value = !1, o = null, r(...g);
|
1154
1154
|
}, ut(t));
|
1155
1155
|
}
|
1156
|
-
return s && (l.value = !0, us &&
|
1156
|
+
return s && (l.value = !0, us && m()), la(c), {
|
1157
1157
|
isPending: hl(l),
|
1158
|
-
start:
|
1158
|
+
start: m,
|
1159
1159
|
stop: c
|
1160
1160
|
};
|
1161
1161
|
}
|
@@ -1178,28 +1178,28 @@ function xt(r) {
|
|
1178
1178
|
function rn(...r) {
|
1179
1179
|
const t = [], e = () => {
|
1180
1180
|
t.forEach((i) => i()), t.length = 0;
|
1181
|
-
}, s = (i, c,
|
1181
|
+
}, s = (i, c, m, g) => (i.addEventListener(c, m, g), () => i.removeEventListener(c, m, g)), a = x(() => {
|
1182
1182
|
const i = Hn(ut(r[0])).filter((c) => c != null);
|
1183
1183
|
return i.every((c) => typeof c != "string") ? i : void 0;
|
1184
1184
|
}), l = pu(
|
1185
1185
|
() => {
|
1186
1186
|
var i, c;
|
1187
1187
|
return [
|
1188
|
-
(c = (i = a.value) == null ? void 0 : i.map((
|
1188
|
+
(c = (i = a.value) == null ? void 0 : i.map((m) => xt(m))) != null ? c : [ds].filter((m) => m != null),
|
1189
1189
|
Hn(ut(a.value ? r[1] : r[0])),
|
1190
1190
|
Hn(n(a.value ? r[2] : r[1])),
|
1191
1191
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
1192
1192
|
ut(a.value ? r[3] : r[2])
|
1193
1193
|
];
|
1194
1194
|
},
|
1195
|
-
([i, c,
|
1196
|
-
if (e(), !i?.length || !c?.length || !
|
1195
|
+
([i, c, m, g]) => {
|
1196
|
+
if (e(), !i?.length || !c?.length || !m?.length)
|
1197
1197
|
return;
|
1198
|
-
const
|
1198
|
+
const p = ou(g) ? { ...g } : g;
|
1199
1199
|
t.push(
|
1200
1200
|
...i.flatMap(
|
1201
1201
|
(v) => c.flatMap(
|
1202
|
-
(h) =>
|
1202
|
+
(h) => m.map((f) => s(v, h, f, p))
|
1203
1203
|
)
|
1204
1204
|
)
|
1205
1205
|
);
|
@@ -1221,7 +1221,7 @@ function mu(r, t, e = {}) {
|
|
1221
1221
|
Array.from(s.document.body.children).forEach((E) => rn(E, "click", gn, w)), rn(s.document.documentElement, "click", gn, w);
|
1222
1222
|
}
|
1223
1223
|
let c = !0;
|
1224
|
-
const
|
1224
|
+
const m = (w) => ut(a).some((E) => {
|
1225
1225
|
if (typeof E == "string")
|
1226
1226
|
return Array.from(s.document.querySelectorAll(E)).some((k) => k === w.target || w.composedPath().includes(k));
|
1227
1227
|
{
|
@@ -1233,14 +1233,14 @@ function mu(r, t, e = {}) {
|
|
1233
1233
|
const E = ut(w);
|
1234
1234
|
return E && E.$.subTree.shapeFlag === 16;
|
1235
1235
|
}
|
1236
|
-
function
|
1236
|
+
function p(w, E) {
|
1237
1237
|
const k = ut(w), A = k.$.subTree && k.$.subTree.children;
|
1238
1238
|
return A == null || !Array.isArray(A) ? !1 : A.some((V) => V.el === E.target || E.composedPath().includes(V.el));
|
1239
1239
|
}
|
1240
1240
|
const v = (w) => {
|
1241
1241
|
const E = xt(r);
|
1242
|
-
if (w.target != null && !(!(E instanceof Element) && g(r) &&
|
1243
|
-
if ("detail" in w && w.detail === 0 && (c = !
|
1242
|
+
if (w.target != null && !(!(E instanceof Element) && g(r) && p(r, w)) && !(!E || E === w.target || w.composedPath().includes(E))) {
|
1243
|
+
if ("detail" in w && w.detail === 0 && (c = !m(w)), !c) {
|
1244
1244
|
c = !0;
|
1245
1245
|
return;
|
1246
1246
|
}
|
@@ -1256,7 +1256,7 @@ function mu(r, t, e = {}) {
|
|
1256
1256
|
}, { passive: !0, capture: l }),
|
1257
1257
|
rn(s, "pointerdown", (w) => {
|
1258
1258
|
const E = xt(r);
|
1259
|
-
c = !
|
1259
|
+
c = !m(w) && !!(E && !w.composedPath().includes(E));
|
1260
1260
|
}, { passive: !0 }),
|
1261
1261
|
o && rn(s, "blur", (w) => {
|
1262
1262
|
setTimeout(() => {
|
@@ -1291,11 +1291,11 @@ function ja(r, t = {}) {
|
|
1291
1291
|
controls: e = !1,
|
1292
1292
|
navigator: s = jo
|
1293
1293
|
} = t, a = ia(() => s && "permissions" in s), l = dt(), o = typeof r == "string" ? { name: r } : r, i = dt(), c = () => {
|
1294
|
-
var g,
|
1295
|
-
i.value = (
|
1294
|
+
var g, p;
|
1295
|
+
i.value = (p = (g = l.value) == null ? void 0 : g.state) != null ? p : "prompt";
|
1296
1296
|
};
|
1297
1297
|
rn(l, "change", c, { passive: !0 });
|
1298
|
-
const
|
1298
|
+
const m = ru(async () => {
|
1299
1299
|
if (a.value) {
|
1300
1300
|
if (!l.value)
|
1301
1301
|
try {
|
@@ -1309,10 +1309,10 @@ function ja(r, t = {}) {
|
|
1309
1309
|
return Fs(l.value);
|
1310
1310
|
}
|
1311
1311
|
});
|
1312
|
-
return
|
1312
|
+
return m(), e ? {
|
1313
1313
|
state: i,
|
1314
1314
|
isSupported: a,
|
1315
|
-
query:
|
1315
|
+
query: m
|
1316
1316
|
} : i;
|
1317
1317
|
}
|
1318
1318
|
function ra(r = {}) {
|
@@ -1322,7 +1322,7 @@ function ra(r = {}) {
|
|
1322
1322
|
source: s,
|
1323
1323
|
copiedDuring: a = 1500,
|
1324
1324
|
legacy: l = !1
|
1325
|
-
} = r, o = ia(() => t && "clipboard" in t), i = ja("clipboard-read"), c = ja("clipboard-write"),
|
1325
|
+
} = r, o = ia(() => t && "clipboard" in t), i = ja("clipboard-read"), c = ja("clipboard-write"), m = x(() => o.value || l), g = dt(""), p = dt(!1), v = du(() => p.value = !1, a, { immediate: !1 });
|
1326
1326
|
async function h() {
|
1327
1327
|
let k = !(o.value && E(i.value));
|
1328
1328
|
if (!k)
|
@@ -1333,9 +1333,9 @@ function ra(r = {}) {
|
|
1333
1333
|
}
|
1334
1334
|
k && (g.value = w());
|
1335
1335
|
}
|
1336
|
-
|
1336
|
+
m.value && e && rn(["copy", "cut"], h, { passive: !0 });
|
1337
1337
|
async function f(k = ut(s)) {
|
1338
|
-
if (
|
1338
|
+
if (m.value && k != null) {
|
1339
1339
|
let A = !(o.value && E(c.value));
|
1340
1340
|
if (!A)
|
1341
1341
|
try {
|
@@ -1343,7 +1343,7 @@ function ra(r = {}) {
|
|
1343
1343
|
} catch {
|
1344
1344
|
A = !0;
|
1345
1345
|
}
|
1346
|
-
A && _(k), g.value = k,
|
1346
|
+
A && _(k), g.value = k, p.value = !0, v.start();
|
1347
1347
|
}
|
1348
1348
|
}
|
1349
1349
|
function _(k) {
|
@@ -1358,9 +1358,9 @@ function ra(r = {}) {
|
|
1358
1358
|
return k === "granted" || k === "prompt";
|
1359
1359
|
}
|
1360
1360
|
return {
|
1361
|
-
isSupported:
|
1361
|
+
isSupported: m,
|
1362
1362
|
text: g,
|
1363
|
-
copied:
|
1363
|
+
copied: p,
|
1364
1364
|
copy: f
|
1365
1365
|
};
|
1366
1366
|
}
|
@@ -1373,20 +1373,20 @@ function fu(r, t, e = {}) {
|
|
1373
1373
|
const o = ia(() => s && "ResizeObserver" in s), i = () => {
|
1374
1374
|
l && (l.disconnect(), l = void 0);
|
1375
1375
|
}, c = x(() => {
|
1376
|
-
const
|
1377
|
-
return Array.isArray(
|
1378
|
-
}),
|
1376
|
+
const p = ut(r);
|
1377
|
+
return Array.isArray(p) ? p.map((v) => xt(v)) : [xt(p)];
|
1378
|
+
}), m = te(
|
1379
1379
|
c,
|
1380
|
-
(
|
1380
|
+
(p) => {
|
1381
1381
|
if (i(), o.value && s) {
|
1382
1382
|
l = new ResizeObserver(t);
|
1383
|
-
for (const v of
|
1383
|
+
for (const v of p)
|
1384
1384
|
v && l.observe(v, a);
|
1385
1385
|
}
|
1386
1386
|
},
|
1387
1387
|
{ immediate: !0, flush: "post" }
|
1388
1388
|
), g = () => {
|
1389
|
-
i(),
|
1389
|
+
i(), m();
|
1390
1390
|
};
|
1391
1391
|
return la(g), {
|
1392
1392
|
isSupported: o,
|
@@ -1395,12 +1395,12 @@ function fu(r, t, e = {}) {
|
|
1395
1395
|
}
|
1396
1396
|
function wn(r, t = { width: 0, height: 0 }, e = {}) {
|
1397
1397
|
const { window: s = ds, box: a = "content-box" } = e, l = x(() => {
|
1398
|
-
var
|
1399
|
-
return (v = (
|
1398
|
+
var p, v;
|
1399
|
+
return (v = (p = xt(r)) == null ? void 0 : p.namespaceURI) == null ? void 0 : v.includes("svg");
|
1400
1400
|
}), o = dt(t.width), i = dt(t.height), { stop: c } = fu(
|
1401
1401
|
r,
|
1402
|
-
([
|
1403
|
-
const v = a === "border-box" ?
|
1402
|
+
([p]) => {
|
1403
|
+
const v = a === "border-box" ? p.borderBoxSize : a === "content-box" ? p.contentBoxSize : p.devicePixelContentBoxSize;
|
1404
1404
|
if (s && l.value) {
|
1405
1405
|
const h = xt(r);
|
1406
1406
|
if (h) {
|
@@ -1411,22 +1411,22 @@ function wn(r, t = { width: 0, height: 0 }, e = {}) {
|
|
1411
1411
|
const h = Hn(v);
|
1412
1412
|
o.value = h.reduce((f, { inlineSize: _ }) => f + _, 0), i.value = h.reduce((f, { blockSize: _ }) => f + _, 0);
|
1413
1413
|
} else
|
1414
|
-
o.value =
|
1414
|
+
o.value = p.contentRect.width, i.value = p.contentRect.height;
|
1415
1415
|
},
|
1416
1416
|
e
|
1417
1417
|
);
|
1418
1418
|
uu(() => {
|
1419
|
-
const
|
1420
|
-
|
1419
|
+
const p = xt(r);
|
1420
|
+
p && (o.value = "offsetWidth" in p ? p.offsetWidth : t.width, i.value = "offsetHeight" in p ? p.offsetHeight : t.height);
|
1421
1421
|
});
|
1422
|
-
const
|
1422
|
+
const m = te(
|
1423
1423
|
() => xt(r),
|
1424
|
-
(
|
1425
|
-
o.value =
|
1424
|
+
(p) => {
|
1425
|
+
o.value = p ? t.width : 0, i.value = p ? t.height : 0;
|
1426
1426
|
}
|
1427
1427
|
);
|
1428
1428
|
function g() {
|
1429
|
-
c(),
|
1429
|
+
c(), m();
|
1430
1430
|
}
|
1431
1431
|
return {
|
1432
1432
|
width: o,
|
@@ -1439,14 +1439,14 @@ function hu(r, t, e, s = {}) {
|
|
1439
1439
|
const {
|
1440
1440
|
clone: i = !1,
|
1441
1441
|
passive: c = !1,
|
1442
|
-
eventName:
|
1442
|
+
eventName: m,
|
1443
1443
|
deep: g = !1,
|
1444
|
-
defaultValue:
|
1444
|
+
defaultValue: p,
|
1445
1445
|
shouldEmit: v
|
1446
1446
|
} = s, h = Us(), f = e || h?.emit || ((a = h?.$emit) == null ? void 0 : a.bind(h)) || ((o = (l = h?.proxy) == null ? void 0 : l.$emit) == null ? void 0 : o.bind(h?.proxy));
|
1447
|
-
let _ =
|
1447
|
+
let _ = m;
|
1448
1448
|
_ = _ || `update:${t.toString()}`;
|
1449
|
-
const w = (A) => i ? typeof i == "function" ? i(A) : gu(A) : A, E = () => su(r[t]) ? w(r[t]) :
|
1449
|
+
const w = (A) => i ? typeof i == "function" ? i(A) : gu(A) : A, E = () => su(r[t]) ? w(r[t]) : p, k = (A) => {
|
1450
1450
|
v ? v(A) && f(_, A) : f(_, A);
|
1451
1451
|
};
|
1452
1452
|
if (c) {
|
@@ -1520,9 +1520,9 @@ function wu() {
|
|
1520
1520
|
postChat: o,
|
1521
1521
|
removeTopic: i,
|
1522
1522
|
chatCompletions: c,
|
1523
|
-
saveChat:
|
1523
|
+
saveChat: m,
|
1524
1524
|
getHotTopics: g,
|
1525
|
-
getSettins:
|
1525
|
+
getSettins: p,
|
1526
1526
|
createOrder: v,
|
1527
1527
|
cancelOrder: h,
|
1528
1528
|
getOrder: f,
|
@@ -1538,7 +1538,7 @@ function wu() {
|
|
1538
1538
|
he[0] && z.value && (z.value.image && (he[0].image = _(z.value.image)), z.value.json && (he[0].json = w(z.value.json)), z.value.type && (he[0].type = z.value.type), z.value.dataType && (he[0].type = z.value.dataType)), ne.value = re.data;
|
1539
1539
|
}
|
1540
1540
|
}, Ye = async (L) => {
|
1541
|
-
if (O.value = !1, we.value = await
|
1541
|
+
if (O.value = !1, we.value = await p(), !we.value || !L || L.id === z.value?.fileId) return;
|
1542
1542
|
K.value = [], ne.value = [], R.value = !0;
|
1543
1543
|
const re = await a(L.id).catch(() => null);
|
1544
1544
|
re && re.success && (K.value = re.data), K.value.length && (R.value = !1, z.value = K.value[0], await gt(z.value.id)), O.value = !0;
|
@@ -1639,11 +1639,11 @@ function wu() {
|
|
1639
1639
|
} catch (ht) {
|
1640
1640
|
L.dsl = null, L.status = "Error", L.message = ht?.message;
|
1641
1641
|
}
|
1642
|
-
await
|
1642
|
+
await m(L), re && re(L);
|
1643
1643
|
}
|
1644
1644
|
},
|
1645
1645
|
async (Se) => {
|
1646
|
-
(Se.message || Se.name || "未知错误") === "network error" ? L.message = "网络异常,请稍后再试" : L.message = "请求失败,请稍后再试", L.status = "Failed", console.warn("completions error", Se), await
|
1646
|
+
(Se.message || Se.name || "未知错误") === "network error" ? L.message = "网络异常,请稍后再试" : L.message = "请求失败,请稍后再试", L.status = "Failed", console.warn("completions error", Se), await m(L), re && re(L);
|
1647
1647
|
}
|
1648
1648
|
), xn;
|
1649
1649
|
}, Rt = (L) => {
|
@@ -1663,7 +1663,7 @@ function wu() {
|
|
1663
1663
|
} catch {
|
1664
1664
|
ue.value.dsl = null;
|
1665
1665
|
}
|
1666
|
-
return await
|
1666
|
+
return await m(ue.value), Se;
|
1667
1667
|
}, Ze = () => {
|
1668
1668
|
U.value && !R.value && U.value.scrollToTop();
|
1669
1669
|
}, Wt = () => {
|
@@ -1861,28 +1861,28 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1861
1861
|
},
|
1862
1862
|
setup(r, { expose: t }) {
|
1863
1863
|
const e = r, { forward: s, backward: a, forwardDisabled: l, backwardDisabled: o, engine: i } = To(), c = x(() => {
|
1864
|
-
const { platform:
|
1865
|
-
return
|
1866
|
-
}),
|
1864
|
+
const { platform: p = "web" } = i.project.value || {};
|
1865
|
+
return p === "web";
|
1866
|
+
}), m = C("pc"), g = C({
|
1867
1867
|
width: 1920,
|
1868
1868
|
height: 1080
|
1869
1869
|
});
|
1870
1870
|
return te(
|
1871
1871
|
c,
|
1872
|
-
(
|
1873
|
-
|
1872
|
+
(p) => {
|
1873
|
+
m.value = p ? "pc" : "mobile";
|
1874
1874
|
},
|
1875
1875
|
{
|
1876
1876
|
immediate: !0
|
1877
1877
|
}
|
1878
1878
|
), t({
|
1879
|
-
mode:
|
1879
|
+
mode: m,
|
1880
1880
|
customSize: g
|
1881
|
-
}), (
|
1881
|
+
}), (p, v) => (u(), D("div", Du, [
|
1882
1882
|
d(n(Ka), {
|
1883
1883
|
size: "small",
|
1884
|
-
modelValue:
|
1885
|
-
"onUpdate:modelValue": v[0] || (v[0] = (h) =>
|
1884
|
+
modelValue: m.value,
|
1885
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => m.value = h)
|
1886
1886
|
}, {
|
1887
1887
|
default: b(() => [
|
1888
1888
|
d(n(An), {
|
@@ -1924,7 +1924,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1924
1924
|
]),
|
1925
1925
|
_: 1
|
1926
1926
|
}, 8, ["modelValue"]),
|
1927
|
-
|
1927
|
+
m.value === "custom" ? (u(), y(ju, {
|
1928
1928
|
key: 0,
|
1929
1929
|
modelValue: g.value,
|
1930
1930
|
"onUpdate:modelValue": v[1] || (v[1] = (h) => g.value = h)
|
@@ -2001,13 +2001,13 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2001
2001
|
version: v.latest
|
2002
2002
|
}), i.value = !!v;
|
2003
2003
|
});
|
2004
|
-
const
|
2005
|
-
if (!
|
2004
|
+
const m = x(() => c.value ? c.value : t.canvas ? t.canvas.toDataURL("image/png") : null), g = async () => {
|
2005
|
+
if (!m.value)
|
2006
2006
|
return await Et.alert("截图失败,无法完成发布", {
|
2007
2007
|
title: "提示",
|
2008
2008
|
type: "error"
|
2009
2009
|
}), !1;
|
2010
|
-
const v = Fl(
|
2010
|
+
const v = Fl(m.value), { dsl: h, id: f } = t;
|
2011
2011
|
let _;
|
2012
2012
|
i.value && (_ = await Et.confirm(
|
2013
2013
|
"该模板已存在,请确认您的操作是更新模板还是新建",
|
@@ -2033,7 +2033,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2033
2033
|
return k && (mt.success({
|
2034
2034
|
message: "发布模板成功!"
|
2035
2035
|
}), l.skeleton?.getWidget("Templates")?.widgetRef.refreshTemplates()), !!k;
|
2036
|
-
},
|
2036
|
+
}, p = async (v) => {
|
2037
2037
|
v.raw ? c.value = await no(v.raw) : c.value = "";
|
2038
2038
|
};
|
2039
2039
|
return (v, h) => (u(), y(n(Bt), {
|
@@ -2049,12 +2049,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2049
2049
|
editor: b(() => [
|
2050
2050
|
I("div", Bu, [
|
2051
2051
|
d(n(Dn), {
|
2052
|
-
src:
|
2052
|
+
src: m.value,
|
2053
2053
|
fit: "contain"
|
2054
2054
|
}, null, 8, ["src"]),
|
2055
2055
|
d(n(ns), {
|
2056
2056
|
class: "v-actions-widget__upload",
|
2057
|
-
onChange:
|
2057
|
+
onChange: p,
|
2058
2058
|
"auto-upload": !1,
|
2059
2059
|
"show-file-list": !1
|
2060
2060
|
}, {
|
@@ -2149,11 +2149,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2149
2149
|
coder: { type: Boolean, default: !1 }
|
2150
2150
|
},
|
2151
2151
|
setup(r) {
|
2152
|
-
const t = r, { engine: e, designer: s } = It(), { isLogined: a, toRemoteAuth: l } = nn(), o = C(!1), i = C(!1), c = C(),
|
2152
|
+
const t = r, { engine: e, designer: s } = It(), { isLogined: a, toRemoteAuth: l } = nn(), o = C(!1), i = C(!1), c = C(), m = () => {
|
2153
2153
|
e.current.value ? (o.value ? e.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (s.value?.setSelected(null), e.simulator.refresh()), De("刷新完成", "success")) : De("请先打开文件", "warning");
|
2154
2154
|
}, g = async () => {
|
2155
2155
|
e.current.value ? (o.value && (e.skeleton?.closePreview(), o.value = !1, await Yt(1e3)), s.value?.setSelected(e.current.value)) : De("请先打开文件", "warning");
|
2156
|
-
},
|
2156
|
+
}, p = () => {
|
2157
2157
|
if (e.project.value)
|
2158
2158
|
if (e.current.value) {
|
2159
2159
|
if (o.value) {
|
@@ -2251,7 +2251,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2251
2251
|
_: 1
|
2252
2252
|
}, 8, ["type"]),
|
2253
2253
|
d(n(ce), {
|
2254
|
-
onClick:
|
2254
|
+
onClick: p,
|
2255
2255
|
type: o.value ? "warning" : "default",
|
2256
2256
|
size: "small",
|
2257
2257
|
title: "预览"
|
@@ -2262,7 +2262,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2262
2262
|
_: 1
|
2263
2263
|
}, 8, ["type"]),
|
2264
2264
|
d(n(ce), {
|
2265
|
-
onClick:
|
2265
|
+
onClick: m,
|
2266
2266
|
type: "default",
|
2267
2267
|
size: "small",
|
2268
2268
|
title: "刷新"
|
@@ -2395,11 +2395,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2395
2395
|
), c = x(() => {
|
2396
2396
|
const h = Object.entries(Ms);
|
2397
2397
|
return o.value ? h.filter((f) => f[0].toLowerCase().includes(o.value)) : h;
|
2398
|
-
}),
|
2398
|
+
}), m = (h) => {
|
2399
2399
|
l.value = h;
|
2400
2400
|
}, g = () => {
|
2401
2401
|
s("change", l.value), s("update:modelValue", l.value), a.value = !1;
|
2402
|
-
},
|
2402
|
+
}, p = () => {
|
2403
2403
|
l.value = "", s("change", ""), s("update:modelValue", ""), a.value = !1;
|
2404
2404
|
}, v = () => {
|
2405
2405
|
a.value = !0;
|
@@ -2434,7 +2434,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2434
2434
|
d(n(ce), {
|
2435
2435
|
size: "default",
|
2436
2436
|
type: "warning",
|
2437
|
-
onClick:
|
2437
|
+
onClick: p
|
2438
2438
|
}, {
|
2439
2439
|
default: b(() => f[2] || (f[2] = [
|
2440
2440
|
Q(" 清除绑定 ")
|
@@ -2456,7 +2456,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2456
2456
|
I("div", Wu, [
|
2457
2457
|
(u(!0), D(X, null, le(c.value, (_) => (u(), y(n(ot), {
|
2458
2458
|
icon: _[1],
|
2459
|
-
onClick: (w) =>
|
2459
|
+
onClick: (w) => m(_[0]),
|
2460
2460
|
class: be({ "is-active": l.value === _[0] })
|
2461
2461
|
}, null, 8, ["icon", "onClick", "class"]))), 256)),
|
2462
2462
|
c.value.length === 0 ? (u(), y(n(Me), { key: 0 })) : j("", !0)
|
@@ -2468,7 +2468,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2468
2468
|
]));
|
2469
2469
|
}
|
2470
2470
|
}), Oe = wl({
|
2471
|
-
loader: () => import("./Editor-
|
2471
|
+
loader: () => import("./Editor-BmppC8Mj.js"),
|
2472
2472
|
loadingComponent: B({
|
2473
2473
|
render() {
|
2474
2474
|
return Zt("div", "正在拼命加载...");
|
@@ -2493,7 +2493,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2493
2493
|
}), i = x(() => {
|
2494
2494
|
const { platform: k = "web" } = e.value || {};
|
2495
2495
|
return k === "uniapp";
|
2496
|
-
}), c = x(() => s.options.pageRouteName || (i.value ? "pages" : "page")),
|
2496
|
+
}), c = x(() => s.options.pageRouteName || (i.value ? "pages" : "page")), m = () => ({
|
2497
2497
|
dir: !1,
|
2498
2498
|
name: "",
|
2499
2499
|
title: "",
|
@@ -2506,7 +2506,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2506
2506
|
cache: !1,
|
2507
2507
|
needLogin: !1,
|
2508
2508
|
style: null
|
2509
|
-
}), g = C(t.item ||
|
2509
|
+
}), g = C(t.item || m()), p = x({
|
2510
2510
|
get() {
|
2511
2511
|
return JSON.stringify(g.value.meta || {}, null, 4);
|
2512
2512
|
},
|
@@ -2542,6 +2542,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2542
2542
|
title: l.value,
|
2543
2543
|
width: "800px",
|
2544
2544
|
height: "650px",
|
2545
|
+
maximizable: !0,
|
2545
2546
|
"form-props": { tooltipMessage: !1 },
|
2546
2547
|
model: g.value,
|
2547
2548
|
"submit-method": _
|
@@ -2669,8 +2670,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2669
2670
|
dark: "",
|
2670
2671
|
height: "100px",
|
2671
2672
|
lang: "json",
|
2672
|
-
modelValue:
|
2673
|
-
"onUpdate:modelValue": A[2] || (A[2] = (V) =>
|
2673
|
+
modelValue: p.value,
|
2674
|
+
"onUpdate:modelValue": A[2] || (A[2] = (V) => p.value = V)
|
2674
2675
|
}, null, 8, ["modelValue"])
|
2675
2676
|
]),
|
2676
2677
|
_: 1
|
@@ -2694,6 +2695,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2694
2695
|
d(n(Oe), {
|
2695
2696
|
dark: "",
|
2696
2697
|
height: "250px",
|
2698
|
+
width: "100%",
|
2697
2699
|
lang: "json",
|
2698
2700
|
modelValue: v.value,
|
2699
2701
|
"onUpdate:modelValue": A[3] || (A[3] = (V) => v.value = V)
|
@@ -2769,11 +2771,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2769
2771
|
"is-collapsed": !!l.value
|
2770
2772
|
})), c = () => {
|
2771
2773
|
a("refresh");
|
2772
|
-
},
|
2774
|
+
}, m = () => {
|
2773
2775
|
a("plus");
|
2774
2776
|
}, g = () => {
|
2775
2777
|
a("edit");
|
2776
|
-
},
|
2778
|
+
}, p = () => {
|
2777
2779
|
a("back");
|
2778
2780
|
}, v = () => {
|
2779
2781
|
a("remove");
|
@@ -2785,7 +2787,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2785
2787
|
content: s.title,
|
2786
2788
|
subtitle: s.subtitle,
|
2787
2789
|
icon: s.back ? Bi : void 0,
|
2788
|
-
onClickBack: s.back ?
|
2790
|
+
onClickBack: s.back ? p : void 0,
|
2789
2791
|
onClick: s.collapsable ? () => {
|
2790
2792
|
l.value = !l.value;
|
2791
2793
|
} : void 0
|
@@ -2836,7 +2838,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2836
2838
|
title: "新增",
|
2837
2839
|
menus: s.menus,
|
2838
2840
|
dropdown: { placement: "bottom-end" },
|
2839
|
-
onClick:
|
2841
|
+
onClick: m,
|
2840
2842
|
onCommand: f
|
2841
2843
|
}, null, 8, ["size", "icon", "menus"])) : j("", !0),
|
2842
2844
|
s.edit ? (u(), y(n(Be), {
|
@@ -2941,7 +2943,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2941
2943
|
}, i = (c) => {
|
2942
2944
|
s("action-click", c);
|
2943
2945
|
};
|
2944
|
-
return (c,
|
2946
|
+
return (c, m) => (u(), y(n(ls), {
|
2945
2947
|
class: "v-tabs",
|
2946
2948
|
border: !1,
|
2947
2949
|
fit: "",
|
@@ -2954,7 +2956,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2954
2956
|
items: e.items,
|
2955
2957
|
type: "card",
|
2956
2958
|
modelValue: a.value,
|
2957
|
-
"onUpdate:modelValue":
|
2959
|
+
"onUpdate:modelValue": m[0] || (m[0] = (g) => a.value = g),
|
2958
2960
|
onTabRemove: o,
|
2959
2961
|
onActionClick: i,
|
2960
2962
|
stretch: e.stretch
|
@@ -3092,7 +3094,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3092
3094
|
"is-hover": s.hover,
|
3093
3095
|
"is-small": s.small,
|
3094
3096
|
"is-nowrap": s.nowrap
|
3095
|
-
})),
|
3097
|
+
})), m = () => {
|
3096
3098
|
a("click", s.modelValue);
|
3097
3099
|
}, g = async (v) => {
|
3098
3100
|
v === "remove" ? await Et.confirm("确定删除吗?", "提示", {
|
@@ -3104,7 +3106,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3104
3106
|
name: v,
|
3105
3107
|
modelValue: s.modelValue
|
3106
3108
|
});
|
3107
|
-
},
|
3109
|
+
}, p = (v) => {
|
3108
3110
|
g(v.command);
|
3109
3111
|
};
|
3110
3112
|
return te(l, (v) => {
|
@@ -3118,7 +3120,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3118
3120
|
class: be(["v-item", c.value]),
|
3119
3121
|
justify: "space-between",
|
3120
3122
|
align: "center",
|
3121
|
-
onClick:
|
3123
|
+
onClick: m
|
3122
3124
|
}, {
|
3123
3125
|
default: b(() => [
|
3124
3126
|
d(n(fe), {
|
@@ -3199,7 +3201,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3199
3201
|
type: "info",
|
3200
3202
|
menus: i.value,
|
3201
3203
|
dropdown: { placement: "bottom-end" },
|
3202
|
-
onCommand:
|
3204
|
+
onCommand: p
|
3203
3205
|
}, null, 8, ["icon", "menus"])) : j("", !0)
|
3204
3206
|
]),
|
3205
3207
|
_: 3
|
@@ -3250,12 +3252,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3250
3252
|
await Et.confirm("确认删除?", "提示", {
|
3251
3253
|
type: "warning"
|
3252
3254
|
}).catch(() => !1) && s("remove");
|
3253
|
-
},
|
3255
|
+
}, m = (h) => {
|
3254
3256
|
h.command === "edit" && o(), h.command === "remove" && c(), h.command === "copy" && i();
|
3255
3257
|
}, g = x(() => ({
|
3256
3258
|
"is-active": e.active,
|
3257
3259
|
"is-draggable": e.draggable
|
3258
|
-
})),
|
3260
|
+
})), p = () => {
|
3259
3261
|
s("dragstart", e);
|
3260
3262
|
}, v = () => {
|
3261
3263
|
s("dragend", e);
|
@@ -3263,7 +3265,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3263
3265
|
return (h, f) => (u(), D("div", {
|
3264
3266
|
class: be(["v-box", g.value]),
|
3265
3267
|
draggable: h.draggable,
|
3266
|
-
onDragstart:
|
3268
|
+
onDragstart: p,
|
3267
3269
|
onDragend: v
|
3268
3270
|
}, [
|
3269
3271
|
d(n(fe), {
|
@@ -3299,7 +3301,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3299
3301
|
type: "info",
|
3300
3302
|
dropdown: { placement: "bottom-end" },
|
3301
3303
|
menus: l,
|
3302
|
-
onCommand:
|
3304
|
+
onCommand: m
|
3303
3305
|
}, null, 8, ["icon"])
|
3304
3306
|
]),
|
3305
3307
|
_: 1
|
@@ -3324,7 +3326,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3324
3326
|
const i = (h, f) => h ? f.label.includes(h) : !0, c = (h) => {
|
3325
3327
|
const f = h.value, _ = As(f);
|
3326
3328
|
return _ === "Object" || _ === "Module" ? Object.keys(f || {}).length === 0 : _ === "Array" ? f.length === 0 : !0;
|
3327
|
-
},
|
3329
|
+
}, m = (h, f = "this") => typeof h == "object" ? Array.isArray(h) ? h.map((w, E) => {
|
3328
3330
|
const k = `[${E}]`;
|
3329
3331
|
return {
|
3330
3332
|
label: k,
|
@@ -3344,12 +3346,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3344
3346
|
(w) => !w.label.startsWith("__") && !a.includes(w.label)
|
3345
3347
|
) : [], g = (h, f) => {
|
3346
3348
|
if (h.level === 0)
|
3347
|
-
f(
|
3349
|
+
f(m(e.context));
|
3348
3350
|
else {
|
3349
3351
|
const _ = Fs(h.data.value);
|
3350
|
-
f(
|
3352
|
+
f(m(_, h.data.path));
|
3351
3353
|
}
|
3352
|
-
},
|
3354
|
+
}, p = (h) => {
|
3353
3355
|
s("copy", h.path);
|
3354
3356
|
}, v = (h) => {
|
3355
3357
|
s("pick", h.path);
|
@@ -3391,7 +3393,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3391
3393
|
onClick: (w) => v(_),
|
3392
3394
|
background: "",
|
3393
3395
|
actions: ["copy"],
|
3394
|
-
onAction: (w) =>
|
3396
|
+
onAction: (w) => p(_),
|
3395
3397
|
grow: "",
|
3396
3398
|
small: ""
|
3397
3399
|
}, null, 8, ["title", "subtitle", "subtitle-cls", "onClick", "onAction"])
|
@@ -3435,16 +3437,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3435
3437
|
name: "viewer",
|
3436
3438
|
label: "高级"
|
3437
3439
|
}
|
3438
|
-
], c = C("normal"),
|
3439
|
-
s("submit", E), e.submitMethod ? await e.submitMethod(E) &&
|
3440
|
-
},
|
3440
|
+
], c = C("normal"), m = C(), g = async (E) => {
|
3441
|
+
s("submit", E), e.submitMethod ? await e.submitMethod(E) && p() : p();
|
3442
|
+
}, p = () => {
|
3441
3443
|
s("update:modelValue", !1), s("close");
|
3442
3444
|
}, v = () => {
|
3443
3445
|
s("unbind");
|
3444
3446
|
}, h = () => {
|
3445
|
-
|
3447
|
+
p();
|
3446
3448
|
}, f = async () => {
|
3447
|
-
|
3449
|
+
m.value?.submit();
|
3448
3450
|
}, _ = (E) => {
|
3449
3451
|
s("pick", E);
|
3450
3452
|
}, w = (E) => {
|
@@ -3462,7 +3464,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3462
3464
|
resizable: !1,
|
3463
3465
|
maximizable: !0,
|
3464
3466
|
minimizable: !1,
|
3465
|
-
onClose:
|
3467
|
+
onClose: p
|
3466
3468
|
}, {
|
3467
3469
|
default: b(() => [
|
3468
3470
|
d(n(fe), {
|
@@ -3594,7 +3596,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3594
3596
|
default: b(() => [
|
3595
3597
|
d(n(Xs), {
|
3596
3598
|
ref_key: "formRef",
|
3597
|
-
ref:
|
3599
|
+
ref: m,
|
3598
3600
|
class: "v-binder__form",
|
3599
3601
|
footer: !1,
|
3600
3602
|
"label-position": "top",
|
@@ -3631,7 +3633,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3631
3633
|
}, i = () => {
|
3632
3634
|
a.value ? (s("submit", a.value), s("update:modelValue", !1)) : Ee("请选择插槽");
|
3633
3635
|
};
|
3634
|
-
return (c,
|
3636
|
+
return (c, m) => (u(), y(n(Vt), Je({
|
3635
3637
|
class: "v-slots-picker",
|
3636
3638
|
title: `选择插槽: ${e.name}`,
|
3637
3639
|
width: "600px",
|
@@ -3654,14 +3656,14 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3654
3656
|
wrap: "wrap"
|
3655
3657
|
}, {
|
3656
3658
|
default: b(() => [
|
3657
|
-
(u(!0), D(X, null, le(e.slots, (g,
|
3659
|
+
(u(!0), D(X, null, le(e.slots, (g, p) => (u(), y(n(fe), {
|
3658
3660
|
class: be(["v-slots-picker__item", { "is-active": g.name === a.value?.name }]),
|
3659
3661
|
grow: "",
|
3660
3662
|
flex: !1,
|
3661
3663
|
onClick: (v) => o(g)
|
3662
3664
|
}, {
|
3663
3665
|
default: b(() => [
|
3664
|
-
I("span", id, "#" + ae(
|
3666
|
+
I("span", id, "#" + ae(p + 1), 1),
|
3665
3667
|
Q(" " + ae(g.name), 1)
|
3666
3668
|
]),
|
3667
3669
|
_: 2
|
@@ -3685,8 +3687,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3685
3687
|
setup(r) {
|
3686
3688
|
const t = r, e = x(() => [`is-${t.mode}`]), s = x(() => t.mode === "mobile" ? xc : t.mode === "pad" ? Ac : t.customSize), a = x(() => {
|
3687
3689
|
if (t.mode === "pc") return 1;
|
3688
|
-
const { width: o, height: i } = s.value, c = o > 0 ? (t.width || 0) / o : 1,
|
3689
|
-
return Math.min(c,
|
3690
|
+
const { width: o, height: i } = s.value, c = o > 0 ? (t.width || 0) / o : 1, m = i > 0 ? (t.height || 0) / i : 1;
|
3691
|
+
return Math.min(c, m);
|
3690
3692
|
}), l = x(() => {
|
3691
3693
|
if (t.mode === "pc") return {};
|
3692
3694
|
const { width: o, height: i } = s.value;
|
@@ -3725,13 +3727,13 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3725
3727
|
name: "PagesWidget",
|
3726
3728
|
__name: "index",
|
3727
3729
|
setup(r) {
|
3728
|
-
const { project: t, engine: e } = mn(), s = x(() => t.value?.pages || []), { current: a } = Xe(), l = C(!1), o = C(), i = C(), c = x(() => `(共 ${s.value.length} 项)`),
|
3730
|
+
const { project: t, engine: e } = mn(), s = x(() => t.value?.pages || []), { current: a } = Xe(), l = C(!1), o = C(), i = C(), c = x(() => `(共 ${s.value.length} 项)`), m = x(() => {
|
3729
3731
|
const { platform: w = "web" } = t.value || {};
|
3730
3732
|
return w === "uniapp";
|
3731
3733
|
}), g = (w) => {
|
3732
3734
|
const E = [];
|
3733
|
-
return t.value?.homepage === w.id && E.push("主"), !
|
3734
|
-
},
|
3735
|
+
return t.value?.homepage === w.id && E.push("主"), !m.value && w.mask && E.push("母"), !m.value && w.cache && E.push("缓"), !m.value && w.hidden && E.push("隐"), !m.value && w.pure && E.push("纯"), w.raw && E.push("源"), E;
|
3736
|
+
}, p = () => {
|
3735
3737
|
i.value = void 0, o.value = void 0, l.value = !0;
|
3736
3738
|
}, v = async (w) => {
|
3737
3739
|
const { name: E, modelValue: k } = w, { data: A, node: V } = k;
|
@@ -3768,7 +3770,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3768
3770
|
title: "页面管理",
|
3769
3771
|
plus: "",
|
3770
3772
|
subtitle: c.value,
|
3771
|
-
onPlus:
|
3773
|
+
onPlus: p
|
3772
3774
|
}, {
|
3773
3775
|
default: b(() => [
|
3774
3776
|
d(n(Ks), {
|
@@ -3823,19 +3825,19 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3823
3825
|
const e = r, s = t, { engine: a, project: l } = mn(), o = C([]), i = C(!1), c = (k) => Array.isArray(k) ? k.map((A) => ({
|
3824
3826
|
name: A.filename,
|
3825
3827
|
url: A.filepath
|
3826
|
-
})) : k ? { name: k.filename, url: k.filepath } : null,
|
3828
|
+
})) : k ? { name: k.filename, url: k.filepath } : null, m = async (k) => {
|
3827
3829
|
if (a && l.value) {
|
3828
3830
|
const A = await a.service.uploadStaticFile(k, l.value.id);
|
3829
3831
|
return c(A);
|
3830
3832
|
}
|
3831
3833
|
return null;
|
3832
|
-
}, g = (k) => k ? (k || "").split(",").map((V) => ({ url: V })) : [],
|
3834
|
+
}, g = (k) => k ? (k || "").split(",").map((V) => ({ url: V })) : [], p = C(
|
3833
3835
|
g(e.modelValue)
|
3834
|
-
), v = x(() => Array.isArray(
|
3836
|
+
), v = x(() => Array.isArray(p.value) ? p.value.map((k) => k.url).join(",") : p.value ? p.value.url : "");
|
3835
3837
|
te(
|
3836
3838
|
() => e.modelValue,
|
3837
3839
|
(k) => {
|
3838
|
-
|
3840
|
+
p.value = g(k);
|
3839
3841
|
}
|
3840
3842
|
), te(i, async (k) => {
|
3841
3843
|
if (k) {
|
@@ -3844,17 +3846,17 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3844
3846
|
}
|
3845
3847
|
});
|
3846
3848
|
const h = () => {
|
3847
|
-
if (!
|
3849
|
+
if (!p.value || Array.isArray(p.value) && p.value.length === 0)
|
3848
3850
|
return Ee("请选择文件"), !1;
|
3849
3851
|
const k = (e.attachment?.accept || "").toLowerCase().split(",");
|
3850
|
-
return k.length > 0 ? [].concat(
|
3852
|
+
return k.length > 0 ? [].concat(p.value).every((N) => {
|
3851
3853
|
const O = N.name || N.url.split("?")[0], T = O.substring(O.lastIndexOf(".")).toLowerCase();
|
3852
3854
|
return k.includes(T);
|
3853
3855
|
}) ? !0 : (Ee(`只支持 ${k.join(",")} 文件`), !1) : !0;
|
3854
3856
|
}, f = () => {
|
3855
3857
|
h() && (s("change", v.value), s("update:modelValue", v.value), i.value = !1);
|
3856
3858
|
}, _ = () => {
|
3857
|
-
|
3859
|
+
p.value = [], s("change", void 0), s("update:modelValue", void 0), i.value = !1;
|
3858
3860
|
}, w = () => {
|
3859
3861
|
i.value = !0;
|
3860
3862
|
}, E = (k) => {
|
@@ -3896,11 +3898,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3896
3898
|
size: "small",
|
3897
3899
|
"list-type": "list",
|
3898
3900
|
selectable: !0,
|
3899
|
-
uploader:
|
3901
|
+
uploader: m,
|
3900
3902
|
modelValue: o.value,
|
3901
3903
|
"onUpdate:modelValue": A[0] || (A[0] = (V) => o.value = V),
|
3902
|
-
"select-value":
|
3903
|
-
"onUpdate:selectValue": A[1] || (A[1] = (V) =>
|
3904
|
+
"select-value": p.value,
|
3905
|
+
"onUpdate:selectValue": A[1] || (A[1] = (V) => p.value = V)
|
3904
3906
|
}, e.attachment, { onRemove: E }), null, 16, ["modelValue", "select-value"])
|
3905
3907
|
]),
|
3906
3908
|
_: 1
|
@@ -3917,7 +3919,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3917
3919
|
filterable: !0,
|
3918
3920
|
allowCreate: !0,
|
3919
3921
|
defaultFirstOption: !0
|
3920
|
-
},
|
3922
|
+
}, m = x(() => i.value.map((z) => ({
|
3921
3923
|
label: z,
|
3922
3924
|
value: z
|
3923
3925
|
}))), g = [
|
@@ -3936,7 +3938,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3936
3938
|
value: "Plugin",
|
3937
3939
|
border: !0
|
3938
3940
|
}
|
3939
|
-
],
|
3941
|
+
], p = {
|
3940
3942
|
Schema: {
|
3941
3943
|
label: "设计",
|
3942
3944
|
type: "primary"
|
@@ -4040,8 +4042,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4040
4042
|
title: $.title,
|
4041
4043
|
active: n(h)?.id === $.id,
|
4042
4044
|
editable: !$.preset,
|
4043
|
-
tag:
|
4044
|
-
tagType:
|
4045
|
+
tag: p[$.fromType || "Schema"]?.label,
|
4046
|
+
tagType: p[$.fromType || "Schema"]?.type,
|
4045
4047
|
onEdit: (q) => O($),
|
4046
4048
|
onCopy: (q) => T($),
|
4047
4049
|
onRemove: (q) => R($),
|
@@ -4119,7 +4121,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4119
4121
|
label: "分组",
|
4120
4122
|
editor: "select",
|
4121
4123
|
props: c,
|
4122
|
-
options:
|
4124
|
+
options: m.value
|
4123
4125
|
}, null, 8, ["options"])
|
4124
4126
|
]),
|
4125
4127
|
_: 1
|
@@ -4135,14 +4137,14 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4135
4137
|
name: "ComponentsWidget",
|
4136
4138
|
__name: "index",
|
4137
4139
|
setup(r) {
|
4138
|
-
const { span: t, engine: e } = oa(), { tabs: s, currentTab: a, currentGroup: l, model: o, searchKey: i, searchResult: c } = Uc(),
|
4140
|
+
const { span: t, engine: e } = oa(), { tabs: s, currentTab: a, currentGroup: l, model: o, searchKey: i, searchResult: c } = Uc(), m = (p) => {
|
4139
4141
|
const v = e.skeleton?.getWidget("Designer")?.widgetRef?.designer;
|
4140
|
-
v && v.setDragging(
|
4142
|
+
v && v.setDragging(p);
|
4141
4143
|
}, g = () => {
|
4142
|
-
const
|
4143
|
-
|
4144
|
+
const p = e.skeleton?.getWidget("Designer")?.widgetRef?.designer;
|
4145
|
+
p && p.setDragging(null);
|
4144
4146
|
};
|
4145
|
-
return (
|
4147
|
+
return (p, v) => (u(), y(n(ge), {
|
4146
4148
|
class: "v-components-widget",
|
4147
4149
|
title: "组件库",
|
4148
4150
|
body: { flex: !0, direction: "column" }
|
@@ -4178,7 +4180,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4178
4180
|
title: h.label || h.name,
|
4179
4181
|
icon: h.icon,
|
4180
4182
|
draggable: "",
|
4181
|
-
onDragstart: (_) =>
|
4183
|
+
onDragstart: (_) => m(h),
|
4182
4184
|
onDragend: g
|
4183
4185
|
}, null, 8, ["name", "title", "icon", "onDragstart"])
|
4184
4186
|
]),
|
@@ -4224,7 +4226,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4224
4226
|
title: f.label || f.name,
|
4225
4227
|
icon: f.icon,
|
4226
4228
|
draggable: "",
|
4227
|
-
onDragstart: (_) =>
|
4229
|
+
onDragstart: (_) => m(f),
|
4228
4230
|
onDragend: g
|
4229
4231
|
}, null, 8, ["name", "title", "icon", "onDragstart"])
|
4230
4232
|
]),
|
@@ -4287,7 +4289,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4287
4289
|
};
|
4288
4290
|
Array.isArray(R.children) && (W.children = i(R.children, R)), T.push(W);
|
4289
4291
|
}), T;
|
4290
|
-
},
|
4292
|
+
}, m = () => {
|
4291
4293
|
if (!a.value) return [];
|
4292
4294
|
const { id: O, name: T, nodes: R } = a.value;
|
4293
4295
|
return [
|
@@ -4300,8 +4302,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4300
4302
|
}
|
4301
4303
|
];
|
4302
4304
|
}, g = async () => {
|
4303
|
-
l.value =
|
4304
|
-
},
|
4305
|
+
l.value = m(), s.value?.model && (await ct(), e.value?.setSelected(s.value.model));
|
4306
|
+
}, p = x(() => s.value?.model.id), v = (O) => {
|
4305
4307
|
const T = O.data;
|
4306
4308
|
if (T.type === "slot" || Pe(T.model) || T.model.locked || T.model.name === "template")
|
4307
4309
|
return !1;
|
@@ -4408,7 +4410,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4408
4410
|
"default-expand-all": "",
|
4409
4411
|
draggable: "",
|
4410
4412
|
"empty-text": "请新建或打开文件",
|
4411
|
-
"current-node-key":
|
4413
|
+
"current-node-key": p.value,
|
4412
4414
|
"highlight-current": !0,
|
4413
4415
|
"expand-on-click-node": !1,
|
4414
4416
|
"allow-drop": h,
|
@@ -4468,16 +4470,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4468
4470
|
key: 0,
|
4469
4471
|
"image-size": 50
|
4470
4472
|
})) : j("", !0),
|
4471
|
-
n(t) ? (u(!0), D(X, { key: 1 }, le(n(t).items, (
|
4473
|
+
n(t) ? (u(!0), D(X, { key: 1 }, le(n(t).items, (m, g) => (u(), y(n(Ge), {
|
4472
4474
|
index: g + 1,
|
4473
|
-
title:
|
4474
|
-
"model-value":
|
4475
|
+
title: m.label,
|
4476
|
+
"model-value": m,
|
4475
4477
|
active: g == n(t).index,
|
4476
4478
|
small: "",
|
4477
4479
|
background: "",
|
4478
4480
|
actions: ["remove"],
|
4479
4481
|
onAction: l,
|
4480
|
-
onClick: (
|
4482
|
+
onClick: (p) => n(e)(m.id)
|
4481
4483
|
}, null, 8, ["index", "title", "model-value", "active", "onClick"]))), 256)) : j("", !0)
|
4482
4484
|
]),
|
4483
4485
|
_: 1
|
@@ -4692,7 +4694,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4692
4694
|
categories: {}
|
4693
4695
|
},
|
4694
4696
|
setup(r) {
|
4695
|
-
const t = r, e = x(() => t.model ? "编辑API" : "新增API"), s = C("base"), a = C(), l = C(), o = C(t.model || {}), i = C(!1), c = C(""),
|
4697
|
+
const t = r, e = x(() => t.model ? "编辑API" : "新增API"), s = C("base"), a = C(), l = C(), o = C(t.model || {}), i = C(!1), c = C(""), m = [
|
4696
4698
|
{
|
4697
4699
|
label: "基础信息",
|
4698
4700
|
value: "base"
|
@@ -4721,7 +4723,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4721
4723
|
_ || (await ct(), s.value = "base");
|
4722
4724
|
});
|
4723
4725
|
});
|
4724
|
-
const
|
4726
|
+
const p = () => {
|
4725
4727
|
a.value?.cancel();
|
4726
4728
|
}, v = () => {
|
4727
4729
|
l.value?.submit();
|
@@ -4761,7 +4763,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4761
4763
|
d(n(is), {
|
4762
4764
|
modelValue: s.value,
|
4763
4765
|
"onUpdate:modelValue": w[0] || (w[0] = (E) => s.value = E),
|
4764
|
-
items:
|
4766
|
+
items: m,
|
4765
4767
|
"tab-position": "left",
|
4766
4768
|
border: "",
|
4767
4769
|
fit: ""
|
@@ -4795,7 +4797,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4795
4797
|
}, 8, ["disabled"])) : j("", !0)
|
4796
4798
|
]),
|
4797
4799
|
I("div", null, [
|
4798
|
-
d(n(ce), { onClick:
|
4800
|
+
d(n(ce), { onClick: p }, {
|
4799
4801
|
default: b(() => w[3] || (w[3] = [
|
4800
4802
|
Q("取消")
|
4801
4803
|
])),
|
@@ -4878,7 +4880,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4878
4880
|
return a.value ? w.filter((E) => E.name.includes(a.value) || E.label?.includes(a.value) || E.url.includes(a.value)) : w;
|
4879
4881
|
}), i = x(
|
4880
4882
|
() => In(o.value, (w) => w.category || "默认分组")
|
4881
|
-
), c = x(() => Object.keys(i.value)),
|
4883
|
+
), c = x(() => Object.keys(i.value)), m = x(() => c.value[0]), g = C(m.value), p = () => ({
|
4882
4884
|
id: "",
|
4883
4885
|
method: "get",
|
4884
4886
|
name: "",
|
@@ -4908,7 +4910,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4908
4910
|
}`
|
4909
4911
|
}
|
4910
4912
|
}), v = () => {
|
4911
|
-
e.value = !0, l.value = !1, s.value =
|
4913
|
+
e.value = !0, l.value = !1, s.value = p();
|
4912
4914
|
}, h = {
|
4913
4915
|
get: "success",
|
4914
4916
|
post: "primary",
|
@@ -4986,10 +4988,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4986
4988
|
name: "DepsWidget",
|
4987
4989
|
__name: "index",
|
4988
4990
|
setup(r) {
|
4989
|
-
const { dependencies: t, engine: e } = Io(), s = C(!1), a = C(!1), l = C({}), o = x(() => a.value ? "查看依赖" : l.value ? "编辑依赖" : "新增依赖"), i = (f) => f.required || f.official ? [] : ["edit", "remove"], c = (f) => f.official && !f.required,
|
4991
|
+
const { dependencies: t, engine: e } = Io(), s = C(!1), a = C(!1), l = C({}), o = x(() => a.value ? "查看依赖" : l.value ? "编辑依赖" : "新增依赖"), i = (f) => f.required || f.official ? [] : ["edit", "remove"], c = (f) => f.official && !f.required, m = async (f) => (f.urls = f.urls.split(`
|
4990
4992
|
`), f.enabled = !0, f.official = !1, e.project.value?.setDeps(f), !0), g = (f) => {
|
4991
4993
|
e.project.value?.setDeps(f);
|
4992
|
-
},
|
4994
|
+
}, p = () => {
|
4993
4995
|
a.value = !1, s.value = !0, l.value = null;
|
4994
4996
|
}, v = (f) => {
|
4995
4997
|
a.value = !0, l.value = {
|
@@ -5010,7 +5012,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5010
5012
|
class: "v-deps-widget",
|
5011
5013
|
title: "依赖管理",
|
5012
5014
|
plus: "",
|
5013
|
-
onPlus:
|
5015
|
+
onPlus: p
|
5014
5016
|
}, {
|
5015
5017
|
default: b(() => [
|
5016
5018
|
(u(!0), D(X, null, le(n(t), (w) => (u(), y(n(Ge), {
|
@@ -5033,7 +5035,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5033
5035
|
height: "500px",
|
5034
5036
|
title: o.value,
|
5035
5037
|
model: l.value,
|
5036
|
-
submitMethod:
|
5038
|
+
submitMethod: m,
|
5037
5039
|
formProps: {
|
5038
5040
|
disabled: a.value,
|
5039
5041
|
tooltipMessage: !1
|
@@ -5131,10 +5133,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5131
5133
|
}
|
5132
5134
|
], c = (g) => {
|
5133
5135
|
s("action", { type: "selected", model: g.command });
|
5134
|
-
},
|
5136
|
+
}, m = async (g) => {
|
5135
5137
|
g.name === "remove" ? await $t("确定删除?") && s("action", { type: g.name, model: e.model }) : s("action", { type: g.name, model: e.model });
|
5136
5138
|
};
|
5137
|
-
return (g,
|
5139
|
+
return (g, p) => (u(), D("div", {
|
5138
5140
|
class: be(["v-actions", [`is-${e.position}`]])
|
5139
5141
|
}, [
|
5140
5142
|
d(n(Be), {
|
@@ -5152,7 +5154,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5152
5154
|
size: "small",
|
5153
5155
|
items: i,
|
5154
5156
|
background: "none",
|
5155
|
-
onClick:
|
5157
|
+
onClick: m
|
5156
5158
|
}, null, 8, ["disabled"])
|
5157
5159
|
], 2));
|
5158
5160
|
}
|
@@ -5167,11 +5169,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5167
5169
|
inheritAttrs: !1,
|
5168
5170
|
__name: "index",
|
5169
5171
|
setup(r, { expose: t }) {
|
5170
|
-
const e = C(), s = C(), { width: a, height: l } = wn(e), { dependencies: o, engine: i, apis: c, meta:
|
5172
|
+
const e = C(), s = C(), { width: a, height: l } = wn(e), { dependencies: o, engine: i, apis: c, meta: m } = Io(), { current: g, isEmpty: p } = Xe(), v = x(() => i.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc"), h = x(() => i.skeleton?.getWidget("Toolbar")?.widgetRef.customSize), f = x(() => i.project.value?.config || {}), _ = x(() => i.project.value?.uniConfig || {}), { designer: w, hover: E, dropping: k, selected: A, lines: V } = Fc(
|
5171
5173
|
s,
|
5172
5174
|
o,
|
5173
5175
|
c,
|
5174
|
-
|
5176
|
+
m,
|
5175
5177
|
f,
|
5176
5178
|
_
|
5177
5179
|
), N = (R) => {
|
@@ -5261,7 +5263,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5261
5263
|
style: fn(Z)
|
5262
5264
|
}, null, 4))), 256))
|
5263
5265
|
])) : j("", !0),
|
5264
|
-
n(g) && n(
|
5266
|
+
n(g) && n(p) ? (u(), D("div", Rd, " 您可以拖拽组件放置到这里 ")) : j("", !0),
|
5265
5267
|
I("iframe", {
|
5266
5268
|
ref_key: "iframe",
|
5267
5269
|
ref: s,
|
@@ -5291,10 +5293,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5291
5293
|
() => o.value ? `编辑${t.title}` : `新增${t.title}`
|
5292
5294
|
), c = () => {
|
5293
5295
|
o.value = !1, l.value = t.createEmpty(), a.value = !0;
|
5294
|
-
},
|
5296
|
+
}, m = (f, _) => {
|
5295
5297
|
switch (_.name) {
|
5296
5298
|
case "edit":
|
5297
|
-
|
5299
|
+
p(f);
|
5298
5300
|
break;
|
5299
5301
|
case "remove":
|
5300
5302
|
t.remove(f);
|
@@ -5302,7 +5304,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5302
5304
|
}
|
5303
5305
|
}, g = (f) => {
|
5304
5306
|
l.value.value = f;
|
5305
|
-
},
|
5307
|
+
}, p = (f) => {
|
5306
5308
|
o.value = !0, l.value = {
|
5307
5309
|
...f
|
5308
5310
|
}, a.value = !0;
|
@@ -5322,8 +5324,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5322
5324
|
title: t.itemTitle(w),
|
5323
5325
|
border: "",
|
5324
5326
|
actions: ["edit", "remove"],
|
5325
|
-
onAction: (E) =>
|
5326
|
-
onClick: (E) =>
|
5327
|
+
onAction: (E) => m(w, E),
|
5328
|
+
onClick: (E) => p(w)
|
5327
5329
|
}, null, 8, ["title", "onAction", "onClick"]))), 256)),
|
5328
5330
|
f.list.length ? j("", !0) : (u(), y(n(Me), {
|
5329
5331
|
key: 0,
|
@@ -5387,12 +5389,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5387
5389
|
name: "",
|
5388
5390
|
value: ""
|
5389
5391
|
}), a = (o) => t.current?.removeState(o.name), l = async (o, i) => {
|
5390
|
-
const { name: c, value:
|
5392
|
+
const { name: c, value: m } = o;
|
5391
5393
|
if (!i && t.current?.state[c])
|
5392
5394
|
return Ee(`名称 ${c} 已存在,请更换!`), !1;
|
5393
5395
|
const g = {
|
5394
5396
|
type: "JSExpression",
|
5395
|
-
value:
|
5397
|
+
value: m
|
5396
5398
|
};
|
5397
5399
|
return Qe(g, t.context, !0) ? (t.current?.setState(c, g), !0) : !1;
|
5398
5400
|
};
|
@@ -5419,12 +5421,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5419
5421
|
name: "",
|
5420
5422
|
value: "() => { }"
|
5421
5423
|
}), a = (o) => t.current?.removeFunction("computed", o.name), l = async (o, i) => {
|
5422
|
-
const { name: c, value:
|
5424
|
+
const { name: c, value: m } = o;
|
5423
5425
|
if (!i && t.current?.computed[c])
|
5424
5426
|
return Ee(`名称 ${c} 已存在,请更换!`), !1;
|
5425
5427
|
const g = {
|
5426
5428
|
type: "JSFunction",
|
5427
|
-
value:
|
5429
|
+
value: m
|
5428
5430
|
};
|
5429
5431
|
return Qe(g, t.context, !0) ? (t.current?.setFunction("computed", c, g), !0) : !1;
|
5430
5432
|
};
|
@@ -5451,12 +5453,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5451
5453
|
name: "",
|
5452
5454
|
value: "() => { }"
|
5453
5455
|
}), a = (o) => t.current?.removeFunction("methods", o.name), l = async (o, i) => {
|
5454
|
-
const { name: c, value:
|
5456
|
+
const { name: c, value: m } = o;
|
5455
5457
|
if (!i && t.current?.methods[c])
|
5456
5458
|
return Ee(`名称 ${c} 已存在,请更换!`), !1;
|
5457
5459
|
const g = {
|
5458
5460
|
type: "JSFunction",
|
5459
|
-
value:
|
5461
|
+
value: m
|
5460
5462
|
};
|
5461
5463
|
return Qe(g, t.context, !0) ? (t.current?.setFunction("methods", c, g), !0) : !1;
|
5462
5464
|
};
|
@@ -5480,25 +5482,25 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5480
5482
|
},
|
5481
5483
|
setup(r) {
|
5482
5484
|
const t = Ne(), e = r, s = x(() => {
|
5483
|
-
const { platform: c = "web", currentFile:
|
5485
|
+
const { platform: c = "web", currentFile: m } = t.project.value || {}, g = m?.type === "page";
|
5484
5486
|
return (c === "uniapp" ? g ? yc : wc : ui).map((v) => ({
|
5485
5487
|
label: v,
|
5486
5488
|
value: v
|
5487
5489
|
}));
|
5488
|
-
}), a = x(() => Object.entries(e.current?.lifeCycles || {}).map(([
|
5490
|
+
}), a = x(() => Object.entries(e.current?.lifeCycles || {}).map(([m, g]) => ({ name: m, value: yn(g) }))), l = () => ({
|
5489
5491
|
name: "",
|
5490
5492
|
value: "() => { }"
|
5491
|
-
}), o = (c) => e.current?.removeFunction("lifeCycles", c.name), i = async (c,
|
5492
|
-
const { name: g, value:
|
5493
|
-
if (!
|
5493
|
+
}), o = (c) => e.current?.removeFunction("lifeCycles", c.name), i = async (c, m) => {
|
5494
|
+
const { name: g, value: p } = c;
|
5495
|
+
if (!m && e.current?.lifeCycles[g])
|
5494
5496
|
return Ee(`名称 ${g} 已存在,请更换!`), !1;
|
5495
5497
|
const v = {
|
5496
5498
|
type: "JSFunction",
|
5497
|
-
value:
|
5499
|
+
value: p
|
5498
5500
|
};
|
5499
5501
|
return Qe(v, e.context, !0) ? (e.current?.setFunction("lifeCycles", g, v), !0) : !1;
|
5500
5502
|
};
|
5501
|
-
return (c,
|
5503
|
+
return (c, m) => (u(), y(Bn, {
|
5502
5504
|
title: "生命周期",
|
5503
5505
|
current: e.current,
|
5504
5506
|
context: e.context,
|
@@ -5509,10 +5511,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5509
5511
|
remove: o,
|
5510
5512
|
submit: i
|
5511
5513
|
}, {
|
5512
|
-
fields: b(({ model: g, nameLabel:
|
5514
|
+
fields: b(({ model: g, nameLabel: p, isEdit: v, valueLabel: h }) => [
|
5513
5515
|
d(n(J), {
|
5514
5516
|
name: "name",
|
5515
|
-
label:
|
5517
|
+
label: p,
|
5516
5518
|
editor: "select",
|
5517
5519
|
options: s.value,
|
5518
5520
|
required: "",
|
@@ -5556,21 +5558,21 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5556
5558
|
immediate: !1,
|
5557
5559
|
handler: "() => { }"
|
5558
5560
|
}), a = (i) => i.source, l = (i) => t.current?.removeWatch(i), o = async (i, c) => {
|
5559
|
-
const
|
5561
|
+
const m = {
|
5560
5562
|
type: "JSFunction",
|
5561
5563
|
value: i.source
|
5562
5564
|
}, g = {
|
5563
5565
|
type: "JSFunction",
|
5564
5566
|
value: i.handler
|
5565
5567
|
};
|
5566
|
-
if (!Qe(
|
5568
|
+
if (!Qe(m, t.context, !0) || !Qe(g, t.context, !0))
|
5567
5569
|
return !1;
|
5568
|
-
const
|
5570
|
+
const p = {
|
5569
5571
|
...i,
|
5570
|
-
source:
|
5572
|
+
source: m,
|
5571
5573
|
handler: g
|
5572
5574
|
};
|
5573
|
-
return t.current?.setWatch(
|
5575
|
+
return t.current?.setWatch(p), !0;
|
5574
5576
|
};
|
5575
5577
|
return (i, c) => (u(), y(Bn, {
|
5576
5578
|
title: "侦听器",
|
@@ -5585,7 +5587,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5585
5587
|
itemTitle: a,
|
5586
5588
|
grow: ""
|
5587
5589
|
}, {
|
5588
|
-
fields: b(({ model:
|
5590
|
+
fields: b(({ model: m, nameLabel: g, valueLabel: p }) => [
|
5589
5591
|
d(n(J), {
|
5590
5592
|
class: "v-binder__editor",
|
5591
5593
|
name: "source",
|
@@ -5596,8 +5598,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5596
5598
|
d(n(Oe), {
|
5597
5599
|
dark: "",
|
5598
5600
|
height: "100%",
|
5599
|
-
modelValue:
|
5600
|
-
"onUpdate:modelValue": (v) =>
|
5601
|
+
modelValue: m.source,
|
5602
|
+
"onUpdate:modelValue": (v) => m.source = v
|
5601
5603
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
5602
5604
|
]),
|
5603
5605
|
_: 2
|
@@ -5605,30 +5607,30 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5605
5607
|
d(n(J), {
|
5606
5608
|
class: "v-binder__editor",
|
5607
5609
|
name: "handler",
|
5608
|
-
label:
|
5610
|
+
label: p,
|
5609
5611
|
required: ""
|
5610
5612
|
}, {
|
5611
5613
|
editor: b(() => [
|
5612
5614
|
d(n(Oe), {
|
5613
5615
|
dark: "",
|
5614
5616
|
height: "100%",
|
5615
|
-
modelValue:
|
5616
|
-
"onUpdate:modelValue": (v) =>
|
5617
|
+
modelValue: m.handler,
|
5618
|
+
"onUpdate:modelValue": (v) => m.handler = v
|
5617
5619
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
5618
5620
|
]),
|
5619
5621
|
_: 2
|
5620
5622
|
}, 1032, ["label"]),
|
5621
5623
|
d(n(J), {
|
5622
5624
|
name: "deep",
|
5623
|
-
modelValue:
|
5624
|
-
"onUpdate:modelValue": (v) =>
|
5625
|
+
modelValue: m.deep,
|
5626
|
+
"onUpdate:modelValue": (v) => m.deep = v,
|
5625
5627
|
label: "深度监听",
|
5626
5628
|
editor: "switch"
|
5627
5629
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
5628
5630
|
d(n(J), {
|
5629
5631
|
name: "immediate",
|
5630
|
-
modelValue:
|
5631
|
-
"onUpdate:modelValue": (v) =>
|
5632
|
+
modelValue: m.immediate,
|
5633
|
+
"onUpdate:modelValue": (v) => m.immediate = v,
|
5632
5634
|
label: "立即执行",
|
5633
5635
|
editor: "switch"
|
5634
5636
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
@@ -5682,15 +5684,15 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5682
5684
|
},
|
5683
5685
|
emits: ["change", "remove"],
|
5684
5686
|
setup(r, { emit: t }) {
|
5685
|
-
const e = r, s = t, a = (c,
|
5686
|
-
s("change", c,
|
5687
|
+
const e = r, s = t, a = (c, m) => {
|
5688
|
+
s("change", c, m);
|
5687
5689
|
}, l = (c) => {
|
5688
5690
|
s("remove", c);
|
5689
5691
|
}, o = (c) => c ? c.replace(/[\u0391-\uFFE5]/g, "aa").length : 0, i = x(() => {
|
5690
|
-
const
|
5691
|
-
return
|
5692
|
+
const m = (e.items || []).map((g) => o(g.label || g.name)).sort((g, p) => p - g)[0];
|
5693
|
+
return m ? m * 6 + 24 : 100;
|
5692
5694
|
});
|
5693
|
-
return (c,
|
5695
|
+
return (c, m) => (u(), y(n(ge), {
|
5694
5696
|
title: e.title,
|
5695
5697
|
class: "v-sub-panel",
|
5696
5698
|
size: "small",
|
@@ -5702,11 +5704,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5702
5704
|
size: "small",
|
5703
5705
|
"label-position": "right",
|
5704
5706
|
"label-width": i.value,
|
5705
|
-
onKeydown:
|
5707
|
+
onKeydown: m[0] || (m[0] = Ct(at(() => {
|
5706
5708
|
}, ["prevent", "stop"]), ["enter"]))
|
5707
5709
|
}, {
|
5708
5710
|
default: b(() => [
|
5709
|
-
(u(!0), D(X, null, le(e.items, (g) => (u(), y(n(
|
5711
|
+
(u(!0), D(X, null, le(e.items, (g) => (u(), y(n(pe), Je({ ref_for: !0 }, g, {
|
5710
5712
|
key: `${g.name}_${e.node.id}`,
|
5711
5713
|
current: e.current,
|
5712
5714
|
context: e.context,
|
@@ -5731,16 +5733,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5731
5733
|
change: o,
|
5732
5734
|
componentProps: i,
|
5733
5735
|
customProps: c,
|
5734
|
-
addCustom:
|
5736
|
+
addCustom: m,
|
5735
5737
|
removeCustom: g,
|
5736
|
-
isExist:
|
5738
|
+
isExist: p
|
5737
5739
|
} = Kc(s), v = C(!1), h = C(), f = () => {
|
5738
5740
|
v.value = !0, h.value = {
|
5739
5741
|
name: ""
|
5740
5742
|
};
|
5741
5743
|
}, _ = async (E) => {
|
5742
5744
|
const k = Object.keys(a.value?.props || {});
|
5743
|
-
return !
|
5745
|
+
return !p(E.name) && !k.includes(E.name) ? (m(E.name), !0) : (Ee("已存在该属性名称"), !1);
|
5744
5746
|
}, w = async (E) => {
|
5745
5747
|
await $t("确定删除?") && g(E);
|
5746
5748
|
};
|
@@ -5906,7 +5908,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5906
5908
|
ref_key: "editorRef",
|
5907
5909
|
ref: e,
|
5908
5910
|
modelValue: a.handler.value,
|
5909
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
5911
|
+
"onUpdate:modelValue": c[0] || (c[0] = (m) => a.handler.value = m),
|
5910
5912
|
dark: "",
|
5911
5913
|
height: "100%"
|
5912
5914
|
}, null, 8, ["modelValue"])
|
@@ -5924,7 +5926,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5924
5926
|
const { current: t, context: e } = Xe(), { selected: s } = It(), { mouseEventList: a, keyboardEventList: l, componentEventList: o } = Xc(s), i = C({
|
5925
5927
|
name: "",
|
5926
5928
|
event: void 0
|
5927
|
-
}), c = C(!1),
|
5929
|
+
}), c = C(!1), m = (f) => {
|
5928
5930
|
i.value = On(f), c.value = !0;
|
5929
5931
|
}, g = async (f) => {
|
5930
5932
|
const _ = {
|
@@ -5932,14 +5934,14 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5932
5934
|
modifiers: f.modifiers.reduce((E, k) => (E[k] = !0, E), {})
|
5933
5935
|
};
|
5934
5936
|
return Qe(_.handler, e.value, !0) ? ((s.value?.model).setEvent(_), !0) : !1;
|
5935
|
-
},
|
5937
|
+
}, p = async (f) => {
|
5936
5938
|
const _ = s.value?.model;
|
5937
5939
|
f.name && (_.removeEvent(f.name), c.value = !1);
|
5938
5940
|
}, v = async () => {
|
5939
|
-
i.value.name && await $t("确定要删除该事件吗?") &&
|
5941
|
+
i.value.name && await $t("确定要删除该事件吗?") && p(i.value);
|
5940
5942
|
}, h = (f) => {
|
5941
5943
|
const { name: _, modelValue: w } = f;
|
5942
|
-
_ === "edit" &&
|
5944
|
+
_ === "edit" && m(w), _ === "remove" && p(w);
|
5943
5945
|
};
|
5944
5946
|
return (f, _) => (u(), y(n(fe), {
|
5945
5947
|
class: "v-events-widget",
|
@@ -5967,7 +5969,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5967
5969
|
small: "",
|
5968
5970
|
actions: w.event ? ["edit", "remove"] : ["edit"],
|
5969
5971
|
active: !!w.event,
|
5970
|
-
onClick: (E) =>
|
5972
|
+
onClick: (E) => m(w),
|
5971
5973
|
onAction: h
|
5972
5974
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
5973
5975
|
]),
|
@@ -5988,7 +5990,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5988
5990
|
small: "",
|
5989
5991
|
actions: w.event ? ["edit", "remove"] : ["edit"],
|
5990
5992
|
active: !!w.event,
|
5991
|
-
onClick: (E) =>
|
5993
|
+
onClick: (E) => m(w),
|
5992
5994
|
onAction: h
|
5993
5995
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
5994
5996
|
]),
|
@@ -6010,7 +6012,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6010
6012
|
small: "",
|
6011
6013
|
actions: w.event ? ["edit", "remove"] : ["edit"],
|
6012
6014
|
active: !!w.event,
|
6013
|
-
onClick: (E) =>
|
6015
|
+
onClick: (E) => m(w),
|
6014
6016
|
onAction: h
|
6015
6017
|
}, null, 8, ["title", "model-value", "actions", "active", "onClick"]))), 128))
|
6016
6018
|
]),
|
@@ -6073,9 +6075,9 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6073
6075
|
vElse: o,
|
6074
6076
|
vShow: i,
|
6075
6077
|
vBind: c,
|
6076
|
-
vFor:
|
6078
|
+
vFor: m,
|
6077
6079
|
vHtml: g,
|
6078
|
-
vModels:
|
6080
|
+
vModels: p,
|
6079
6081
|
customDirectives: v,
|
6080
6082
|
onValueChange: h,
|
6081
6083
|
onForChange: f,
|
@@ -6105,7 +6107,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6105
6107
|
}, ["prevent", "stop"]), ["enter"]))
|
6106
6108
|
}, {
|
6107
6109
|
default: b(() => [
|
6108
|
-
d(n(
|
6110
|
+
d(n(pe), {
|
6109
6111
|
name: "vIf",
|
6110
6112
|
label: "v-if",
|
6111
6113
|
setters: "ExpressionSetter",
|
@@ -6114,7 +6116,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6114
6116
|
value: n(a).value,
|
6115
6117
|
onChange: n(h)
|
6116
6118
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6117
|
-
n(A) ? (u(), y(n(
|
6119
|
+
n(A) ? (u(), y(n(pe), {
|
6118
6120
|
key: 0,
|
6119
6121
|
name: "vElseIf",
|
6120
6122
|
label: "v-else-if",
|
@@ -6124,7 +6126,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6124
6126
|
value: n(l).value,
|
6125
6127
|
onChange: n(h)
|
6126
6128
|
}, null, 8, ["current", "context", "value", "onChange"])) : j("", !0),
|
6127
|
-
n(A) ? (u(), y(n(
|
6129
|
+
n(A) ? (u(), y(n(pe), {
|
6128
6130
|
key: 1,
|
6129
6131
|
name: "vElse",
|
6130
6132
|
label: "v-else",
|
@@ -6134,7 +6136,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6134
6136
|
value: !!n(o).value,
|
6135
6137
|
onChange: n(h)
|
6136
6138
|
}, null, 8, ["current", "context", "value", "onChange"])) : j("", !0),
|
6137
|
-
d(n(
|
6139
|
+
d(n(pe), {
|
6138
6140
|
name: "vShow",
|
6139
6141
|
label: "v-show",
|
6140
6142
|
setters: "ExpressionSetter",
|
@@ -6143,7 +6145,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6143
6145
|
value: n(i).value,
|
6144
6146
|
onChange: n(h)
|
6145
6147
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6146
|
-
d(n(
|
6148
|
+
d(n(pe), {
|
6147
6149
|
name: "vBind",
|
6148
6150
|
label: "v-bind",
|
6149
6151
|
setters: "ExpressionSetter",
|
@@ -6152,7 +6154,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6152
6154
|
value: n(c).value,
|
6153
6155
|
onChange: n(h)
|
6154
6156
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6155
|
-
d(n(
|
6157
|
+
d(n(pe), {
|
6156
6158
|
name: "vHtml",
|
6157
6159
|
label: "v-html",
|
6158
6160
|
setters: "ExpressionSetter",
|
@@ -6181,16 +6183,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6181
6183
|
}, ["prevent", "stop"]), ["enter"]))
|
6182
6184
|
}, {
|
6183
6185
|
default: b(() => [
|
6184
|
-
d(n(
|
6186
|
+
d(n(pe), {
|
6185
6187
|
name: "value",
|
6186
6188
|
label: "循环数据",
|
6187
6189
|
setters: "ExpressionSetter",
|
6188
6190
|
current: n(t),
|
6189
6191
|
context: n(e),
|
6190
|
-
value: n(
|
6192
|
+
value: n(m).value,
|
6191
6193
|
onChange: n(f)
|
6192
6194
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6193
|
-
d(n(
|
6195
|
+
d(n(pe), {
|
6194
6196
|
name: "item",
|
6195
6197
|
label: "迭代变量名",
|
6196
6198
|
setters: {
|
@@ -6199,10 +6201,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6199
6201
|
},
|
6200
6202
|
current: n(t),
|
6201
6203
|
context: n(e),
|
6202
|
-
value: n(
|
6204
|
+
value: n(m).iterator?.item,
|
6203
6205
|
onChange: n(f)
|
6204
6206
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6205
|
-
d(n(
|
6207
|
+
d(n(pe), {
|
6206
6208
|
name: "index",
|
6207
6209
|
label: "索引变量名",
|
6208
6210
|
setters: {
|
@@ -6211,7 +6213,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6211
6213
|
},
|
6212
6214
|
current: n(t),
|
6213
6215
|
context: n(e),
|
6214
|
-
value: n(
|
6216
|
+
value: n(m).iterator?.index,
|
6215
6217
|
onChange: n(f)
|
6216
6218
|
}, null, 8, ["current", "context", "value", "onChange"])
|
6217
6219
|
]),
|
@@ -6227,7 +6229,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6227
6229
|
fit: !1
|
6228
6230
|
}, {
|
6229
6231
|
default: b(() => [
|
6230
|
-
(u(!0), D(X, null, le(n(
|
6232
|
+
(u(!0), D(X, null, le(n(p), (T, R) => (u(), y(n(ge), {
|
6231
6233
|
card: "",
|
6232
6234
|
border: "",
|
6233
6235
|
class: "v-sub-panel",
|
@@ -6244,7 +6246,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6244
6246
|
}, ["prevent", "stop"]), ["enter"]))
|
6245
6247
|
}, {
|
6246
6248
|
default: b(() => [
|
6247
|
-
d(n(
|
6249
|
+
d(n(pe), {
|
6248
6250
|
name: R.toString(),
|
6249
6251
|
label: "绑定变量",
|
6250
6252
|
setters: "ExpressionSetter",
|
@@ -6259,7 +6261,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6259
6261
|
]),
|
6260
6262
|
_: 2
|
6261
6263
|
}, 1032, ["title"]))), 256)),
|
6262
|
-
n(
|
6264
|
+
n(p).length ? j("", !0) : (u(), y(n(Me), {
|
6263
6265
|
key: 0,
|
6264
6266
|
description: "当前组件没有双向绑定属性",
|
6265
6267
|
"image-size": 50
|
@@ -6297,7 +6299,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6297
6299
|
}, ["prevent", "stop"]), ["enter"]))
|
6298
6300
|
}, {
|
6299
6301
|
default: b(() => [
|
6300
|
-
d(n(
|
6302
|
+
d(n(pe), {
|
6301
6303
|
name: "name",
|
6302
6304
|
label: "指令",
|
6303
6305
|
setters: "StringSetter",
|
@@ -6306,7 +6308,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6306
6308
|
value: T.name,
|
6307
6309
|
onChange: n(k)(T)
|
6308
6310
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6309
|
-
d(n(
|
6311
|
+
d(n(pe), {
|
6310
6312
|
name: "value",
|
6311
6313
|
label: "值",
|
6312
6314
|
setters: "ExpressionSetter",
|
@@ -6315,7 +6317,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6315
6317
|
value: T.value,
|
6316
6318
|
onChange: n(k)(T)
|
6317
6319
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6318
|
-
d(n(
|
6320
|
+
d(n(pe), {
|
6319
6321
|
name: "arg",
|
6320
6322
|
label: "参数",
|
6321
6323
|
setters: "StringSetter",
|
@@ -6324,7 +6326,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6324
6326
|
value: T.arg,
|
6325
6327
|
onChange: n(k)(T)
|
6326
6328
|
}, null, 8, ["current", "context", "value", "onChange"]),
|
6327
|
-
d(n(
|
6329
|
+
d(n(pe), {
|
6328
6330
|
name: "modifiers",
|
6329
6331
|
label: "修饰符",
|
6330
6332
|
setters: "ObjectSetter",
|
@@ -6599,7 +6601,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6599
6601
|
name: "DefinedWidget",
|
6600
6602
|
__name: "index",
|
6601
6603
|
setup(r) {
|
6602
|
-
const { current: t, context: e } = Xe(), s = x(() => (t.value?.props || []).map((K) => typeof K == "string" ? { name: K } : K)), a = x(() => (t.value?.emits || []).map((K) => typeof K == "string" ? { name: K, params: [] } : Object.assign({ params: [] }, K))), l = x(() => (t.value?.slots || []).map((K) => typeof K == "string" ? { name: K, params: [] } : Object.assign({ params: [] }, K))), o = x(() => t.value?.inject || []), i = C(!1), c = C(),
|
6604
|
+
const { current: t, context: e } = Xe(), s = x(() => (t.value?.props || []).map((K) => typeof K == "string" ? { name: K } : K)), a = x(() => (t.value?.emits || []).map((K) => typeof K == "string" ? { name: K, params: [] } : Object.assign({ params: [] }, K))), l = x(() => (t.value?.slots || []).map((K) => typeof K == "string" ? { name: K, params: [] } : Object.assign({ params: [] }, K))), o = x(() => t.value?.inject || []), i = C(!1), c = C(), m = C(!1), g = C(), p = C(!1), v = C(), h = C(!1), f = C(), _ = () => {
|
6603
6605
|
c.value = void 0, i.value = !0;
|
6604
6606
|
}, w = (K) => {
|
6605
6607
|
const { name: ne, modelValue: z } = K;
|
@@ -6607,16 +6609,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6607
6609
|
}, E = (K) => {
|
6608
6610
|
c.value = K, i.value = !0;
|
6609
6611
|
}, k = () => {
|
6610
|
-
g.value = void 0,
|
6612
|
+
g.value = void 0, m.value = !0;
|
6611
6613
|
}, A = (K) => {
|
6612
|
-
g.value = { ...K },
|
6614
|
+
g.value = { ...K }, m.value = !0;
|
6613
6615
|
}, V = (K) => {
|
6614
6616
|
const { name: ne, modelValue: z } = K;
|
6615
6617
|
ne === "edit" && A(z), ne === "remove" && t.value?.removeEmit(z.name);
|
6616
6618
|
}, N = () => {
|
6617
|
-
v.value = void 0,
|
6619
|
+
v.value = void 0, p.value = !0;
|
6618
6620
|
}, O = (K) => {
|
6619
|
-
v.value = { ...K },
|
6621
|
+
v.value = { ...K }, p.value = !0;
|
6620
6622
|
}, T = (K) => {
|
6621
6623
|
const { name: ne, modelValue: z } = K;
|
6622
6624
|
ne === "edit" && O(z), ne === "remove" && t.value?.removeSlot(z.name);
|
@@ -6688,10 +6690,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6688
6690
|
key: 0,
|
6689
6691
|
"image-size": 50
|
6690
6692
|
})),
|
6691
|
-
|
6693
|
+
m.value ? (u(), y(Hd, {
|
6692
6694
|
key: 1,
|
6693
|
-
modelValue:
|
6694
|
-
"onUpdate:modelValue": ne[1] || (ne[1] = (z) =>
|
6695
|
+
modelValue: m.value,
|
6696
|
+
"onUpdate:modelValue": ne[1] || (ne[1] = (z) => m.value = z),
|
6695
6697
|
current: n(t),
|
6696
6698
|
context: n(e),
|
6697
6699
|
item: g.value
|
@@ -6720,10 +6722,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6720
6722
|
key: 0,
|
6721
6723
|
"image-size": 50
|
6722
6724
|
})),
|
6723
|
-
|
6725
|
+
p.value ? (u(), y(Kd, {
|
6724
6726
|
key: 1,
|
6725
|
-
modelValue:
|
6726
|
-
"onUpdate:modelValue": ne[2] || (ne[2] = (z) =>
|
6727
|
+
modelValue: p.value,
|
6728
|
+
"onUpdate:modelValue": ne[2] || (ne[2] = (z) => p.value = z),
|
6727
6729
|
current: n(t),
|
6728
6730
|
context: n(e),
|
6729
6731
|
item: v.value
|
@@ -6824,7 +6826,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6824
6826
|
}`
|
6825
6827
|
}
|
6826
6828
|
}, On(t.item))
|
6827
|
-
),
|
6829
|
+
), m = C(!1), g = C(""), p = C(!1), v = x(() => c.value.type === "api" ? s.value.map((V) => ({
|
6828
6830
|
label: V.label || "",
|
6829
6831
|
value: V.id,
|
6830
6832
|
data: V
|
@@ -6888,7 +6890,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6888
6890
|
}, O = Rn(c.value.test, {
|
6889
6891
|
runApi: N
|
6890
6892
|
}), T = c.value.transform?.value ? Rn(c.value.transform, {}, !0) : (R) => R;
|
6891
|
-
|
6893
|
+
m.value = !0;
|
6892
6894
|
try {
|
6893
6895
|
o?.disableIntercept();
|
6894
6896
|
const R = await O();
|
@@ -6896,7 +6898,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6896
6898
|
} catch (R) {
|
6897
6899
|
Jt.error(R);
|
6898
6900
|
}
|
6899
|
-
|
6901
|
+
m.value = !1, p.value = !0;
|
6900
6902
|
};
|
6901
6903
|
return (V, N) => (u(), y(n(Bt), {
|
6902
6904
|
width: "1000px",
|
@@ -6908,7 +6910,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6908
6910
|
}, {
|
6909
6911
|
extra: b(() => [
|
6910
6912
|
d(n(ce), {
|
6911
|
-
loading:
|
6913
|
+
loading: m.value,
|
6912
6914
|
type: "warning",
|
6913
6915
|
onClick: A
|
6914
6916
|
}, {
|
@@ -7010,11 +7012,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7010
7012
|
]),
|
7011
7013
|
_: 1
|
7012
7014
|
}),
|
7013
|
-
|
7015
|
+
p.value ? (u(), y(n(Gs), {
|
7014
7016
|
key: 0,
|
7015
7017
|
class: "v-drawer",
|
7016
|
-
modelValue:
|
7017
|
-
"onUpdate:modelValue": N[3] || (N[3] = (O) =>
|
7018
|
+
modelValue: p.value,
|
7019
|
+
"onUpdate:modelValue": N[3] || (N[3] = (O) => p.value = O),
|
7018
7020
|
title: "测试用例运行结果",
|
7019
7021
|
direction: "btt",
|
7020
7022
|
"append-to-body": "",
|
@@ -7050,11 +7052,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7050
7052
|
a.value = void 0, s.value = !0;
|
7051
7053
|
}, c = (g) => {
|
7052
7054
|
a.value = g, s.value = !0;
|
7053
|
-
},
|
7054
|
-
const { name:
|
7055
|
-
|
7055
|
+
}, m = (g) => {
|
7056
|
+
const { name: p, modelValue: v } = g;
|
7057
|
+
p === "edit" && c(v), p === "remove" && t.value?.removeDataSource(v.name);
|
7056
7058
|
};
|
7057
|
-
return (g,
|
7059
|
+
return (g, p) => (u(), y(n(fe), {
|
7058
7060
|
class: "v-data-sources-widget",
|
7059
7061
|
direction: "column",
|
7060
7062
|
fit: ""
|
@@ -7076,7 +7078,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7076
7078
|
actions: ["edit", "remove"],
|
7077
7079
|
tag: v.type.toUpperCase(),
|
7078
7080
|
"tag-type": o(v.type),
|
7079
|
-
onAction:
|
7081
|
+
onAction: m,
|
7080
7082
|
onClick: (h) => c(v)
|
7081
7083
|
}, null, 8, ["title", "subtitle", "model-value", "tag", "tag-type", "onClick"]))), 256)),
|
7082
7084
|
l.value.length ? j("", !0) : (u(), y(n(Me), {
|
@@ -7089,7 +7091,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7089
7091
|
s.value ? (u(), y(Qd, {
|
7090
7092
|
key: 0,
|
7091
7093
|
modelValue: s.value,
|
7092
|
-
"onUpdate:modelValue":
|
7094
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => s.value = v),
|
7093
7095
|
current: n(t),
|
7094
7096
|
context: n(e),
|
7095
7097
|
item: a.value
|
@@ -7108,8 +7110,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7108
7110
|
const t = r, e = C();
|
7109
7111
|
te(
|
7110
7112
|
() => t.styleJson.display,
|
7111
|
-
(
|
7112
|
-
e.value =
|
7113
|
+
(g) => {
|
7114
|
+
e.value = g === "flex";
|
7113
7115
|
},
|
7114
7116
|
{ immediate: !0 }
|
7115
7117
|
);
|
@@ -7225,10 +7227,23 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7225
7227
|
value: "stretch",
|
7226
7228
|
svg: dr
|
7227
7229
|
}
|
7228
|
-
], c =
|
7229
|
-
|
7230
|
+
], c = [
|
7231
|
+
{
|
7232
|
+
label: "默认",
|
7233
|
+
value: "initial"
|
7234
|
+
},
|
7235
|
+
{
|
7236
|
+
label: "自动伸缩",
|
7237
|
+
value: "auto"
|
7238
|
+
},
|
7239
|
+
{
|
7240
|
+
label: "不伸缩",
|
7241
|
+
value: "none"
|
7242
|
+
}
|
7243
|
+
], m = (g, p) => {
|
7244
|
+
e.value = p === "flex", t.setStyle("display", p), e.value || (t.setStyle("flex-direction", void 0), t.setStyle("justify-content", void 0), t.setStyle("align-items", void 0), t.setStyle("flex-wrap", void 0));
|
7230
7245
|
};
|
7231
|
-
return (
|
7246
|
+
return (g, p) => (u(), y(n(ge), {
|
7232
7247
|
title: "布局",
|
7233
7248
|
class: "v-sub-panel",
|
7234
7249
|
size: "small",
|
@@ -7241,17 +7256,17 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7241
7256
|
"label-width": "80px"
|
7242
7257
|
}, {
|
7243
7258
|
default: b(() => [
|
7244
|
-
d(n(
|
7259
|
+
d(n(pe), {
|
7245
7260
|
name: "display",
|
7246
7261
|
label: "排布",
|
7247
7262
|
setters: { name: "TagSetter" },
|
7248
7263
|
options: s,
|
7249
7264
|
variable: !1,
|
7250
7265
|
value: t.styleJson.display,
|
7251
|
-
onChange:
|
7266
|
+
onChange: m
|
7252
7267
|
}, null, 8, ["value"]),
|
7253
7268
|
e.value ? (u(), D(X, { key: 0 }, [
|
7254
|
-
d(n(
|
7269
|
+
d(n(pe), {
|
7255
7270
|
name: "flex-direction",
|
7256
7271
|
label: "主轴方向",
|
7257
7272
|
setters: { name: "TagSetter" },
|
@@ -7260,7 +7275,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7260
7275
|
value: t.styleJson["flex-direction"],
|
7261
7276
|
onChange: t.setStyle
|
7262
7277
|
}, null, 8, ["value", "onChange"]),
|
7263
|
-
d(n(
|
7278
|
+
d(n(pe), {
|
7264
7279
|
name: "justify-content",
|
7265
7280
|
label: "主轴对齐",
|
7266
7281
|
setters: { name: "TagSetter" },
|
@@ -7269,7 +7284,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7269
7284
|
value: t.styleJson["justify-content"],
|
7270
7285
|
onChange: t.setStyle
|
7271
7286
|
}, null, 8, ["value", "onChange"]),
|
7272
|
-
d(n(
|
7287
|
+
d(n(pe), {
|
7273
7288
|
name: "align-items",
|
7274
7289
|
label: "辅轴对齐",
|
7275
7290
|
setters: { name: "TagSetter" },
|
@@ -7278,7 +7293,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7278
7293
|
value: t.styleJson["align-items"],
|
7279
7294
|
onChange: t.setStyle
|
7280
7295
|
}, null, 8, ["value", "onChange"]),
|
7281
|
-
d(n(
|
7296
|
+
d(n(pe), {
|
7282
7297
|
name: "flex-wrap",
|
7283
7298
|
label: "换行模式",
|
7284
7299
|
setters: { name: "TagSetter" },
|
@@ -7287,7 +7302,25 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7287
7302
|
value: t.styleJson["flex-wrap"],
|
7288
7303
|
onChange: t.setStyle
|
7289
7304
|
}, null, 8, ["value", "onChange"])
|
7290
|
-
], 64)) : j("", !0)
|
7305
|
+
], 64)) : j("", !0),
|
7306
|
+
d(n(pe), {
|
7307
|
+
name: "flex",
|
7308
|
+
label: "flex",
|
7309
|
+
setters: { name: "TagSetter" },
|
7310
|
+
options: c,
|
7311
|
+
variable: !1,
|
7312
|
+
value: t.styleJson.flex,
|
7313
|
+
onChange: t.setStyle
|
7314
|
+
}, null, 8, ["value", "onChange"]),
|
7315
|
+
d(n(pe), {
|
7316
|
+
name: "align-self",
|
7317
|
+
label: "align-self",
|
7318
|
+
setters: { name: "TagSetter" },
|
7319
|
+
options: i,
|
7320
|
+
variable: !1,
|
7321
|
+
value: t.styleJson["align-self"],
|
7322
|
+
onChange: t.setStyle
|
7323
|
+
}, null, 8, ["value", "onChange"])
|
7291
7324
|
]),
|
7292
7325
|
_: 1
|
7293
7326
|
})
|
@@ -7304,16 +7337,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7304
7337
|
return Pe(c) ? null : c;
|
7305
7338
|
}), a = x(() => s.value?.getPropValue("style") || {}), l = x(() => un(a.value) ? JSON.stringify({}) : JSON.stringify(zs(a.value), null, 2)), o = (c) => {
|
7306
7339
|
try {
|
7307
|
-
const
|
7308
|
-
s.value?.setProp("style",
|
7340
|
+
const m = zs(JSON.parse(c));
|
7341
|
+
s.value?.setProp("style", m);
|
7309
7342
|
} catch {
|
7310
7343
|
Ee("JSON格式错误");
|
7311
7344
|
}
|
7312
7345
|
}, i = () => {
|
7313
|
-
const
|
7314
|
-
o(
|
7346
|
+
const m = (e.value?.getEditor()).getValue();
|
7347
|
+
o(m), De("保存成功");
|
7315
7348
|
};
|
7316
|
-
return (c,
|
7349
|
+
return (c, m) => (u(), y(n(fe), {
|
7317
7350
|
direction: "column",
|
7318
7351
|
fit: ""
|
7319
7352
|
}, {
|
@@ -7357,11 +7390,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7357
7390
|
mu(o, () => {
|
7358
7391
|
a("close");
|
7359
7392
|
});
|
7360
|
-
const
|
7393
|
+
const m = (h) => {
|
7361
7394
|
i.value = typeof h == "number" ? `${h}px` : "auto", g(i.value);
|
7362
7395
|
}, g = (h) => {
|
7363
7396
|
c.value = h === "auto" ? void 0 : "px";
|
7364
|
-
},
|
7397
|
+
}, p = () => {
|
7365
7398
|
i.value ? (a("update:modelValue", i.value), a("submit", s.name, i.value), a("close")) : Ee("请输入有效值", "提示");
|
7366
7399
|
}, v = () => {
|
7367
7400
|
i.value = void 0, a("update:modelValue", i.value), a("submit", s.name, void 0), a("close");
|
@@ -7399,7 +7432,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7399
7432
|
}, {
|
7400
7433
|
default: b(() => [
|
7401
7434
|
I("span", {
|
7402
|
-
onClick: f[1] || (f[1] = (_) =>
|
7435
|
+
onClick: f[1] || (f[1] = (_) => m("auto"))
|
7403
7436
|
}, "auto")
|
7404
7437
|
]),
|
7405
7438
|
_: 1
|
@@ -7412,7 +7445,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7412
7445
|
}, {
|
7413
7446
|
default: b(() => [
|
7414
7447
|
(u(), D(X, null, le(e, (_) => I("span", {
|
7415
|
-
onClick: (w) =>
|
7448
|
+
onClick: (w) => m(_)
|
7416
7449
|
}, ae(_), 9, np)), 64))
|
7417
7450
|
]),
|
7418
7451
|
_: 1
|
@@ -7427,7 +7460,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7427
7460
|
type: "primary",
|
7428
7461
|
round: "",
|
7429
7462
|
style: { width: "100%" },
|
7430
|
-
onClick:
|
7463
|
+
onClick: p
|
7431
7464
|
}, {
|
7432
7465
|
default: b(() => f[2] || (f[2] = [
|
7433
7466
|
Q(" 确定 ")
|
@@ -7473,10 +7506,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7473
7506
|
setStyle: { type: Function }
|
7474
7507
|
},
|
7475
7508
|
setup(r) {
|
7476
|
-
const t = r, e = C(), s = C(), { width: a, height: l } = wn(e), { width: o, height: i } = wn(s), c = C(!1),
|
7477
|
-
c.value = !1,
|
7509
|
+
const t = r, e = C(), s = C(), { width: a, height: l } = wn(e), { width: o, height: i } = wn(s), c = C(!1), m = C(), g = C(), p = () => {
|
7510
|
+
c.value = !1, m.value = void 0, g.value = void 0;
|
7478
7511
|
}, v = (h) => {
|
7479
|
-
|
7512
|
+
m.value = h, g.value = t.styleJson[h], c.value = !0;
|
7480
7513
|
};
|
7481
7514
|
return (h, f) => (u(), y(n(ge), {
|
7482
7515
|
title: "间距",
|
@@ -7813,10 +7846,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7813
7846
|
]),
|
7814
7847
|
c.value ? (u(), y(No, {
|
7815
7848
|
key: 0,
|
7816
|
-
name:
|
7849
|
+
name: m.value,
|
7817
7850
|
modelValue: g.value,
|
7818
7851
|
"onUpdate:modelValue": f[16] || (f[16] = (_) => g.value = _),
|
7819
|
-
onClose:
|
7852
|
+
onClose: p,
|
7820
7853
|
onSubmit: t.setStyle
|
7821
7854
|
}, null, 8, ["name", "modelValue", "onSubmit"])) : j("", !0)
|
7822
7855
|
], 512)
|
@@ -7901,7 +7934,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7901
7934
|
inline: ""
|
7902
7935
|
}, {
|
7903
7936
|
default: b(() => [
|
7904
|
-
(u(), D(X, null, le(a, (i) => d(n(
|
7937
|
+
(u(), D(X, null, le(a, (i) => d(n(pe), {
|
7905
7938
|
name: i.name,
|
7906
7939
|
label: i.label,
|
7907
7940
|
setters: { name: i.setter },
|
@@ -7930,7 +7963,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7930
7963
|
{ label: "绝对", value: "absolute" },
|
7931
7964
|
{ label: "固定", value: "fixed" },
|
7932
7965
|
{ label: "粘性", value: "sticky" }
|
7933
|
-
],
|
7966
|
+
], m = [
|
7934
7967
|
{ label: "左上", svg: pr, value: "0% auto auto 0%" },
|
7935
7968
|
{ label: "右上", svg: mr, value: "0% 0% auto auto" },
|
7936
7969
|
{ label: "左下", svg: vr, value: "auto auto 0% 0%" },
|
@@ -7940,7 +7973,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7940
7973
|
{ label: "上", svg: br, value: "auto 0% 0% 0%" },
|
7941
7974
|
{ label: "下", svg: yr, value: "0% 0% auto 0%" },
|
7942
7975
|
{ label: "填充", svg: wr, value: "0% 0% 0% 0%" }
|
7943
|
-
], g = x(() => (t.styleJson.inset || "").split(" ")),
|
7976
|
+
], g = x(() => (t.styleJson.inset || "").split(" ")), p = (h) => {
|
7944
7977
|
o.value = h, i.value = t.styleJson[h], l.value = !0;
|
7945
7978
|
}, v = () => {
|
7946
7979
|
l.value = !1, o.value = void 0, i.value = void 0;
|
@@ -7959,7 +7992,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7959
7992
|
size: "small"
|
7960
7993
|
}, {
|
7961
7994
|
default: b(() => [
|
7962
|
-
d(n(
|
7995
|
+
d(n(pe), {
|
7963
7996
|
name: "position",
|
7964
7997
|
label: "定位",
|
7965
7998
|
setters: { name: "SelectSetter" },
|
@@ -7968,11 +8001,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7968
8001
|
value: t.styleJson.position,
|
7969
8002
|
onChange: t.setStyle
|
7970
8003
|
}, null, 8, ["value", "onChange"]),
|
7971
|
-
d(n(
|
8004
|
+
d(n(pe), {
|
7972
8005
|
name: "inset",
|
7973
8006
|
label: " ",
|
7974
8007
|
setters: { name: "TagSetter" },
|
7975
|
-
options:
|
8008
|
+
options: m,
|
7976
8009
|
variable: !1,
|
7977
8010
|
value: t.styleJson.inset,
|
7978
8011
|
onChange: t.setStyle
|
@@ -8006,7 +8039,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8006
8039
|
"data-automation-id": "padding-top-button",
|
8007
8040
|
"aria-label": "Padding top button",
|
8008
8041
|
class: "tb-path-color",
|
8009
|
-
onClick: f[0] || (f[0] = (_) =>
|
8042
|
+
onClick: f[0] || (f[0] = (_) => p("top"))
|
8010
8043
|
}, null, 8, Op)
|
8011
8044
|
])
|
8012
8045
|
]),
|
@@ -8024,7 +8057,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8024
8057
|
"data-automation-id": "padding-right-button",
|
8025
8058
|
"aria-label": "Padding right button",
|
8026
8059
|
class: "lr-path-color",
|
8027
|
-
onClick: f[1] || (f[1] = (_) =>
|
8060
|
+
onClick: f[1] || (f[1] = (_) => p("right"))
|
8028
8061
|
}, null, 8, Bp)
|
8029
8062
|
])
|
8030
8063
|
]),
|
@@ -8042,7 +8075,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8042
8075
|
"data-automation-id": "padding-bottom-button",
|
8043
8076
|
"aria-label": "Padding bottom button",
|
8044
8077
|
class: "tb-path-color",
|
8045
|
-
onClick: f[2] || (f[2] = (_) =>
|
8078
|
+
onClick: f[2] || (f[2] = (_) => p("bottom"))
|
8046
8079
|
}, null, 8, Np)
|
8047
8080
|
])
|
8048
8081
|
]),
|
@@ -8060,7 +8093,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8060
8093
|
"data-automation-id": "padding-left-button",
|
8061
8094
|
"aria-label": "Padding left button",
|
8062
8095
|
class: "lr-path-color",
|
8063
|
-
onClick: f[3] || (f[3] = (_) =>
|
8096
|
+
onClick: f[3] || (f[3] = (_) => p("left"))
|
8064
8097
|
}, null, 8, Pp)
|
8065
8098
|
])
|
8066
8099
|
]),
|
@@ -8115,19 +8148,19 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8115
8148
|
], 8, Dp)) : j("", !0),
|
8116
8149
|
I("div", {
|
8117
8150
|
class: be(["spacing-edit padding-top", { "is-setting": t.styleJson.top }]),
|
8118
|
-
onClick: f[4] || (f[4] = (_) =>
|
8151
|
+
onClick: f[4] || (f[4] = (_) => p("top"))
|
8119
8152
|
}, ae(t.styleJson.top || g.value[0] || "-"), 3),
|
8120
8153
|
I("div", {
|
8121
8154
|
class: be(["spacing-edit padding-right", { "is-setting": t.styleJson.right }]),
|
8122
|
-
onClick: f[5] || (f[5] = (_) =>
|
8155
|
+
onClick: f[5] || (f[5] = (_) => p("right"))
|
8123
8156
|
}, ae(t.styleJson.right || g.value[1] || "-"), 3),
|
8124
8157
|
I("div", {
|
8125
8158
|
class: be(["spacing-edit padding-bottom", { "is-setting": t.styleJson.bottom }]),
|
8126
|
-
onClick: f[6] || (f[6] = (_) =>
|
8159
|
+
onClick: f[6] || (f[6] = (_) => p("bottom"))
|
8127
8160
|
}, ae(t.styleJson.bottom || g.value[2] || "-"), 3),
|
8128
8161
|
I("div", {
|
8129
8162
|
class: be(["spacing-edit padding-left", { "is-setting": t.styleJson.left }]),
|
8130
|
-
onClick: f[7] || (f[7] = (_) =>
|
8163
|
+
onClick: f[7] || (f[7] = (_) => p("left"))
|
8131
8164
|
}, ae(t.styleJson.left || g.value[3] || "-"), 3)
|
8132
8165
|
], 512),
|
8133
8166
|
l.value ? (u(), y(No, {
|
@@ -8143,7 +8176,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8143
8176
|
]),
|
8144
8177
|
_: 1
|
8145
8178
|
}),
|
8146
|
-
d(n(
|
8179
|
+
d(n(pe), {
|
8147
8180
|
name: "z-index",
|
8148
8181
|
label: "层级",
|
8149
8182
|
setters: { name: "NumberSetter" },
|
@@ -8243,7 +8276,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8243
8276
|
inline: ""
|
8244
8277
|
}, {
|
8245
8278
|
default: b(() => [
|
8246
|
-
(u(), D(X, null, le(e, (c) => d(n(
|
8279
|
+
(u(), D(X, null, le(e, (c) => d(n(pe), {
|
8247
8280
|
name: c.name,
|
8248
8281
|
label: c.label,
|
8249
8282
|
setters: { name: c.setter },
|
@@ -8260,7 +8293,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8260
8293
|
"label-width": "60px"
|
8261
8294
|
}, {
|
8262
8295
|
default: b(() => [
|
8263
|
-
d(n(
|
8296
|
+
d(n(pe), {
|
8264
8297
|
name: "color",
|
8265
8298
|
label: "颜色",
|
8266
8299
|
setters: { name: "ColorSetter" },
|
@@ -8268,7 +8301,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8268
8301
|
value: t.styleJson.color,
|
8269
8302
|
onChange: o.setStyle
|
8270
8303
|
}, null, 8, ["value", "onChange"]),
|
8271
|
-
d(n(
|
8304
|
+
d(n(pe), {
|
8272
8305
|
name: "text-align",
|
8273
8306
|
label: "对齐",
|
8274
8307
|
setters: { name: "TagSetter" },
|
@@ -8277,7 +8310,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8277
8310
|
value: t.styleJson["text-align"],
|
8278
8311
|
onChange: o.setStyle
|
8279
8312
|
}, null, 8, ["value", "onChange"]),
|
8280
|
-
d(n(
|
8313
|
+
d(n(pe), {
|
8281
8314
|
name: "font-style",
|
8282
8315
|
label: "风格",
|
8283
8316
|
setters: { name: "TagSetter" },
|
@@ -8286,7 +8319,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8286
8319
|
value: t.styleJson["font-style"],
|
8287
8320
|
onChange: o.setStyle
|
8288
8321
|
}, null, 8, ["value", "onChange"]),
|
8289
|
-
d(n(
|
8322
|
+
d(n(pe), {
|
8290
8323
|
name: "text-decoration",
|
8291
8324
|
label: "修饰",
|
8292
8325
|
setters: { name: "TagSetter" },
|
@@ -8309,11 +8342,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8309
8342
|
setStyle: { type: Function }
|
8310
8343
|
},
|
8311
8344
|
setup(r) {
|
8312
|
-
const t = r, e = (c,
|
8313
|
-
|
8345
|
+
const t = r, e = (c, m) => {
|
8346
|
+
m ? t.setStyle("background-image", `url(${m})`) : t.setStyle("background-image", void 0);
|
8314
8347
|
}, s = (c) => {
|
8315
|
-
const
|
8316
|
-
return c?.match(
|
8348
|
+
const m = /^url\(([\w\W]+)\)$/;
|
8349
|
+
return c?.match(m)?.[1];
|
8317
8350
|
}, a = [
|
8318
8351
|
{ label: "重复", value: "repeat", svg: Tr },
|
8319
8352
|
{ label: "水平重复", value: "repeat-x", svg: Rr },
|
@@ -8333,7 +8366,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8333
8366
|
{ label: "覆盖", value: "cover" },
|
8334
8367
|
{ label: "填充", value: "contain" }
|
8335
8368
|
];
|
8336
|
-
return (c,
|
8369
|
+
return (c, m) => (u(), y(n(ge), {
|
8337
8370
|
title: "背景",
|
8338
8371
|
class: "v-sub-panel",
|
8339
8372
|
size: "small",
|
@@ -8346,7 +8379,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8346
8379
|
size: "small"
|
8347
8380
|
}, {
|
8348
8381
|
default: b(() => [
|
8349
|
-
d(n(
|
8382
|
+
d(n(pe), {
|
8350
8383
|
name: "background-image",
|
8351
8384
|
label: "图片",
|
8352
8385
|
setters: { name: "ImageSetter" },
|
@@ -8354,7 +8387,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8354
8387
|
value: s(t.styleJson["background-image"]),
|
8355
8388
|
onChange: e
|
8356
8389
|
}, null, 8, ["value"]),
|
8357
|
-
d(n(
|
8390
|
+
d(n(pe), {
|
8358
8391
|
name: "background-color",
|
8359
8392
|
label: "颜色",
|
8360
8393
|
setters: { name: "ColorSetter" },
|
@@ -8362,7 +8395,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8362
8395
|
value: t.styleJson["background-color"],
|
8363
8396
|
onChange: t.setStyle
|
8364
8397
|
}, null, 8, ["value", "onChange"]),
|
8365
|
-
d(n(
|
8398
|
+
d(n(pe), {
|
8366
8399
|
name: "background-repeat",
|
8367
8400
|
label: "重复",
|
8368
8401
|
setters: { name: "TagSetter" },
|
@@ -8371,7 +8404,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8371
8404
|
options: a,
|
8372
8405
|
onChange: t.setStyle
|
8373
8406
|
}, null, 8, ["value", "onChange"]),
|
8374
|
-
d(n(
|
8407
|
+
d(n(pe), {
|
8375
8408
|
name: "background-attachment",
|
8376
8409
|
label: "固定",
|
8377
8410
|
setters: { name: "RadioSetter" },
|
@@ -8380,7 +8413,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8380
8413
|
options: l,
|
8381
8414
|
onChange: t.setStyle
|
8382
8415
|
}, null, 8, ["value", "onChange"]),
|
8383
|
-
d(n(
|
8416
|
+
d(n(pe), {
|
8384
8417
|
name: "background-position",
|
8385
8418
|
label: "位置",
|
8386
8419
|
setters: { name: "SectionSetter", props: { sections: 2 } },
|
@@ -8388,7 +8421,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8388
8421
|
value: t.styleJson["background-position"],
|
8389
8422
|
onChange: t.setStyle
|
8390
8423
|
}, null, 8, ["value", "onChange"]),
|
8391
|
-
d(n(
|
8424
|
+
d(n(pe), {
|
8392
8425
|
name: "background-size",
|
8393
8426
|
label: "大小",
|
8394
8427
|
setters: { name: "SelectSetter" },
|
@@ -8397,7 +8430,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8397
8430
|
options: i,
|
8398
8431
|
onChange: t.setStyle
|
8399
8432
|
}, null, 8, ["value", "onChange"]),
|
8400
|
-
d(n(
|
8433
|
+
d(n(pe), {
|
8401
8434
|
name: "background-clip",
|
8402
8435
|
label: "裁剪",
|
8403
8436
|
setters: { name: "SelectSetter" },
|
@@ -8458,7 +8491,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8458
8491
|
size: "small"
|
8459
8492
|
}, {
|
8460
8493
|
default: b(() => [
|
8461
|
-
d(n(
|
8494
|
+
d(n(pe), {
|
8462
8495
|
name: "border-radius",
|
8463
8496
|
label: "圆角",
|
8464
8497
|
setters: { name: "SectionSetter", props: { sections: 4 } },
|
@@ -8466,7 +8499,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8466
8499
|
value: t.styleJson["border-radius"],
|
8467
8500
|
onChange: t.setStyle
|
8468
8501
|
}, null, 8, ["value", "onChange"]),
|
8469
|
-
d(n(
|
8502
|
+
d(n(pe), {
|
8470
8503
|
name: "borders",
|
8471
8504
|
label: "边框",
|
8472
8505
|
setters: { name: "TagSetter" },
|
@@ -8476,7 +8509,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8476
8509
|
onChange: o
|
8477
8510
|
}, null, 8, ["value"]),
|
8478
8511
|
s.value ? (u(), D(X, { key: 0 }, [
|
8479
|
-
(u(), y(n(
|
8512
|
+
(u(), y(n(pe), {
|
8480
8513
|
name: `${s.value}-width`,
|
8481
8514
|
key: `${s.value}-width`,
|
8482
8515
|
label: "宽度",
|
@@ -8485,7 +8518,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8485
8518
|
value: t.styleJson[`${s.value}-width`],
|
8486
8519
|
onChange: t.setStyle
|
8487
8520
|
}, null, 8, ["name", "value", "onChange"])),
|
8488
|
-
(u(), y(n(
|
8521
|
+
(u(), y(n(pe), {
|
8489
8522
|
name: `${s.value}-style`,
|
8490
8523
|
key: `${s.value}-style`,
|
8491
8524
|
label: "样式",
|
@@ -8495,7 +8528,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8495
8528
|
value: t.styleJson[`${s.value}-style`],
|
8496
8529
|
onChange: t.setStyle
|
8497
8530
|
}, null, 8, ["name", "value", "onChange"])),
|
8498
|
-
(u(), y(n(
|
8531
|
+
(u(), y(n(pe), {
|
8499
8532
|
name: `${s.value}-color`,
|
8500
8533
|
key: `${s.value}-color`,
|
8501
8534
|
label: "颜色",
|
@@ -8576,7 +8609,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8576
8609
|
size: "small"
|
8577
8610
|
}, {
|
8578
8611
|
default: b(() => [
|
8579
|
-
d(n(
|
8612
|
+
d(n(pe), {
|
8580
8613
|
name: "opacity",
|
8581
8614
|
label: "透明度",
|
8582
8615
|
setters: {
|
@@ -8586,7 +8619,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8586
8619
|
value: l(),
|
8587
8620
|
onChange: a
|
8588
8621
|
}, null, 8, ["value"]),
|
8589
|
-
d(n(
|
8622
|
+
d(n(pe), {
|
8590
8623
|
name: "box-shadow",
|
8591
8624
|
label: "阴影",
|
8592
8625
|
setters: { name: "SelectSetter" },
|
@@ -8595,7 +8628,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8595
8628
|
value: t.styleJson["box-shadow"],
|
8596
8629
|
onChange: t.setStyle
|
8597
8630
|
}, null, 8, ["value", "onChange"]),
|
8598
|
-
d(n(
|
8631
|
+
d(n(pe), {
|
8599
8632
|
name: "cursor",
|
8600
8633
|
label: "光标",
|
8601
8634
|
setters: { name: "TagSetter" },
|
@@ -8624,11 +8657,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8624
8657
|
const t = r, { selected: e } = It(), s = x(() => {
|
8625
8658
|
const c = e.value?.model || null;
|
8626
8659
|
return Pe(c) ? null : c;
|
8627
|
-
}), a = x(() => s.value?.getPropValue("style") || {}), l = x(() => zs(a.value)), o = x(() => un(a.value)), i = (c,
|
8660
|
+
}), a = x(() => s.value?.getPropValue("style") || {}), l = x(() => zs(a.value)), o = x(() => un(a.value)), i = (c, m) => {
|
8628
8661
|
const g = s.value?.getPropValue("style") || {};
|
8629
|
-
|
8662
|
+
m !== void 0 && m !== "" ? g[c] = m : delete g[c], s.value?.setProp("style", g);
|
8630
8663
|
};
|
8631
|
-
return (c,
|
8664
|
+
return (c, m) => (u(), y(n(fe), {
|
8632
8665
|
class: "v-style-widget__wrapper",
|
8633
8666
|
direction: "column",
|
8634
8667
|
fit: "",
|
@@ -8704,7 +8737,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8704
8737
|
path: { type: Function }
|
8705
8738
|
},
|
8706
8739
|
setup(r, { expose: t }) {
|
8707
|
-
const e = r, s = C(), a = C(Symbol()), { current: l, engine: o } = Xe(), { width: i, height: c } = wn(s),
|
8740
|
+
const e = r, s = C(), a = C(Symbol()), { current: l, engine: o } = Xe(), { width: i, height: c } = wn(s), m = x(() => l.value && e.path ? e.path(l.value, o.project.value) : null), g = x(() => o.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc");
|
8708
8741
|
return t({
|
8709
8742
|
refresh: () => {
|
8710
8743
|
a.value = Symbol();
|
@@ -8721,11 +8754,11 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8721
8754
|
height: n(c)
|
8722
8755
|
}, {
|
8723
8756
|
default: b(() => [
|
8724
|
-
|
8757
|
+
m.value ? (u(), D("iframe", {
|
8725
8758
|
key: 0,
|
8726
8759
|
ref: "iframe",
|
8727
8760
|
frameborder: "0",
|
8728
|
-
src:
|
8761
|
+
src: m.value
|
8729
8762
|
}, null, 8, Xp)) : j("", !0)
|
8730
8763
|
]),
|
8731
8764
|
_: 1
|
@@ -8749,8 +8782,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8749
8782
|
}, {
|
8750
8783
|
default: b(() => [
|
8751
8784
|
(u(!0), D(X, null, le(s.value, (c) => (u(), y(n(xl), {
|
8752
|
-
onClick: (
|
8753
|
-
onMouseover: (
|
8785
|
+
onClick: (m) => a(c),
|
8786
|
+
onMouseover: (m) => l(c)
|
8754
8787
|
}, {
|
8755
8788
|
default: b(() => [
|
8756
8789
|
Q(ae(c.name), 1)
|
@@ -8773,10 +8806,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8773
8806
|
"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"
|
8774
8807
|
))
|
8775
8808
|
try {
|
8776
|
-
const
|
8777
|
-
t.value?.update(
|
8778
|
-
} catch (
|
8779
|
-
Ee(
|
8809
|
+
const m = JSON.parse(i);
|
8810
|
+
t.value?.update(m), De("保存成功");
|
8811
|
+
} catch (m) {
|
8812
|
+
Ee(m?.message);
|
8780
8813
|
}
|
8781
8814
|
};
|
8782
8815
|
return (o, i) => (u(), y(n(ge), {
|
@@ -8806,16 +8839,16 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8806
8839
|
__name: "index",
|
8807
8840
|
setup(r) {
|
8808
8841
|
const { current: t, engine: e } = Xe(), s = C(), a = C(""), l = x(() => t.value ? `$vtj/vue/${t.value.id}.vue` : ""), o = x(() => t.value ? t.value.name : ""), i = async () => {
|
8809
|
-
const
|
8810
|
-
if (
|
8842
|
+
const m = (s.value?.getEditor()).getValue();
|
8843
|
+
if (m) {
|
8811
8844
|
const g = await $t(
|
8812
8845
|
"手动修改源码有风险,可能导致页面无法加载,请确认您的操作无误。"
|
8813
|
-
),
|
8814
|
-
if (g && t.value &&
|
8815
|
-
const { id: v, name: h } = t.value, f = await e.service.parseVue(
|
8846
|
+
), p = e.project.value?.toDsl();
|
8847
|
+
if (g && t.value && p) {
|
8848
|
+
const { id: v, name: h } = t.value, f = await e.service.parseVue(p, {
|
8816
8849
|
id: v,
|
8817
8850
|
name: h,
|
8818
|
-
source:
|
8851
|
+
source: m
|
8819
8852
|
}).catch((_) => (Ee(_?.message), null));
|
8820
8853
|
f && (Array.isArray(f) ? Ee(f.join(","), "提示") : (t.value?.update(f), De("保存成功")));
|
8821
8854
|
}
|
@@ -8824,9 +8857,9 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8824
8857
|
return te(
|
8825
8858
|
t,
|
8826
8859
|
async (c) => {
|
8827
|
-
const
|
8828
|
-
|
8829
|
-
|
8860
|
+
const m = e.project.value;
|
8861
|
+
m && c ? a.value = await e.service.genVueContent(
|
8862
|
+
m.toDsl(),
|
8830
8863
|
c.toDsl()
|
8831
8864
|
) : a.value = "";
|
8832
8865
|
},
|
@@ -8834,7 +8867,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8834
8867
|
immediate: !0,
|
8835
8868
|
deep: !0
|
8836
8869
|
}
|
8837
|
-
), (c,
|
8870
|
+
), (c, m) => (u(), y(n(ge), {
|
8838
8871
|
class: "v-raw-widget",
|
8839
8872
|
title: o.value,
|
8840
8873
|
subtitle: l.value,
|
@@ -8880,12 +8913,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8880
8913
|
dn(() => {
|
8881
8914
|
l || (l = Al.service({ target: a.value?.$el }));
|
8882
8915
|
}), $s(() => {
|
8883
|
-
|
8916
|
+
m(), l = null;
|
8884
8917
|
});
|
8885
|
-
const
|
8918
|
+
const m = () => {
|
8886
8919
|
l?.close();
|
8887
8920
|
};
|
8888
|
-
return t({ refresh: i, reload: c }), (g,
|
8921
|
+
return t({ refresh: i, reload: c }), (g, p) => (u(), y(n(ge), {
|
8889
8922
|
class: "v-docs-widget",
|
8890
8923
|
size: "small",
|
8891
8924
|
fit: "",
|
@@ -8899,7 +8932,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8899
8932
|
key: o.value,
|
8900
8933
|
ref: "frame",
|
8901
8934
|
src: s.value,
|
8902
|
-
onLoad:
|
8935
|
+
onLoad: m
|
8903
8936
|
}, null, 40, nm))
|
8904
8937
|
]),
|
8905
8938
|
_: 1
|
@@ -8918,12 +8951,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8918
8951
|
},
|
8919
8952
|
setup(r) {
|
8920
8953
|
const t = r, e = t.engine, { access: s } = e || {}, { latest: a } = Ro(), l = x(() => {
|
8921
|
-
const g = s?.getData()?.avatar || "",
|
8922
|
-
return g ? g.startsWith("https:") ? g : `${
|
8923
|
-
}), o = x(() => !!e.remote && !e.options.auth), i = x(() => s?.getData()?.name || "未登录"), c = x(() => s?.isLogined()),
|
8954
|
+
const g = s?.getData()?.avatar || "", p = e.remote || "";
|
8955
|
+
return g ? g.startsWith("https:") ? g : `${p}/api/oss/file/${g}` : null;
|
8956
|
+
}), o = x(() => !!e.remote && !e.options.auth), i = x(() => s?.getData()?.name || "未登录"), c = x(() => s?.isLogined()), m = () => {
|
8924
8957
|
s?.clear(), location.reload();
|
8925
8958
|
};
|
8926
|
-
return (g,
|
8959
|
+
return (g, p) => (u(), D("div", am, [
|
8927
8960
|
I("div", om, [
|
8928
8961
|
I("div", lm, [
|
8929
8962
|
d(n(El), {
|
@@ -8937,9 +8970,9 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8937
8970
|
_: 1
|
8938
8971
|
}, 8, ["value", "hidden"])
|
8939
8972
|
]),
|
8940
|
-
|
8973
|
+
p[1] || (p[1] = I("div", { class: "v-about-widget__name" }, "VTJ.PRO", -1)),
|
8941
8974
|
I("div", rm, [
|
8942
|
-
|
8975
|
+
p[0] || (p[0] = Q(" 版本: ")),
|
8943
8976
|
I("span", null, ae(n(jn)), 1)
|
8944
8977
|
])
|
8945
8978
|
]),
|
@@ -8961,9 +8994,9 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8961
8994
|
c.value ? (u(), y(n(ce), {
|
8962
8995
|
key: 0,
|
8963
8996
|
size: "small",
|
8964
|
-
onClick:
|
8997
|
+
onClick: m
|
8965
8998
|
}, {
|
8966
|
-
default: b(() =>
|
8999
|
+
default: b(() => p[2] || (p[2] = [
|
8967
9000
|
Q(" 退出登录 ")
|
8968
9001
|
])),
|
8969
9002
|
_: 1,
|
@@ -8973,7 +9006,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8973
9006
|
size: "small",
|
8974
9007
|
onClick: t.toRemoteAuth
|
8975
9008
|
}, {
|
8976
|
-
default: b(() =>
|
9009
|
+
default: b(() => p[3] || (p[3] = [
|
8977
9010
|
Q(" 登录 ")
|
8978
9011
|
])),
|
8979
9012
|
_: 1,
|
@@ -9054,7 +9087,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9054
9087
|
});
|
9055
9088
|
}
|
9056
9089
|
return h;
|
9057
|
-
},
|
9090
|
+
}, m = () => {
|
9058
9091
|
const v = s.value?.getEditor();
|
9059
9092
|
if (v) {
|
9060
9093
|
const h = v.getValue();
|
@@ -9062,7 +9095,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9062
9095
|
}
|
9063
9096
|
}, g = () => {
|
9064
9097
|
a.value = "", i("change", void 0), o.value = !1;
|
9065
|
-
},
|
9098
|
+
}, p = () => {
|
9066
9099
|
o.value = !0;
|
9067
9100
|
};
|
9068
9101
|
return (v, h) => (u(), D("div", {
|
@@ -9070,7 +9103,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9070
9103
|
}, [
|
9071
9104
|
d(n($e), Je({
|
9072
9105
|
readonly: "",
|
9073
|
-
onFocus:
|
9106
|
+
onFocus: p,
|
9074
9107
|
"model-value": e.type,
|
9075
9108
|
"suffix-icon": n(_n)
|
9076
9109
|
}, v.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
@@ -9084,7 +9117,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9084
9117
|
cancel: "",
|
9085
9118
|
submit: "",
|
9086
9119
|
clear: "",
|
9087
|
-
onSubmit:
|
9120
|
+
onSubmit: m,
|
9088
9121
|
onClear: g
|
9089
9122
|
}, {
|
9090
9123
|
extra: b(() => [
|
@@ -9127,20 +9160,20 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9127
9160
|
emits: ["change"],
|
9128
9161
|
setup(r, { emit: t }) {
|
9129
9162
|
const e = r, s = C(), a = C(e.modelValue.value), l = C(!1), o = x(() => !!a.value), i = t, c = () => {
|
9130
|
-
const
|
9131
|
-
if (
|
9132
|
-
const v =
|
9163
|
+
const p = s.value?.getEditor();
|
9164
|
+
if (p) {
|
9165
|
+
const v = p.getValue(), h = {
|
9133
9166
|
type: "JSFunction",
|
9134
9167
|
value: v
|
9135
9168
|
};
|
9136
9169
|
Qe(h, {}) && (a.value = v, i("change", h), l.value = !1);
|
9137
9170
|
}
|
9138
|
-
},
|
9171
|
+
}, m = () => {
|
9139
9172
|
a.value = "", i("change", void 0), l.value = !1;
|
9140
9173
|
}, g = () => {
|
9141
9174
|
l.value = !0;
|
9142
9175
|
};
|
9143
|
-
return (
|
9176
|
+
return (p, v) => (u(), D("div", {
|
9144
9177
|
class: be(["v-function-setter", { "is-active": o.value }])
|
9145
9178
|
}, [
|
9146
9179
|
d(n($e), Je({
|
@@ -9148,7 +9181,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9148
9181
|
onFocus: g,
|
9149
9182
|
"model-value": "JSFunction",
|
9150
9183
|
"suffix-icon": n(_n)
|
9151
|
-
},
|
9184
|
+
}, p.$attrs), null, 16, ["suffix-icon"]),
|
9152
9185
|
l.value ? (u(), y(n(Vt), {
|
9153
9186
|
key: 0,
|
9154
9187
|
modelValue: l.value,
|
@@ -9160,12 +9193,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9160
9193
|
submit: "",
|
9161
9194
|
clear: "",
|
9162
9195
|
onSubmit: c,
|
9163
|
-
onClear:
|
9196
|
+
onClear: m
|
9164
9197
|
}, {
|
9165
9198
|
extra: b(() => [
|
9166
9199
|
d(n(ce), {
|
9167
9200
|
type: "warning",
|
9168
|
-
onClick:
|
9201
|
+
onClick: m,
|
9169
9202
|
size: "default"
|
9170
9203
|
}, {
|
9171
9204
|
default: b(() => v[1] || (v[1] = [
|
@@ -9180,7 +9213,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9180
9213
|
ref_key: "codeEditor",
|
9181
9214
|
ref: s,
|
9182
9215
|
height: "100%",
|
9183
|
-
"model-value": a.value ||
|
9216
|
+
"model-value": a.value || p.defaultCode,
|
9184
9217
|
dark: ""
|
9185
9218
|
}, null, 8, ["model-value"])
|
9186
9219
|
]),
|
@@ -9198,17 +9231,17 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9198
9231
|
emits: ["change"],
|
9199
9232
|
setup(r, { emit: t }) {
|
9200
9233
|
const e = r, s = C(), a = C(e.modelValue), l = x(() => !!a.value), o = C(!1), i = t, c = () => {
|
9201
|
-
const
|
9202
|
-
if (
|
9203
|
-
const v =
|
9234
|
+
const p = s.value?.getEditor();
|
9235
|
+
if (p) {
|
9236
|
+
const v = p.getValue();
|
9204
9237
|
a.value = v, i("change", v), o.value = !1;
|
9205
9238
|
}
|
9206
|
-
},
|
9239
|
+
}, m = () => {
|
9207
9240
|
a.value = "", i("change", void 0), o.value = !1;
|
9208
9241
|
}, g = () => {
|
9209
9242
|
o.value = !0;
|
9210
9243
|
};
|
9211
|
-
return (
|
9244
|
+
return (p, v) => (u(), D("div", {
|
9212
9245
|
class: be(["v-json-setter v-css-setter", { "is-active": l.value }])
|
9213
9246
|
}, [
|
9214
9247
|
d(n($e), Je({
|
@@ -9216,7 +9249,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9216
9249
|
onFocus: g,
|
9217
9250
|
"model-value": e.type,
|
9218
9251
|
"suffix-icon": n(_n)
|
9219
|
-
},
|
9252
|
+
}, p.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
9220
9253
|
o.value ? (u(), y(n(Vt), {
|
9221
9254
|
key: 0,
|
9222
9255
|
modelValue: o.value,
|
@@ -9228,12 +9261,12 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9228
9261
|
submit: "",
|
9229
9262
|
clear: "",
|
9230
9263
|
onSubmit: c,
|
9231
|
-
onClear:
|
9264
|
+
onClear: m
|
9232
9265
|
}, {
|
9233
9266
|
extra: b(() => [
|
9234
9267
|
d(n(ce), {
|
9235
9268
|
type: "warning",
|
9236
|
-
onClick:
|
9269
|
+
onClick: m,
|
9237
9270
|
size: "default"
|
9238
9271
|
}, {
|
9239
9272
|
default: b(() => v[1] || (v[1] = [
|
@@ -9403,9 +9436,9 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9403
9436
|
installTemplate: o,
|
9404
9437
|
access: i,
|
9405
9438
|
refreshTemplates: c,
|
9406
|
-
loading:
|
9439
|
+
loading: m,
|
9407
9440
|
removeTemplate: g
|
9408
|
-
} = nu(),
|
9441
|
+
} = nu(), p = C(""), v = C("0"), h = x(() => p.value ? s.value.filter((O) => O.name.includes(p.value) || O.label?.includes(p.value)) : s.value), f = x(() => {
|
9409
9442
|
const O = i?.getData()?.id, T = In(h.value, (W) => W.userId === O ? "我的" : "共享"), R = [
|
9410
9443
|
{ label: "我的", model: {} },
|
9411
9444
|
{ label: "共享", model: {} }
|
@@ -9454,8 +9487,8 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9454
9487
|
I("div", ym, [
|
9455
9488
|
d(n($e), {
|
9456
9489
|
size: "small",
|
9457
|
-
modelValue:
|
9458
|
-
"onUpdate:modelValue": T[0] || (T[0] = (R) =>
|
9490
|
+
modelValue: p.value,
|
9491
|
+
"onUpdate:modelValue": T[0] || (T[0] = (R) => p.value = R),
|
9459
9492
|
"prefix-icon": n(pn),
|
9460
9493
|
placeholder: "搜索模板",
|
9461
9494
|
clearable: ""
|
@@ -9565,7 +9598,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9565
9598
|
]),
|
9566
9599
|
_: 1
|
9567
9600
|
}, 8, ["subtitle", "onRefresh"])), [
|
9568
|
-
[n(qs), n(
|
9601
|
+
[n(qs), n(m)]
|
9569
9602
|
]);
|
9570
9603
|
}
|
9571
9604
|
}), xm = /* @__PURE__ */ vt(Cm, [["__scopeId", "data-v-146ae3c1"]]), Am = /* @__PURE__ */ B({
|
@@ -9631,14 +9664,14 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9631
9664
|
__: [1]
|
9632
9665
|
}),
|
9633
9666
|
e.topics.length ? (u(), D("div", Im, [
|
9634
|
-
(u(!0), D(X, null, le(e.topics, (
|
9667
|
+
(u(!0), D(X, null, le(e.topics, (m, g) => (u(), y(n(Ge), {
|
9635
9668
|
index: g + 1,
|
9636
|
-
title:
|
9637
|
-
"model-value":
|
9638
|
-
active: i.current?.id ===
|
9669
|
+
title: m.title,
|
9670
|
+
"model-value": m,
|
9671
|
+
active: i.current?.id === m.id,
|
9639
9672
|
background: "",
|
9640
9673
|
actions: ["remove"],
|
9641
|
-
onClick: (
|
9674
|
+
onClick: (p) => l(m),
|
9642
9675
|
onAction: o
|
9643
9676
|
}, null, 8, ["index", "title", "model-value", "active", "onClick"]))), 256))
|
9644
9677
|
])) : (u(), y(n(Me), {
|
@@ -9687,7 +9720,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9687
9720
|
});
|
9688
9721
|
const c = (g) => {
|
9689
9722
|
a("update:modelValue", g);
|
9690
|
-
},
|
9723
|
+
}, m = () => {
|
9691
9724
|
if (o.value.trim().length < 3) {
|
9692
9725
|
De("请描述您的需求", "warning");
|
9693
9726
|
return;
|
@@ -9700,10 +9733,10 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9700
9733
|
};
|
9701
9734
|
return t({
|
9702
9735
|
currentModel: i
|
9703
|
-
}), (g,
|
9736
|
+
}), (g, p) => (u(), D("div", Rm, [
|
9704
9737
|
d(n($e), {
|
9705
9738
|
modelValue: o.value,
|
9706
|
-
"onUpdate:modelValue":
|
9739
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => o.value = v),
|
9707
9740
|
type: "textarea",
|
9708
9741
|
autosize: { minRows: s.minRows, maxRows: 20 },
|
9709
9742
|
placeholder: "请描述您的需求",
|
@@ -9715,7 +9748,7 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9715
9748
|
size: "small",
|
9716
9749
|
"popper-class": "llm-popper",
|
9717
9750
|
modelValue: i.value,
|
9718
|
-
"onUpdate:modelValue":
|
9751
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => i.value = v),
|
9719
9752
|
disabled: s.lockModel || s.loading
|
9720
9753
|
}, {
|
9721
9754
|
default: b(() => [
|
@@ -9732,18 +9765,18 @@ const _u = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9732
9765
|
border: "",
|
9733
9766
|
disabled: s.loading,
|
9734
9767
|
modelValue: n(l).state.autoApply,
|
9735
|
-
"onUpdate:modelValue":
|
9768
|
+
"onUpdate:modelValue": p[2] || (p[2] = (v) => n(l).state.autoApply = v)
|
9736
9769
|
}, null, 8, ["disabled", "modelValue"]),
|
9737
9770
|
d(n(ce), {
|
9738
9771
|
icon: n(aa),
|
9739
9772
|
type: "primary",
|
9740
9773
|
disabled: s.disabled,
|
9741
9774
|
round: "",
|
9742
|
-
onClick:
|
9775
|
+
onClick: m,
|
9743
9776
|
loading: s.loading,
|
9744
9777
|
size: "default"
|
9745
9778
|
}, {
|
9746
|
-
default: b(() =>
|
9779
|
+
default: b(() => p[3] || (p[3] = [
|
9747
9780
|
Q(" 发送 ")
|
9748
9781
|
])),
|
9749
9782
|
_: 1,
|
@@ -9780,8 +9813,8 @@ function Nm() {
|
|
9780
9813
|
} : S instanceof Set && (S.add = S.clear = S.delete = function() {
|
9781
9814
|
throw new Error("set is read-only");
|
9782
9815
|
}), Object.freeze(S), Object.getOwnPropertyNames(S).forEach((P) => {
|
9783
|
-
const H = S[P],
|
9784
|
-
(
|
9816
|
+
const H = S[P], me = typeof H;
|
9817
|
+
(me === "object" || me === "function") && !Object.isFrozen(H) && r(H);
|
9785
9818
|
}), S;
|
9786
9819
|
}
|
9787
9820
|
class t {
|
@@ -9800,11 +9833,11 @@ function Nm() {
|
|
9800
9833
|
}
|
9801
9834
|
function s(S, ...P) {
|
9802
9835
|
const H = /* @__PURE__ */ Object.create(null);
|
9803
|
-
for (const
|
9804
|
-
H[
|
9805
|
-
return P.forEach(function(
|
9806
|
-
for (const ze in
|
9807
|
-
H[ze] =
|
9836
|
+
for (const me in S)
|
9837
|
+
H[me] = S[me];
|
9838
|
+
return P.forEach(function(me) {
|
9839
|
+
for (const ze in me)
|
9840
|
+
H[ze] = me[ze];
|
9808
9841
|
}), /** @type {T} */
|
9809
9842
|
H;
|
9810
9843
|
}
|
@@ -9815,7 +9848,7 @@ function Nm() {
|
|
9815
9848
|
const H = S.split(".");
|
9816
9849
|
return [
|
9817
9850
|
`${P}${H.shift()}`,
|
9818
|
-
...H.map((
|
9851
|
+
...H.map((me, ze) => `${me}${"_".repeat(ze + 1)}`)
|
9819
9852
|
].join(" ");
|
9820
9853
|
}
|
9821
9854
|
return `${P}${S}`;
|
@@ -9875,7 +9908,7 @@ function Nm() {
|
|
9875
9908
|
const P = { children: [] };
|
9876
9909
|
return Object.assign(P, S), P;
|
9877
9910
|
};
|
9878
|
-
class
|
9911
|
+
class m {
|
9879
9912
|
constructor() {
|
9880
9913
|
this.rootNode = c(), this.stack = [this.rootNode];
|
9881
9914
|
}
|
@@ -9916,18 +9949,18 @@ function Nm() {
|
|
9916
9949
|
* @param {Node} node
|
9917
9950
|
*/
|
9918
9951
|
static _walk(P, H) {
|
9919
|
-
return typeof H == "string" ? P.addText(H) : H.children && (P.openNode(H), H.children.forEach((
|
9952
|
+
return typeof H == "string" ? P.addText(H) : H.children && (P.openNode(H), H.children.forEach((me) => this._walk(P, me)), P.closeNode(H)), P;
|
9920
9953
|
}
|
9921
9954
|
/**
|
9922
9955
|
* @param {Node} node
|
9923
9956
|
*/
|
9924
9957
|
static _collapse(P) {
|
9925
9958
|
typeof P != "string" && P.children && (P.children.every((H) => typeof H == "string") ? P.children = [P.children.join("")] : P.children.forEach((H) => {
|
9926
|
-
|
9959
|
+
m._collapse(H);
|
9927
9960
|
}));
|
9928
9961
|
}
|
9929
9962
|
}
|
9930
|
-
class g extends
|
9963
|
+
class g extends m {
|
9931
9964
|
/**
|
9932
9965
|
* @param {*} options
|
9933
9966
|
*/
|
@@ -9952,8 +9985,8 @@ function Nm() {
|
|
9952
9985
|
* @param {string} name
|
9953
9986
|
*/
|
9954
9987
|
__addSublanguage(P, H) {
|
9955
|
-
const
|
9956
|
-
H && (
|
9988
|
+
const me = P.root;
|
9989
|
+
H && (me.scope = `language:${H}`), this.add(me);
|
9957
9990
|
}
|
9958
9991
|
toHTML() {
|
9959
9992
|
return new i(this, this.options).value();
|
@@ -9962,7 +9995,7 @@ function Nm() {
|
|
9962
9995
|
return this.closeAllNodes(), !0;
|
9963
9996
|
}
|
9964
9997
|
}
|
9965
|
-
function
|
9998
|
+
function p(S) {
|
9966
9999
|
return S ? typeof S == "string" ? S : S.source : null;
|
9967
10000
|
}
|
9968
10001
|
function v(S) {
|
@@ -9975,14 +10008,14 @@ function Nm() {
|
|
9975
10008
|
return _("(?:", S, ")?");
|
9976
10009
|
}
|
9977
10010
|
function _(...S) {
|
9978
|
-
return S.map((H) =>
|
10011
|
+
return S.map((H) => p(H)).join("");
|
9979
10012
|
}
|
9980
10013
|
function w(S) {
|
9981
10014
|
const P = S[S.length - 1];
|
9982
10015
|
return typeof P == "object" && P.constructor === Object ? (S.splice(S.length - 1, 1), P) : {};
|
9983
10016
|
}
|
9984
10017
|
function E(...S) {
|
9985
|
-
return "(" + (w(S).capture ? "" : "?:") + S.map((
|
10018
|
+
return "(" + (w(S).capture ? "" : "?:") + S.map((me) => p(me)).join("|") + ")";
|
9986
10019
|
}
|
9987
10020
|
function k(S) {
|
9988
10021
|
return new RegExp(S.toString() + "|").exec("").length - 1;
|
@@ -9994,10 +10027,10 @@ function Nm() {
|
|
9994
10027
|
const V = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
9995
10028
|
function N(S, { joinWith: P }) {
|
9996
10029
|
let H = 0;
|
9997
|
-
return S.map((
|
10030
|
+
return S.map((me) => {
|
9998
10031
|
H += 1;
|
9999
10032
|
const ze = H;
|
10000
|
-
let Le =
|
10033
|
+
let Le = p(me), se = "";
|
10001
10034
|
for (; Le.length > 0; ) {
|
10002
10035
|
const Y = V.exec(Le);
|
10003
10036
|
if (!Y) {
|
@@ -10007,7 +10040,7 @@ function Nm() {
|
|
10007
10040
|
se += Le.substring(0, Y.index), Le = Le.substring(Y.index + Y[0].length), Y[0][0] === "\\" && Y[1] ? se += "\\" + String(Number(Y[1]) + ze) : (se += Y[0], Y[0] === "(" && H++);
|
10008
10041
|
}
|
10009
10042
|
return se;
|
10010
|
-
}).map((
|
10043
|
+
}).map((me) => `(${me})`).join(P);
|
10011
10044
|
}
|
10012
10045
|
const O = /\b\B/, T = "[a-zA-Z]\\w*", R = "[a-zA-Z_]\\w*", W = "\\b\\d+(\\.\\d+)?", Z = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", K = "\\b(0b[01]+)", ne = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", z = (S = {}) => {
|
10013
10046
|
const P = /^#![ ]*\//;
|
@@ -10022,8 +10055,8 @@ function Nm() {
|
|
10022
10055
|
end: /$/,
|
10023
10056
|
relevance: 0,
|
10024
10057
|
/** @type {ModeCallback} */
|
10025
|
-
"on:begin": (H,
|
10026
|
-
H.index !== 0 &&
|
10058
|
+
"on:begin": (H, me) => {
|
10059
|
+
H.index !== 0 && me.ignoreMatch();
|
10027
10060
|
}
|
10028
10061
|
}, S);
|
10029
10062
|
}, ue = {
|
@@ -10044,7 +10077,7 @@ function Nm() {
|
|
10044
10077
|
}, $ = {
|
10045
10078
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
10046
10079
|
}, q = function(S, P, H = {}) {
|
10047
|
-
const
|
10080
|
+
const me = s(
|
10048
10081
|
{
|
10049
10082
|
scope: "comment",
|
10050
10083
|
begin: S,
|
@@ -10053,7 +10086,7 @@ function Nm() {
|
|
10053
10086
|
},
|
10054
10087
|
H
|
10055
10088
|
);
|
10056
|
-
|
10089
|
+
me.contains.push({
|
10057
10090
|
scope: "doctag",
|
10058
10091
|
// hack to avoid the space from being included. the space is necessary to
|
10059
10092
|
// match here to prevent the plain text rule below from gobbling up doctags
|
@@ -10083,7 +10116,7 @@ function Nm() {
|
|
10083
10116
|
/[A-Za-z][a-z]{2,}/
|
10084
10117
|
// allow capitalized words at beginning of sentences
|
10085
10118
|
);
|
10086
|
-
return
|
10119
|
+
return me.contains.push(
|
10087
10120
|
{
|
10088
10121
|
// TODO: how to include ", (, ) without breaking grammars that use these for
|
10089
10122
|
// comment delimiters?
|
@@ -10108,7 +10141,7 @@ function Nm() {
|
|
10108
10141
|
)
|
10109
10142
|
// look for 3 words in a row
|
10110
10143
|
}
|
10111
|
-
),
|
10144
|
+
), me;
|
10112
10145
|
}, we = q("//", "$"), _e = q("/\\*", "\\*/"), We = q("#", "$"), st = {
|
10113
10146
|
scope: "number",
|
10114
10147
|
begin: W,
|
@@ -10213,8 +10246,8 @@ function Nm() {
|
|
10213
10246
|
if (!S.beforeMatch) return;
|
10214
10247
|
if (S.starts) throw new Error("beforeMatch cannot be used with starts");
|
10215
10248
|
const H = Object.assign({}, S);
|
10216
|
-
Object.keys(S).forEach((
|
10217
|
-
delete S[
|
10249
|
+
Object.keys(S).forEach((me) => {
|
10250
|
+
delete S[me];
|
10218
10251
|
}), S.keywords = H.keywords, S.begin = _(H.beforeMatch, v(H.begin)), S.starts = {
|
10219
10252
|
relevance: 0,
|
10220
10253
|
contains: [
|
@@ -10238,17 +10271,17 @@ function Nm() {
|
|
10238
10271
|
// common variable name
|
10239
10272
|
], on = "keyword";
|
10240
10273
|
function Nn(S, P, H = on) {
|
10241
|
-
const
|
10274
|
+
const me = /* @__PURE__ */ Object.create(null);
|
10242
10275
|
return typeof S == "string" ? ze(H, S.split(" ")) : Array.isArray(S) ? ze(H, S) : Object.keys(S).forEach(function(Le) {
|
10243
10276
|
Object.assign(
|
10244
|
-
|
10277
|
+
me,
|
10245
10278
|
Nn(S[Le], P, Le)
|
10246
10279
|
);
|
10247
|
-
}),
|
10280
|
+
}), me;
|
10248
10281
|
function ze(Le, se) {
|
10249
10282
|
P && (se = se.map((Y) => Y.toLowerCase())), se.forEach(function(Y) {
|
10250
10283
|
const de = Y.split("|");
|
10251
|
-
|
10284
|
+
me[de[0]] = [Le, fs(de[0], de[1])];
|
10252
10285
|
});
|
10253
10286
|
}
|
10254
10287
|
}
|
@@ -10266,10 +10299,10 @@ function Nm() {
|
|
10266
10299
|
kn[`${S}/${P}`] || (console.log(`Deprecated as of ${S}. ${P}`), kn[`${S}/${P}`] = !0);
|
10267
10300
|
}, he = new Error();
|
10268
10301
|
function xe(S, P, { key: H }) {
|
10269
|
-
let
|
10302
|
+
let me = 0;
|
10270
10303
|
const ze = S[H], Le = {}, se = {};
|
10271
10304
|
for (let Y = 1; Y <= P.length; Y++)
|
10272
|
-
se[Y +
|
10305
|
+
se[Y + me] = ze[Y], Le[Y + me] = !0, me += k(P[Y - 1]);
|
10273
10306
|
S[H] = se, S[H]._emit = Le, S[H]._multi = !0;
|
10274
10307
|
}
|
10275
10308
|
function Se(S) {
|
@@ -10299,7 +10332,7 @@ function Nm() {
|
|
10299
10332
|
function Ut(S) {
|
10300
10333
|
function P(se, Y) {
|
10301
10334
|
return new RegExp(
|
10302
|
-
|
10335
|
+
p(se),
|
10303
10336
|
"m" + (S.case_insensitive ? "i" : "") + (S.unicodeRegex ? "u" : "") + (Y ? "g" : "")
|
10304
10337
|
);
|
10305
10338
|
}
|
@@ -10326,7 +10359,7 @@ function Nm() {
|
|
10326
10359
|
return de.splice(0, Ke), Object.assign(de, Fe);
|
10327
10360
|
}
|
10328
10361
|
}
|
10329
|
-
class
|
10362
|
+
class me {
|
10330
10363
|
constructor() {
|
10331
10364
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
10332
10365
|
}
|
@@ -10359,7 +10392,7 @@ function Nm() {
|
|
10359
10392
|
}
|
10360
10393
|
}
|
10361
10394
|
function ze(se) {
|
10362
|
-
const Y = new
|
10395
|
+
const Y = new me();
|
10363
10396
|
return se.contains.forEach((de) => Y.addRule(de.begin, { rule: de, type: "begin" })), se.terminatorEnd && Y.addRule(se.terminatorEnd, { type: "end" }), se.illegal && Y.addRule(se.illegal, { type: "illegal" }), Y;
|
10364
10397
|
}
|
10365
10398
|
function Le(se, Y) {
|
@@ -10384,7 +10417,7 @@ function Nm() {
|
|
10384
10417
|
ms
|
10385
10418
|
].forEach((Fe) => Fe(se, Y)), se.isCompiled = !0;
|
10386
10419
|
let Ke = null;
|
10387
|
-
return typeof se.keywords == "object" && se.keywords.$pattern && (se.keywords = Object.assign({}, se.keywords), Ke = se.keywords.$pattern, delete se.keywords.$pattern), Ke = Ke || /\w+/, se.keywords && (se.keywords = Nn(se.keywords, S.case_insensitive)), de.keywordPatternRe = P(Ke, !0), Y && (se.begin || (se.begin = /\B|\b/), de.beginRe = P(de.begin), !se.end && !se.endsWithParent && (se.end = /\B|\b/), se.end && (de.endRe = P(de.end)), de.terminatorEnd =
|
10420
|
+
return typeof se.keywords == "object" && se.keywords.$pattern && (se.keywords = Object.assign({}, se.keywords), Ke = se.keywords.$pattern, delete se.keywords.$pattern), Ke = Ke || /\w+/, se.keywords && (se.keywords = Nn(se.keywords, S.case_insensitive)), de.keywordPatternRe = P(Ke, !0), Y && (se.begin || (se.begin = /\B|\b/), de.beginRe = P(de.begin), !se.end && !se.endsWithParent && (se.end = /\B|\b/), se.end && (de.endRe = P(de.end)), de.terminatorEnd = p(de.end) || "", se.endsWithParent && Y.terminatorEnd && (de.terminatorEnd += (se.end ? "|" : "") + Y.terminatorEnd)), se.illegal && (de.illegalRe = P(
|
10388
10421
|
/** @type {RegExp | string} */
|
10389
10422
|
se.illegal
|
10390
10423
|
)), se.contains || (se.contains = []), se.contains = [].concat(...se.contains.map(function(Fe) {
|
@@ -10419,7 +10452,7 @@ function Nm() {
|
|
10419
10452
|
}
|
10420
10453
|
}
|
10421
10454
|
const bs = e, da = s, pa = Symbol("nomatch"), Qo = 7, ma = function(S) {
|
10422
|
-
const P = /* @__PURE__ */ Object.create(null), H = /* @__PURE__ */ Object.create(null),
|
10455
|
+
const P = /* @__PURE__ */ Object.create(null), H = /* @__PURE__ */ Object.create(null), me = [];
|
10423
10456
|
let ze = !0;
|
10424
10457
|
const Le = "Could not find the language '{}', did you forget to load/include a language module?", se = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
10425
10458
|
let Y = {
|
@@ -10779,15 +10812,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`), He = F, Ve = ie), ke
|
|
10779
10812
|
});
|
10780
10813
|
}
|
10781
10814
|
function ol(F) {
|
10782
|
-
al(F),
|
10815
|
+
al(F), me.push(F);
|
10783
10816
|
}
|
10784
10817
|
function ll(F) {
|
10785
|
-
const ie =
|
10786
|
-
ie !== -1 &&
|
10818
|
+
const ie = me.indexOf(F);
|
10819
|
+
ie !== -1 && me.splice(ie, 1);
|
10787
10820
|
}
|
10788
10821
|
function zn(F, ie) {
|
10789
10822
|
const ke = F;
|
10790
|
-
|
10823
|
+
me.forEach(function(Ve) {
|
10791
10824
|
Ve[ke] && Ve[ke](ie);
|
10792
10825
|
});
|
10793
10826
|
}
|
@@ -10848,7 +10881,7 @@ function Mm(r) {
|
|
10848
10881
|
}, o = r.inherit(l, {
|
10849
10882
|
begin: /\(/,
|
10850
10883
|
end: /\)/
|
10851
|
-
}), i = r.inherit(r.APOS_STRING_MODE, { className: "string" }), c = r.inherit(r.QUOTE_STRING_MODE, { className: "string" }),
|
10884
|
+
}), i = r.inherit(r.APOS_STRING_MODE, { className: "string" }), c = r.inherit(r.QUOTE_STRING_MODE, { className: "string" }), m = {
|
10852
10885
|
endsWithParent: !0,
|
10853
10886
|
illegal: /</,
|
10854
10887
|
relevance: 0,
|
@@ -10967,7 +11000,7 @@ function Mm(r) {
|
|
10967
11000
|
begin: /<style(?=\s|>)/,
|
10968
11001
|
end: />/,
|
10969
11002
|
keywords: { name: "style" },
|
10970
|
-
contains: [
|
11003
|
+
contains: [m],
|
10971
11004
|
starts: {
|
10972
11005
|
end: /<\/style>/,
|
10973
11006
|
returnEnd: !0,
|
@@ -10983,7 +11016,7 @@ function Mm(r) {
|
|
10983
11016
|
begin: /<script(?=\s|>)/,
|
10984
11017
|
end: />/,
|
10985
11018
|
keywords: { name: "script" },
|
10986
|
-
contains: [
|
11019
|
+
contains: [m],
|
10987
11020
|
starts: {
|
10988
11021
|
end: /<\/script>/,
|
10989
11022
|
returnEnd: !0,
|
@@ -11018,7 +11051,7 @@ function Mm(r) {
|
|
11018
11051
|
className: "name",
|
11019
11052
|
begin: e,
|
11020
11053
|
relevance: 0,
|
11021
|
-
starts:
|
11054
|
+
starts: m
|
11022
11055
|
}
|
11023
11056
|
]
|
11024
11057
|
},
|
@@ -11239,12 +11272,12 @@ function Jm(r) {
|
|
11239
11272
|
literal: Lm,
|
11240
11273
|
built_in: Fm,
|
11241
11274
|
"variable.language": Um
|
11242
|
-
}, c = "[0-9](_?[0-9])*",
|
11275
|
+
}, c = "[0-9](_?[0-9])*", m = `\\.(${c})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", p = {
|
11243
11276
|
className: "number",
|
11244
11277
|
variants: [
|
11245
11278
|
// DecimalLiteral
|
11246
|
-
{ begin: `(\\b(${g})((${
|
11247
|
-
{ begin: `\\b(${g})\\b((${
|
11279
|
+
{ begin: `(\\b(${g})((${m})|\\.)?|(${m}))[eE][+-]?(${c})\\b` },
|
11280
|
+
{ begin: `\\b(${g})\\b((${m})\\b|\\.)?|(${m})\\b` },
|
11248
11281
|
// DecimalBigIntegerLiteral
|
11249
11282
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
11250
11283
|
// NonDecimalIntegerLiteral
|
@@ -11361,7 +11394,7 @@ function Jm(r) {
|
|
11361
11394
|
w,
|
11362
11395
|
// Skip numbers when they are part of a variable name
|
11363
11396
|
{ match: /\$\d+/ },
|
11364
|
-
|
11397
|
+
p
|
11365
11398
|
// This is intentional:
|
11366
11399
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
11367
11400
|
// hljs.REGEXP_MODE
|
@@ -11572,7 +11605,7 @@ function Jm(r) {
|
|
11572
11605
|
k,
|
11573
11606
|
// Skip numbers when they are part of a variable name
|
11574
11607
|
{ match: /\$\d+/ },
|
11575
|
-
|
11608
|
+
p,
|
11576
11609
|
R,
|
11577
11610
|
{
|
11578
11611
|
scope: "attr",
|
@@ -12645,10 +12678,10 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12645
12678
|
}, { immediate: !0 });
|
12646
12679
|
const i = (c) => {
|
12647
12680
|
if (e.code) return;
|
12648
|
-
const
|
12649
|
-
|
12681
|
+
const m = c.target;
|
12682
|
+
m && m.classList.contains("language-vue") && s("click");
|
12650
12683
|
};
|
12651
|
-
return (c,
|
12684
|
+
return (c, m) => (u(), D("div", {
|
12652
12685
|
ref_key: "container",
|
12653
12686
|
ref: a,
|
12654
12687
|
class: be(["markdown-container", { "is-hide-code": !e.code }]),
|
@@ -12674,9 +12707,9 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12674
12707
|
},
|
12675
12708
|
emits: ["refresh", "view", "download", "fix", "cancel"],
|
12676
12709
|
setup(r, { emit: t }) {
|
12677
|
-
const e = r, s = t, a = { figma: $o, sketch: Wo, other: Vn, unknown: Vn }, l = x(() => e.type === "ai"), o = x(() => e.data.status === "Success"), i = x(() => e.data.status === "Pending"), c = x(() => e.data.status === "Error"),
|
12678
|
-
() =>
|
12679
|
-
),
|
12710
|
+
const e = r, s = t, a = { figma: $o, sketch: Wo, other: Vn, unknown: Vn }, l = x(() => e.type === "ai"), o = x(() => e.data.status === "Success"), i = x(() => e.data.status === "Pending"), c = x(() => e.data.status === "Error"), m = C(e.data.collapsed), g = x(
|
12711
|
+
() => m.value ? Gr : qr
|
12712
|
+
), p = x(() => ({
|
12680
12713
|
[`is-${e.data.status}`]: e.type === "ai"
|
12681
12714
|
})), v = x(() => [
|
12682
12715
|
{
|
@@ -12699,7 +12732,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12699
12732
|
]), h = x(() => ({
|
12700
12733
|
"is-user": e.type === "user",
|
12701
12734
|
"is-ai": e.type === "ai"
|
12702
|
-
})), f = x(() => e.data.reasoning ? `已经深度思考 (用时 ${Math.ceil(e.data.thinking / 1e3)} 秒)` :
|
12735
|
+
})), f = x(() => e.data.reasoning ? `已经深度思考 (用时 ${Math.ceil(e.data.thinking / 1e3)} 秒)` : m.value ? "展开" : "收起"), _ = (T) => T.type === "json" && T.json ? T.dataType ? a[T.dataType] || a.other : T.json.includes("/sketch/") ? a.sketch : T.json.includes("/figma/") ? a.figma : a.other : T.image ? T.image : "", w = (T = "") => {
|
12703
12736
|
const R = T.split("/");
|
12704
12737
|
return R.length > 6 ? R.slice(6).join("/") : T;
|
12705
12738
|
}, E = (T) => {
|
@@ -12707,7 +12740,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12707
12740
|
}, k = (T) => {
|
12708
12741
|
s(T.name, T);
|
12709
12742
|
}, A = () => {
|
12710
|
-
|
12743
|
+
m.value = !m.value;
|
12711
12744
|
}, V = () => {
|
12712
12745
|
s("fix", e.data);
|
12713
12746
|
}, N = () => {
|
@@ -12718,13 +12751,13 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12718
12751
|
return te(
|
12719
12752
|
() => e.data.collapsed,
|
12720
12753
|
(T) => {
|
12721
|
-
|
12754
|
+
m.value = !!T;
|
12722
12755
|
},
|
12723
12756
|
{ immediate: !0 }
|
12724
12757
|
), te(
|
12725
12758
|
() => e.data.status,
|
12726
12759
|
() => {
|
12727
|
-
|
12760
|
+
m.value = !1;
|
12728
12761
|
}
|
12729
12762
|
), (T, R) => (u(), D("div", {
|
12730
12763
|
class: be(["v-ai-widget-bubble", h.value])
|
@@ -12738,7 +12771,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12738
12771
|
e.type === "user" ? (u(), y(Om, { key: 1 })) : j("", !0),
|
12739
12772
|
I("div", tv, [
|
12740
12773
|
I("div", {
|
12741
|
-
class: be(["v-ai-widget-bubble__content",
|
12774
|
+
class: be(["v-ai-widget-bubble__content", p.value])
|
12742
12775
|
}, [
|
12743
12776
|
l.value ? (u(), D(X, { key: 0 }, [
|
12744
12777
|
i.value ? j("", !0) : (u(), y(n(Hs), {
|
@@ -12755,7 +12788,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12755
12788
|
_: 1
|
12756
12789
|
})),
|
12757
12790
|
I("div", {
|
12758
|
-
class: be({ "is-collapsed":
|
12791
|
+
class: be({ "is-collapsed": m.value })
|
12759
12792
|
}, [
|
12760
12793
|
I("div", nv, [
|
12761
12794
|
I("pre", null, ae(e.data.reasoning), 1)
|
@@ -12874,25 +12907,25 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12874
12907
|
},
|
12875
12908
|
emits: ["send"],
|
12876
12909
|
setup(r, { emit: t }) {
|
12877
|
-
const e = r, s = t, a = Ne(), l = C(null), o = C(), i = (
|
12878
|
-
|
12910
|
+
const e = r, s = t, a = Ne(), l = C(null), o = C(), i = (p) => {
|
12911
|
+
p.status === "ready" && p.raw && (l.value = URL.createObjectURL(p.raw));
|
12879
12912
|
}, c = () => {
|
12880
12913
|
l.value = null;
|
12881
12914
|
};
|
12882
12915
|
te(
|
12883
12916
|
() => a.state.autoApply,
|
12884
|
-
(
|
12917
|
+
(p) => {
|
12885
12918
|
mt.success({
|
12886
|
-
message:
|
12919
|
+
message: p ? "已开启自动应用到页面功能" : "已经关闭自动应用到页面功能"
|
12887
12920
|
});
|
12888
12921
|
}
|
12889
12922
|
);
|
12890
|
-
const
|
12891
|
-
|
12923
|
+
const m = async (p) => {
|
12924
|
+
p.file && s("send", p.file, a.state.autoApply);
|
12892
12925
|
}, g = () => {
|
12893
12926
|
o.value.submit();
|
12894
12927
|
};
|
12895
|
-
return (
|
12928
|
+
return (p, v) => (u(), D("div", mv, [
|
12896
12929
|
d(n(ns), {
|
12897
12930
|
ref_key: "uploadRef",
|
12898
12931
|
ref: o,
|
@@ -12902,7 +12935,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12902
12935
|
"show-file-list": !1,
|
12903
12936
|
accept: ".png,.jpg,.jpeg",
|
12904
12937
|
"on-change": i,
|
12905
|
-
"http-request":
|
12938
|
+
"http-request": m
|
12906
12939
|
}, {
|
12907
12940
|
default: b(() => [
|
12908
12941
|
d(n(ot), {
|
@@ -12982,14 +13015,14 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
12982
13015
|
other: Vn
|
12983
13016
|
};
|
12984
13017
|
return o.value && f[o.value.toLowerCase()] || Vn;
|
12985
|
-
}), c = C(),
|
13018
|
+
}), c = C(), m = dt(null), g = async (f) => {
|
12986
13019
|
if (f.status === "ready" && f.raw) {
|
12987
13020
|
const _ = await Qc(f.raw);
|
12988
|
-
_ && _.type ? (o.value = _.type, l.value = f.raw.name,
|
13021
|
+
_ && _.type ? (o.value = _.type, l.value = f.raw.name, m.value = _) : (await kt("无法识别文件, 只支持Sketch/Figma插件导出数据文件", {
|
12989
13022
|
type: "warning"
|
12990
|
-
}), o.value = null, l.value = null,
|
13023
|
+
}), o.value = null, l.value = null, m.value = null);
|
12991
13024
|
}
|
12992
|
-
},
|
13025
|
+
}, p = () => {
|
12993
13026
|
l.value = null;
|
12994
13027
|
};
|
12995
13028
|
te(
|
@@ -13001,7 +13034,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13001
13034
|
}
|
13002
13035
|
);
|
13003
13036
|
const v = async (f) => {
|
13004
|
-
f.file && s("send", f.file, a.state.autoApply,
|
13037
|
+
f.file && s("send", f.file, a.state.autoApply, m.value);
|
13005
13038
|
}, h = () => {
|
13006
13039
|
c.value.submit();
|
13007
13040
|
};
|
@@ -13062,7 +13095,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13062
13095
|
icon: n(Ao),
|
13063
13096
|
circle: "",
|
13064
13097
|
size: "small",
|
13065
|
-
onClick:
|
13098
|
+
onClick: p
|
13066
13099
|
}, null, 8, ["icon"]),
|
13067
13100
|
I("div", wv, [
|
13068
13101
|
d(n(Qs), {
|
@@ -13117,11 +13150,11 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13117
13150
|
label: "元数据",
|
13118
13151
|
value: "json"
|
13119
13152
|
}
|
13120
|
-
], c = C("text"),
|
13153
|
+
], c = C("text"), m = (h) => {
|
13121
13154
|
e.fillPromptInput(h.prompt);
|
13122
13155
|
}, g = (h) => {
|
13123
13156
|
s("send", { ...h });
|
13124
|
-
},
|
13157
|
+
}, p = (h, f) => {
|
13125
13158
|
const _ = l.state.llm || e.models[0].value;
|
13126
13159
|
s("imageSend", { file: h, auto: f, model: _ });
|
13127
13160
|
}, v = async (h, f, _) => {
|
@@ -13157,7 +13190,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13157
13190
|
c.value === "image" ? (u(), y(fv, {
|
13158
13191
|
key: 1,
|
13159
13192
|
loading: e.loading,
|
13160
|
-
onSend:
|
13193
|
+
onSend: p
|
13161
13194
|
}, null, 8, ["loading"])) : j("", !0),
|
13162
13195
|
c.value === "json" ? (u(), y(_v, {
|
13163
13196
|
key: 2,
|
@@ -13179,7 +13212,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13179
13212
|
"model-value": _,
|
13180
13213
|
nowrap: !1,
|
13181
13214
|
background: "",
|
13182
|
-
onClick: (E) =>
|
13215
|
+
onClick: (E) => m(_)
|
13183
13216
|
}, null, 8, ["index", "title", "model-value", "onClick"]))), 256))
|
13184
13217
|
])
|
13185
13218
|
], 64)) : j("", !0)
|
@@ -13217,7 +13250,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13217
13250
|
const s = r;
|
13218
13251
|
self.MonacoEnvironment = {
|
13219
13252
|
createTrustedTypesPolicy: void 0,
|
13220
|
-
async getWorker(
|
13253
|
+
async getWorker(p, v) {
|
13221
13254
|
let h;
|
13222
13255
|
return v === "json" && (h = await import("./json.worker-DCDqLFYI.js")), ["css", "scss", "less"].includes(v) && (h = await import("./css.worker-DhE07keG.js")), ["html", "handlebars", "razor", "vue"].includes(v) && (h = await import("./html.worker-C5hxLCyX.js")), ["typescript", "javascript"].includes(v) && (h = await import("./ts.worker-Bjq4oI3m.js")), h = h || await import("./editor.worker-DKpUct5n.js"), new h.default();
|
13223
13256
|
}
|
@@ -13228,9 +13261,9 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13228
13261
|
o && (await o.getAction("editor.action.formatDocument")?.run(), o.setValue(o.getValue()));
|
13229
13262
|
}, c = async () => {
|
13230
13263
|
await i();
|
13231
|
-
const
|
13232
|
-
a("update:modelValue",
|
13233
|
-
},
|
13264
|
+
const p = o?.getValue();
|
13265
|
+
a("update:modelValue", p), a("blur", p);
|
13266
|
+
}, m = () => {
|
13234
13267
|
o = Cc.create(l.value, {
|
13235
13268
|
value: s.modelValue,
|
13236
13269
|
language: s.lang,
|
@@ -13240,20 +13273,20 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13240
13273
|
minimap: { enabled: s.minimap },
|
13241
13274
|
tabSize: 2,
|
13242
13275
|
...s.options
|
13243
|
-
}), o.onDidChangeModelContent((
|
13244
|
-
a("change", o?.getValue(),
|
13276
|
+
}), o.onDidChangeModelContent((p) => {
|
13277
|
+
a("change", o?.getValue(), p);
|
13245
13278
|
}), o.onDidBlurEditorText(c);
|
13246
13279
|
};
|
13247
13280
|
return dn(() => {
|
13248
|
-
ct(
|
13281
|
+
ct(m);
|
13249
13282
|
}), $s(() => {
|
13250
13283
|
o && o.dispose();
|
13251
13284
|
}), te(
|
13252
13285
|
() => s.modelValue,
|
13253
|
-
(
|
13254
|
-
o && o.setValue(
|
13286
|
+
(p) => {
|
13287
|
+
o && o.setValue(p);
|
13255
13288
|
}
|
13256
|
-
), t({ getEditor: () => o }), (
|
13289
|
+
), t({ getEditor: () => o }), (p, v) => (u(), D("div", {
|
13257
13290
|
class: be(["v-code-editor", { "is-border": s.border }]),
|
13258
13291
|
ref_key: "container",
|
13259
13292
|
ref: l,
|
@@ -13275,10 +13308,10 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13275
13308
|
}, c = async () => {
|
13276
13309
|
const g = l.value.getEditor().getValue();
|
13277
13310
|
if (!g) return;
|
13278
|
-
const
|
13279
|
-
|
13311
|
+
const p = await e.updateChatDsl(g).catch((v) => (Array.isArray(v) ? Ee(v.join(",")) : Ee(v?.message || "代码错误"), null));
|
13312
|
+
p && o.value.getEditor().setValue(JSON.stringify(p, null, 2));
|
13280
13313
|
};
|
13281
|
-
return (
|
13314
|
+
return (m, g) => (u(), y(n(Vt), {
|
13282
13315
|
title: "AI生成内容",
|
13283
13316
|
maximizable: "",
|
13284
13317
|
submit: "应用到页面",
|
@@ -13394,7 +13427,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13394
13427
|
});
|
13395
13428
|
}, c = () => {
|
13396
13429
|
e.value = !1;
|
13397
|
-
},
|
13430
|
+
}, m = async () => {
|
13398
13431
|
const v = await t.createOrder();
|
13399
13432
|
v?.success && (s.value = !0, a.value = v.data);
|
13400
13433
|
}, g = async () => {
|
@@ -13402,7 +13435,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13402
13435
|
type: "success",
|
13403
13436
|
confirmButtonText: "再等等"
|
13404
13437
|
}).catch(() => null);
|
13405
|
-
},
|
13438
|
+
}, p = async () => {
|
13406
13439
|
await $t("您确定取消该订单?", {
|
13407
13440
|
confirmButtonText: "确认取消",
|
13408
13441
|
cancelButtonText: "再想想"
|
@@ -13427,7 +13460,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13427
13460
|
icon: n(Yr),
|
13428
13461
|
type: "primary",
|
13429
13462
|
round: "",
|
13430
|
-
onClick:
|
13463
|
+
onClick: m
|
13431
13464
|
}, {
|
13432
13465
|
default: b(() => [
|
13433
13466
|
h[2] || (h[2] = Q(" 立即开通 ")),
|
@@ -13478,7 +13511,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13478
13511
|
d(n(ce), {
|
13479
13512
|
text: "",
|
13480
13513
|
type: "info",
|
13481
|
-
onClick:
|
13514
|
+
onClick: p
|
13482
13515
|
}, {
|
13483
13516
|
default: b(() => h[11] || (h[11] = [
|
13484
13517
|
Q("取消")
|
@@ -13584,9 +13617,9 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13584
13617
|
onPostTopic: o,
|
13585
13618
|
chats: i,
|
13586
13619
|
currentTopic: c,
|
13587
|
-
onPostChat:
|
13620
|
+
onPostChat: m,
|
13588
13621
|
topics: g,
|
13589
|
-
loadChats:
|
13622
|
+
loadChats: p,
|
13590
13623
|
onRemoveTopic: v,
|
13591
13624
|
onView: h,
|
13592
13625
|
onRefresh: f,
|
@@ -13650,7 +13683,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13650
13683
|
}
|
13651
13684
|
s.value = !0, lt.value = !1;
|
13652
13685
|
}, zt = (Rt) => {
|
13653
|
-
lt.value = !1, s.value = !1, c.value = Rt,
|
13686
|
+
lt.value = !1, s.value = !1, c.value = Rt, p(Rt.id);
|
13654
13687
|
};
|
13655
13688
|
return (Rt, ft) => (u(), y(n(fe), {
|
13656
13689
|
class: "v-ai-widget__wrapper",
|
@@ -13801,7 +13834,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
13801
13834
|
"model-value": n(ne),
|
13802
13835
|
disabled: n(M),
|
13803
13836
|
"lock-model": "",
|
13804
|
-
onSend: n(
|
13837
|
+
onSend: n(m)
|
13805
13838
|
}, null, 8, ["models", "loading", "model", "model-value", "disabled", "onSend"])) : j("", !0),
|
13806
13839
|
ft[3] || (ft[3] = I("div", { class: "footer" }, "内容由 AI 生成,请仔细甄别", -1))
|
13807
13840
|
])
|
@@ -14863,6 +14896,20 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
14863
14896
|
to: "/"
|
14864
14897
|
}
|
14865
14898
|
}
|
14899
|
+
},
|
14900
|
+
{
|
14901
|
+
name: "RouterView",
|
14902
|
+
label: "路由视图",
|
14903
|
+
categoryId: "components",
|
14904
|
+
doc: "https://router.vuejs.org/zh/api/interfaces/RouterViewProps.html",
|
14905
|
+
package: "vue-router",
|
14906
|
+
props: [
|
14907
|
+
{
|
14908
|
+
name: "name",
|
14909
|
+
label: "name",
|
14910
|
+
setters: ["StringSetter"]
|
14911
|
+
}
|
14912
|
+
]
|
14866
14913
|
}
|
14867
14914
|
], ng = [
|
14868
14915
|
{
|
@@ -14911,16 +14958,16 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
14911
14958
|
}
|
14912
14959
|
);
|
14913
14960
|
const i = (c) => {
|
14914
|
-
const
|
14961
|
+
const m = {
|
14915
14962
|
type: "JSExpression",
|
14916
14963
|
value: c
|
14917
14964
|
};
|
14918
|
-
l(
|
14965
|
+
l(m) && a("change", m);
|
14919
14966
|
};
|
14920
|
-
return (c,
|
14967
|
+
return (c, m) => (u(), y(n($e), {
|
14921
14968
|
class: "v-expression-setter",
|
14922
14969
|
modelValue: o.value,
|
14923
|
-
"onUpdate:modelValue":
|
14970
|
+
"onUpdate:modelValue": m[0] || (m[0] = (g) => o.value = g),
|
14924
14971
|
onChange: i
|
14925
14972
|
}, {
|
14926
14973
|
prefix: b(() => [
|
@@ -15057,12 +15104,12 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15057
15104
|
c && (a.value = c.endsWith("px"), o.value = c);
|
15058
15105
|
},
|
15059
15106
|
{ immediate: !0 }
|
15060
|
-
), (c,
|
15107
|
+
), (c, m) => (u(), y(n(to), Je({
|
15061
15108
|
clearable: "",
|
15062
15109
|
unit: l.value,
|
15063
15110
|
"with-unit": !!l.value,
|
15064
15111
|
modelValue: o.value,
|
15065
|
-
"onUpdate:modelValue":
|
15112
|
+
"onUpdate:modelValue": m[0] || (m[0] = (g) => o.value = g),
|
15066
15113
|
onChange: i
|
15067
15114
|
}, c.$attrs), null, 16, ["unit", "with-unit", "modelValue"]));
|
15068
15115
|
}
|
@@ -15075,8 +15122,8 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15075
15122
|
},
|
15076
15123
|
emits: ["change", "update:modelValue"],
|
15077
15124
|
setup(r, { emit: t }) {
|
15078
|
-
const e = r, s = t, a = C([]), l = x(() => a.value.length < e.limit), o = (c) => c.type.includes("image") ? (no(c).then((
|
15079
|
-
a.value = [{ name: c.name, url:
|
15125
|
+
const e = r, s = t, a = C([]), l = x(() => a.value.length < e.limit), o = (c) => c.type.includes("image") ? (no(c).then((m) => {
|
15126
|
+
a.value = [{ name: c.name, url: m }];
|
15080
15127
|
}), !1) : (mt.error("只能上传图片"), !1), i = () => {
|
15081
15128
|
a.value = [];
|
15082
15129
|
};
|
@@ -15091,13 +15138,13 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15091
15138
|
), te(a, () => {
|
15092
15139
|
const c = a.value[0]?.url;
|
15093
15140
|
s("change", c), s("update:modelValue", c);
|
15094
|
-
}), (c,
|
15141
|
+
}), (c, m) => (u(), y(n(ns), Je({
|
15095
15142
|
class: ["v-image-setter", { "v-image-setter--addable": l.value }],
|
15096
15143
|
"list-type": "picture-card",
|
15097
15144
|
limit: 1,
|
15098
15145
|
action: "#",
|
15099
15146
|
"file-list": a.value,
|
15100
|
-
"onUpdate:fileList":
|
15147
|
+
"onUpdate:fileList": m[0] || (m[0] = (g) => a.value = g),
|
15101
15148
|
"before-upload": o,
|
15102
15149
|
"auto-upload": !0,
|
15103
15150
|
"on-remove": i
|
@@ -15134,7 +15181,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15134
15181
|
(u(!0), D(X, null, le(e.sections, (c) => (u(), y(Ho, {
|
15135
15182
|
name: c - 1,
|
15136
15183
|
modelValue: a.value[c - 1],
|
15137
|
-
"onUpdate:modelValue": (
|
15184
|
+
"onUpdate:modelValue": (m) => a.value[c - 1] = m,
|
15138
15185
|
onChange: l,
|
15139
15186
|
class: "v-section-setter__item"
|
15140
15187
|
}, null, 8, ["name", "modelValue", "onUpdate:modelValue"]))), 256))
|
@@ -15447,11 +15494,11 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15447
15494
|
), c = x(() => {
|
15448
15495
|
const h = za;
|
15449
15496
|
return o.value ? h.filter((f) => f.toLowerCase().includes(o.value)) : h;
|
15450
|
-
}),
|
15497
|
+
}), m = (h) => {
|
15451
15498
|
l.value = h;
|
15452
15499
|
}, g = () => {
|
15453
15500
|
e("change", l.value), e("update:modelValue", l.value), a.value = !1;
|
15454
|
-
},
|
15501
|
+
}, p = () => {
|
15455
15502
|
l.value = "", e("change", ""), e("update:modelValue", ""), a.value = !1;
|
15456
15503
|
}, v = () => {
|
15457
15504
|
a.value = !0;
|
@@ -15489,7 +15536,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15489
15536
|
d(n(ce), {
|
15490
15537
|
size: "default",
|
15491
15538
|
type: "warning",
|
15492
|
-
onClick:
|
15539
|
+
onClick: p
|
15493
15540
|
}, {
|
15494
15541
|
default: b(() => f[2] || (f[2] = [
|
15495
15542
|
Q(" 清除绑定 ")
|
@@ -15512,7 +15559,7 @@ const Zm = ["innerHTML"], ev = /* @__PURE__ */ B({
|
|
15512
15559
|
I("div", kg, [
|
15513
15560
|
I("div", Sg, [
|
15514
15561
|
(u(!0), D(X, null, le(c.value, (_) => (u(), D("i", {
|
15515
|
-
onClick: (w) =>
|
15562
|
+
onClick: (w) => m(_),
|
15516
15563
|
class: be([
|
15517
15564
|
l.value === _ ? "is-active" : "",
|
15518
15565
|
`van-icon-${_}`,
|
@@ -16072,9 +16119,9 @@ class Bg {
|
|
16072
16119
|
const { name: v, params: h = [] } = g[0];
|
16073
16120
|
return v === "default" && !h.length ? void 0 : g[0];
|
16074
16121
|
}
|
16075
|
-
const
|
16076
|
-
if (!(
|
16077
|
-
return
|
16122
|
+
const p = await Og(t.name, g).catch(() => null);
|
16123
|
+
if (!(p && p.name === "default" && (!p.params || p.params?.length === 0)))
|
16124
|
+
return p;
|
16078
16125
|
}
|
16079
16126
|
getVueInstance(t, e) {
|
16080
16127
|
const { el: s, model: a } = t, l = s.__context__?.__refs;
|
@@ -16086,24 +16133,24 @@ class Bg {
|
|
16086
16133
|
t.preventDefault();
|
16087
16134
|
const { engine: e, dragging: s, dropping: a, draggingNode: l } = this, o = e.current.value, i = this.getHelper(t);
|
16088
16135
|
if (!o || !s || !a.value || !i) return;
|
16089
|
-
const c = i.model,
|
16090
|
-
if (!await this.allowDrop(c,
|
16136
|
+
const c = i.model, m = a.value.type;
|
16137
|
+
if (!await this.allowDrop(c, m)) return;
|
16091
16138
|
let g;
|
16092
16139
|
if (l)
|
16093
16140
|
g = l;
|
16094
16141
|
else {
|
16095
|
-
const
|
16096
|
-
g = new Es(
|
16142
|
+
const p = this.createNodeDsl(s);
|
16143
|
+
g = new Es(p);
|
16097
16144
|
}
|
16098
16145
|
if (Pe(c))
|
16099
|
-
l ? (delete g.slot, o.move(g, void 0, "inner")) : o.addNode(g, void 0,
|
16146
|
+
l ? (delete g.slot, o.move(g, void 0, "inner")) : o.addNode(g, void 0, m);
|
16100
16147
|
else {
|
16101
|
-
const
|
16102
|
-
if (
|
16148
|
+
const p = await this.getDropSlot(m === "inner" ? c : c.parent);
|
16149
|
+
if (p === null) {
|
16103
16150
|
this.dropping.value = null;
|
16104
16151
|
return;
|
16105
16152
|
}
|
16106
|
-
g.slot =
|
16153
|
+
g.slot = p, l ? o.move(g, c, m) : o.addNode(g, c, m);
|
16107
16154
|
}
|
16108
16155
|
this.dropping.value = null, e.simulator.refresh(), e.assets.clearCaches();
|
16109
16156
|
}
|
@@ -16219,8 +16266,8 @@ class Bg {
|
|
16219
16266
|
(l ? Zs(l) : []).forEach((i) => {
|
16220
16267
|
const c = i?.$el || i;
|
16221
16268
|
if (c && c.getBoundingClientRect) {
|
16222
|
-
const
|
16223
|
-
e.push(
|
16269
|
+
const m = c.getBoundingClientRect();
|
16270
|
+
e.push(m);
|
16224
16271
|
}
|
16225
16272
|
});
|
16226
16273
|
}
|
@@ -16283,9 +16330,9 @@ class Bg {
|
|
16283
16330
|
if (Pe(t)) return !0;
|
16284
16331
|
if (l && t.id === l.id || l && l.isChild(t))
|
16285
16332
|
return !1;
|
16286
|
-
const i = a.assets.componentMap, c = e !== "inner" && t.parent || t,
|
16287
|
-
if (!
|
16288
|
-
const { parentIncludes: g = !0, name:
|
16333
|
+
const i = a.assets.componentMap, c = e !== "inner" && t.parent || t, m = await a.assets.getBlockMaterial(c.from) || i.get(c.name);
|
16334
|
+
if (!m) return !1;
|
16335
|
+
const { parentIncludes: g = !0, name: p } = s, { childIncludes: v = !0 } = m, h = g === !0 || Array.isArray(g) && g.includes(c.name), f = v === !0 || Array.isArray(v) && v.includes(p);
|
16289
16336
|
return h && f;
|
16290
16337
|
}
|
16291
16338
|
dispose() {
|
@@ -16360,16 +16407,16 @@ class Pg {
|
|
16360
16407
|
engineVersion: jn
|
16361
16408
|
},
|
16362
16409
|
t
|
16363
|
-
),
|
16364
|
-
if (
|
16410
|
+
), m = Hl(JSON.stringify(c));
|
16411
|
+
if (m.length > 1e3) {
|
16365
16412
|
const g = new URLSearchParams();
|
16366
|
-
g.append("data",
|
16413
|
+
g.append("data", m), window.fetch(this.api, {
|
16367
16414
|
method: "post",
|
16368
16415
|
body: g
|
16369
16416
|
}).catch(() => null);
|
16370
16417
|
} else
|
16371
16418
|
Xt(this.api, {
|
16372
|
-
query: { data:
|
16419
|
+
query: { data: m }
|
16373
16420
|
}).catch(() => null);
|
16374
16421
|
}
|
16375
16422
|
async init() {
|
@@ -16425,29 +16472,29 @@ class Mg {
|
|
16425
16472
|
}
|
16426
16473
|
t.use(this.provider), this.env.enhance && t.use(this.env.enhance, this.provider);
|
16427
16474
|
const i = Object.entries(s);
|
16428
|
-
Object.assign(t.config.globalProperties, a), i.forEach(([c,
|
16429
|
-
if (!
|
16475
|
+
Object.assign(t.config.globalProperties, a), i.forEach(([c, m]) => {
|
16476
|
+
if (!m) {
|
16430
16477
|
console.warn(`plugin: ${c} is undefined`);
|
16431
16478
|
return;
|
16432
16479
|
}
|
16433
|
-
if (typeof
|
16480
|
+
if (typeof m == "function" || typeof m.install == "function") {
|
16434
16481
|
let g = {};
|
16435
|
-
const
|
16436
|
-
|
16482
|
+
const p = o[c];
|
16483
|
+
p && (g.locale = p), t?.use(m, g);
|
16437
16484
|
}
|
16438
16485
|
});
|
16439
16486
|
}
|
16440
16487
|
createUniApp(t, e, s) {
|
16441
|
-
const { window: a, Vue: l } = this.env, { uniConfig: o = {}, homepage: i } = this.project || {}, { manifestJson: c, pagesJson:
|
16488
|
+
const { window: a, Vue: l } = this.env, { uniConfig: o = {}, homepage: i } = this.project || {}, { manifestJson: c, pagesJson: m, css: g } = o, p = kc(
|
16442
16489
|
o,
|
16443
16490
|
(f) => io(f, a, !1, !0)
|
16444
16491
|
), v = e.type === "block" ? "custom" : void 0, h = Sc({
|
16445
16492
|
Vue: l,
|
16446
16493
|
UniH5: a.UniH5,
|
16447
16494
|
window: a,
|
16448
|
-
App:
|
16495
|
+
App: p,
|
16449
16496
|
manifestJson: c,
|
16450
|
-
pagesJson:
|
16497
|
+
pagesJson: m,
|
16451
16498
|
css: g,
|
16452
16499
|
routes: [
|
16453
16500
|
{
|
@@ -16469,11 +16516,11 @@ class Mg {
|
|
16469
16516
|
createApp(t, e, s) {
|
16470
16517
|
const { window: a, container: l, Vue: o } = this.env, i = a.document.createElement("div");
|
16471
16518
|
i.id = "app", e.type === "page" && i.classList.add("is-page"), e.pure && i.classList.add("is-pure"), l.appendChild(i);
|
16472
|
-
const
|
16519
|
+
const m = o.defineComponent({
|
16473
16520
|
render() {
|
16474
16521
|
return o.h(o.Suspense, [o.h(s)]);
|
16475
16522
|
}
|
16476
|
-
}), g = o.createApp(
|
16523
|
+
}), g = o.createApp(m);
|
16477
16524
|
return this.install(g, t), Object.assign(
|
16478
16525
|
g.config.globalProperties.$route.meta,
|
16479
16526
|
e.meta || {}
|
@@ -16484,7 +16531,7 @@ class Mg {
|
|
16484
16531
|
this.file = e;
|
16485
16532
|
const { window: s, library: a, Vue: l, components: o, apis: i } = this.env;
|
16486
16533
|
this.dsl = l.reactive(t.toDsl());
|
16487
|
-
const { renderer: c, context:
|
16534
|
+
const { renderer: c, context: m } = this.provider.createDslRenderer(this.dsl, {
|
16488
16535
|
window: s,
|
16489
16536
|
mode: ro.Design,
|
16490
16537
|
Vue: l,
|
@@ -16494,13 +16541,13 @@ class Mg {
|
|
16494
16541
|
}), { platform: g = "web" } = this.project || {};
|
16495
16542
|
try {
|
16496
16543
|
this.app = g === "uniapp" ? this.createUniApp(g, e, c) : this.createApp(g, e, c);
|
16497
|
-
} catch (
|
16498
|
-
Ee(
|
16544
|
+
} catch (p) {
|
16545
|
+
Ee(p.message || "未知错误", "运行时错误"), console.error(p), this.report.error(p, {
|
16499
16546
|
project: this.project?.toDsl(),
|
16500
16547
|
file: t.toDsl()
|
16501
16548
|
});
|
16502
16549
|
}
|
16503
|
-
return this.context =
|
16550
|
+
return this.context = m, Ue.on(Tn, this.nodeChange), Ue.on(Ps, this.blockChange), this.app;
|
16504
16551
|
}
|
16505
16552
|
dispose() {
|
16506
16553
|
if (this.app) {
|
@@ -16623,9 +16670,9 @@ class zg extends lo {
|
|
16623
16670
|
scripts: o,
|
16624
16671
|
css: i,
|
16625
16672
|
materials: c,
|
16626
|
-
libraryExports:
|
16673
|
+
libraryExports: m,
|
16627
16674
|
materialExports: g,
|
16628
|
-
materialMapLibrary:
|
16675
|
+
materialMapLibrary: p,
|
16629
16676
|
libraryLocaleMap: v
|
16630
16677
|
} = vi(s, this.materialPath, !0), { js: h, css: f } = gi(
|
16631
16678
|
this.enhance?.urls || []
|
@@ -16645,9 +16692,9 @@ class zg extends lo {
|
|
16645
16692
|
${Aa([...o, ...h])}
|
16646
16693
|
${Aa(c)}
|
16647
16694
|
<script>
|
16648
|
-
__simulator__.emitReady(${JSON.stringify(
|
16695
|
+
__simulator__.emitReady(${JSON.stringify(m)},
|
16649
16696
|
${JSON.stringify(g)},
|
16650
|
-
${JSON.stringify(
|
16697
|
+
${JSON.stringify(p)},
|
16651
16698
|
${JSON.stringify(v)}
|
16652
16699
|
);
|
16653
16700
|
<\/script>
|
@@ -16656,7 +16703,7 @@ class zg extends lo {
|
|
16656
16703
|
}
|
16657
16704
|
async emitReady(e = [], s = [], a = {}, l = {}) {
|
16658
16705
|
this.renderer?.dispose(), this.renderer = null;
|
16659
|
-
const o = this.contentWindow, { assets: i, service: c, current:
|
16706
|
+
const o = this.contentWindow, { assets: i, service: c, current: m, provider: g, project: p, report: v } = this.engine, h = g.materials || {}, f = [];
|
16660
16707
|
for (const w of s) {
|
16661
16708
|
const E = h[w] ? (await h[w]()).default : o[w];
|
16662
16709
|
f.push(E);
|
@@ -16673,16 +16720,16 @@ class zg extends lo {
|
|
16673
16720
|
c,
|
16674
16721
|
g,
|
16675
16722
|
v,
|
16676
|
-
|
16723
|
+
p.value,
|
16677
16724
|
this.designer.value
|
16678
|
-
),
|
16725
|
+
), m.value && (this.renderer.render(m.value, p.value?.currentFile), this.rendered.value = Symbol()), this.triggerReady();
|
16679
16726
|
}
|
16680
16727
|
createEnv(e = [], s = {}, a = [], l = {}) {
|
16681
|
-
const o = this.contentWindow, { engine: i } = this, { project: c, assets:
|
16728
|
+
const o = this.contentWindow, { engine: i } = this, { project: c, assets: m, provider: g } = i, p = this.enhance ? o[this.enhance.name] : void 0, v = e.reduce((V, N) => (V[N] = o[N], V), {}), h = {};
|
16682
16729
|
Object.entries(l).forEach(([V, N]) => {
|
16683
16730
|
h[V] = o[N];
|
16684
16731
|
});
|
16685
|
-
const f = {}, { groups: _, componentMap: w } =
|
16732
|
+
const f = {}, { groups: _, componentMap: w } = m;
|
16686
16733
|
for (const V of _.value) {
|
16687
16734
|
const N = V.names || [];
|
16688
16735
|
if (V.name === Xn)
|
@@ -16717,7 +16764,7 @@ class zg extends lo {
|
|
16717
16764
|
globals: k,
|
16718
16765
|
libraryLocaleMap: l,
|
16719
16766
|
locales: h,
|
16720
|
-
enhance:
|
16767
|
+
enhance: p
|
16721
16768
|
};
|
16722
16769
|
}
|
16723
16770
|
refresh() {
|
@@ -16762,19 +16809,19 @@ class Lg {
|
|
16762
16809
|
parseGroups(t) {
|
16763
16810
|
const e = [];
|
16764
16811
|
for (let s of t) {
|
16765
|
-
const { categories: a, components: l, label: o, name: i, library: c, hidden:
|
16766
|
-
if (!a || !l ||
|
16812
|
+
const { categories: a, components: l, label: o, name: i, library: c, hidden: m } = s;
|
16813
|
+
if (!a || !l || m)
|
16767
16814
|
continue;
|
16768
|
-
const g = l.filter((f) => !!f.package).map((f) => f.name),
|
16815
|
+
const g = l.filter((f) => !!f.package).map((f) => f.name), p = a.map(
|
16769
16816
|
(f) => this.getCateoryComponents(f, l)
|
16770
|
-
), v =
|
16817
|
+
), v = p.reduce((f, _) => _.count + f, 0), h = {
|
16771
16818
|
name: s.name,
|
16772
16819
|
label: o || i,
|
16773
16820
|
count: v,
|
16774
16821
|
names: g,
|
16775
16822
|
library: c,
|
16776
|
-
children:
|
16777
|
-
hidden:
|
16823
|
+
children: p,
|
16824
|
+
hidden: m
|
16778
16825
|
};
|
16779
16826
|
e.push(h);
|
16780
16827
|
}
|
@@ -16794,13 +16841,13 @@ class Lg {
|
|
16794
16841
|
t.id,
|
16795
16842
|
this.provider.project || void 0
|
16796
16843
|
), this.caches[t.id] = s), t.type === "UrlSchema" && t.url && (s = this.caches[t.url] || await this.provider.getDslByUrl(t.url), this.caches[t.url] = s), t.type === "Plugin") {
|
16797
|
-
const
|
16798
|
-
return
|
16844
|
+
const p = await this.service.getPluginMaterial(t);
|
16845
|
+
return p ? (p.name = e || p.name, p.from = t, this.componentMap.set(p.name, p), p) : null;
|
16799
16846
|
}
|
16800
16847
|
if (!s) return null;
|
16801
16848
|
s.name = e || s.name;
|
16802
|
-
const { id: a, name: l, slots: o, props: i, emits: c } = s,
|
16803
|
-
const v = Array.isArray(
|
16849
|
+
const { id: a, name: l, slots: o, props: i, emits: c } = s, m = (p) => {
|
16850
|
+
const v = Array.isArray(p) ? p : [p];
|
16804
16851
|
let h = [];
|
16805
16852
|
for (const f of v)
|
16806
16853
|
h = h.concat(
|
@@ -16812,12 +16859,12 @@ class Lg {
|
|
16812
16859
|
name: l,
|
16813
16860
|
// 如果没有定义插槽,不能放置子组件
|
16814
16861
|
childIncludes: o?.length ? void 0 : !1,
|
16815
|
-
props: (i || []).map((
|
16816
|
-
name:
|
16862
|
+
props: (i || []).map((p) => typeof p == "string" ? {
|
16863
|
+
name: p
|
16817
16864
|
} : {
|
16818
|
-
name:
|
16819
|
-
type:
|
16820
|
-
setters: p
|
16865
|
+
name: p.name,
|
16866
|
+
type: p.type,
|
16867
|
+
setters: m(p.type)
|
16821
16868
|
}),
|
16822
16869
|
events: c,
|
16823
16870
|
slots: o,
|
@@ -16927,9 +16974,9 @@ class Df extends lo {
|
|
16927
16974
|
globals: o = {},
|
16928
16975
|
dependencies: i,
|
16929
16976
|
materials: c,
|
16930
|
-
materialPath:
|
16977
|
+
materialPath: m = "./",
|
16931
16978
|
pageRouteName: g,
|
16932
|
-
adapter:
|
16979
|
+
adapter: p,
|
16933
16980
|
install: v,
|
16934
16981
|
access: h,
|
16935
16982
|
remote: f = Vo,
|
@@ -16937,20 +16984,20 @@ class Df extends lo {
|
|
16937
16984
|
openApi: w,
|
16938
16985
|
enhance: E = !1
|
16939
16986
|
} = this.options;
|
16940
|
-
this.container = s, this.service = a, this.openApi = w, this.adapter =
|
16987
|
+
this.container = s, this.service = a, this.openApi = w, this.adapter = p, this.provider = new wi({
|
16941
16988
|
mode: ro.Design,
|
16942
16989
|
globals: o,
|
16943
16990
|
project: l,
|
16944
16991
|
service: a,
|
16945
16992
|
dependencies: i,
|
16946
16993
|
materials: c,
|
16947
|
-
materialPath:
|
16948
|
-
adapter:
|
16994
|
+
materialPath: m,
|
16995
|
+
adapter: p,
|
16949
16996
|
pageRouteName: g,
|
16950
16997
|
install: v
|
16951
16998
|
}), this.assets = new Lg(this.service, this.provider), this.simulator = new zg({
|
16952
16999
|
engine: this,
|
16953
|
-
materialPath:
|
17000
|
+
materialPath: m,
|
16954
17001
|
enhance: this.getEnhanceConfig(E)
|
16955
17002
|
}), this.access = h || new _i({ alert: kt, ...Bc }), this.remote = f, this.report = new Pg(this.remote, this.access, this.service), this.checkVersion = _, this.bindEvents(), this.init(l).then(this.render.bind(this)), $s(this.dispose.bind(this));
|
16956
17003
|
}
|
@@ -17351,7 +17398,7 @@ const Qt = B({
|
|
17351
17398
|
this.skeletonRef && (this.skeletonRef.isPreview = !1);
|
17352
17399
|
}
|
17353
17400
|
}
|
17354
|
-
}),
|
17401
|
+
}), pe = B({
|
17355
17402
|
name: "SetterWrapper",
|
17356
17403
|
props: {
|
17357
17404
|
context: {
|
@@ -17438,9 +17485,9 @@ const Qt = B({
|
|
17438
17485
|
computedSetters: o,
|
17439
17486
|
computedOptions: i,
|
17440
17487
|
variable: c,
|
17441
|
-
changeValue:
|
17488
|
+
changeValue: m,
|
17442
17489
|
defaultSetter: g,
|
17443
|
-
removable:
|
17490
|
+
removable: p,
|
17444
17491
|
onRemove: v
|
17445
17492
|
} = this;
|
17446
17493
|
return Zt(Qg, {
|
@@ -17453,9 +17500,9 @@ const Qt = B({
|
|
17453
17500
|
defaultSetter: g,
|
17454
17501
|
variable: c,
|
17455
17502
|
value: l,
|
17456
|
-
removable:
|
17503
|
+
removable: p,
|
17457
17504
|
options: i,
|
17458
|
-
onChange:
|
17505
|
+
onChange: m,
|
17459
17506
|
onRemove: v
|
17460
17507
|
});
|
17461
17508
|
},
|
@@ -17481,7 +17528,7 @@ const Qt = B({
|
|
17481
17528
|
footerHeight: { default: "20px" }
|
17482
17529
|
},
|
17483
17530
|
setup(r, { expose: t }) {
|
17484
|
-
const e = r, { engine: s, loginBySign: a, isLogined: l } = nn(), o = C(!1), i = C(parseInt(e.leftWidth)), c = C(parseInt(e.rightWidth)),
|
17531
|
+
const e = r, { engine: s, loginBySign: a, isLogined: l } = nn(), o = C(!1), i = C(parseInt(e.leftWidth)), c = C(parseInt(e.rightWidth)), m = () => {
|
17485
17532
|
s.checkVersion && Ro((T) => {
|
17486
17533
|
Ee(
|
17487
17534
|
`VTJ 发布了版本 ${T},您可以通过重新安装依赖更新到最新版本`,
|
@@ -17498,7 +17545,7 @@ const Qt = B({
|
|
17498
17545
|
onEnd(T, R) {
|
17499
17546
|
i.value = R.elementWidth.value;
|
17500
17547
|
}
|
17501
|
-
},
|
17548
|
+
}, p = {
|
17502
17549
|
dirs: ["w"],
|
17503
17550
|
maxWidth: 600,
|
17504
17551
|
minWidth: 2,
|
@@ -17510,7 +17557,7 @@ const Qt = B({
|
|
17510
17557
|
}
|
17511
17558
|
}, v = C(), h = C(), f = C(), _ = C(), w = C(), E = C(), k = C(), A = C(), V = C(!1), N = C(!1);
|
17512
17559
|
return dn(async () => {
|
17513
|
-
s.remote && (await l() || await a()),
|
17560
|
+
s.remote && (await l() || await a()), m();
|
17514
17561
|
}), t({
|
17515
17562
|
brand: v,
|
17516
17563
|
toolbar: h,
|
@@ -17607,7 +17654,7 @@ const Qt = B({
|
|
17607
17654
|
_: 1
|
17608
17655
|
}, 8, ["width"])), [
|
17609
17656
|
[cn, N.value],
|
17610
|
-
[n(Ca),
|
17657
|
+
[n(Ca), p]
|
17611
17658
|
])
|
17612
17659
|
]),
|
17613
17660
|
_: 1
|
@@ -17656,10 +17703,10 @@ const Qt = B({
|
|
17656
17703
|
setup(r, { emit: t }) {
|
17657
17704
|
const e = r, s = t, a = C(!1), l = C(""), o = C(
|
17658
17705
|
e.setters.find((E) => E.name === e.defaultSetter) || e.setters[0]
|
17659
|
-
), i = C(e.value), c = x(() => !!un(i.value)),
|
17706
|
+
), i = C(e.value), c = x(() => !!un(i.value)), m = {
|
17660
17707
|
[o.value.name]: i.value
|
17661
17708
|
}, g = (E) => {
|
17662
|
-
|
17709
|
+
m[o.value.name] = i.value, o.value = E, i.value = m[E.name] ?? void 0, p(i.value);
|
17663
17710
|
};
|
17664
17711
|
te(
|
17665
17712
|
() => e.value,
|
@@ -17674,7 +17721,7 @@ const Qt = B({
|
|
17674
17721
|
) || e.setters[0];
|
17675
17722
|
}
|
17676
17723
|
);
|
17677
|
-
const
|
17724
|
+
const p = (E) => {
|
17678
17725
|
s("change", E);
|
17679
17726
|
}, v = () => {
|
17680
17727
|
s("remove", e.name);
|
@@ -17682,7 +17729,7 @@ const Qt = B({
|
|
17682
17729
|
a.value = !0, l.value = un(i.value) ? i.value.value : "";
|
17683
17730
|
}, f = () => {
|
17684
17731
|
a.value = !1, l.value = "";
|
17685
|
-
}, _ = async (E) => Qe(E, e.context, !0) ? (
|
17732
|
+
}, _ = async (E) => Qe(E, e.context, !0) ? (m[o.value.name] = i.value, i.value = E, s("change", E), !0) : !1, w = async () => {
|
17686
17733
|
await $t("确定要解除绑定吗?") && (f(), i.value = void 0, s("change", void 0));
|
17687
17734
|
};
|
17688
17735
|
return (E, k) => (u(), y(n(hn), {
|
@@ -17716,7 +17763,7 @@ const Qt = B({
|
|
17716
17763
|
options: e.options,
|
17717
17764
|
modelValue: i.value,
|
17718
17765
|
"onUpdate:modelValue": k[0] || (k[0] = (A) => i.value = A),
|
17719
|
-
onChange:
|
17766
|
+
onChange: p,
|
17720
17767
|
disabled: c.value
|
17721
17768
|
}), null, 16, ["current", "context", "options", "modelValue", "disabled"])),
|
17722
17769
|
c.value ? (u(), y(n($e), {
|
@@ -17880,8 +17927,8 @@ const Qt = B({
|
|
17880
17927
|
index: { default: 0 }
|
17881
17928
|
},
|
17882
17929
|
setup(r, { expose: t }) {
|
17883
|
-
const e = r, s = Ne(), { isLogined: a, toRemoteAuth: l } = nn(), { widgets: o, widgetsRef: i } = tn(e.region), c = x(() => o.value.filter((w) => w.openType === "panel")),
|
17884
|
-
|
17930
|
+
const e = r, s = Ne(), { isLogined: a, toRemoteAuth: l } = nn(), { widgets: o, widgetsRef: i } = tn(e.region), c = x(() => o.value.filter((w) => w.openType === "panel")), m = x(() => o.value.filter((w) => w.openType !== "panel")), g = c.value[e.index], p = C(g), v = C(g), h = (w) => {
|
17931
|
+
p.value = w, v.value = v.value?.name === w.name ? null : w;
|
17885
17932
|
}, f = (w) => {
|
17886
17933
|
w.openType === "link" && w.url && window.open(w.url), w.openType === "dialog" && Za({
|
17887
17934
|
title: w.label,
|
@@ -17893,12 +17940,12 @@ const Qt = B({
|
|
17893
17940
|
return te(v, (w) => {
|
17894
17941
|
s.skeleton?.toggleCollapse(!w);
|
17895
17942
|
}), t({
|
17896
|
-
active:
|
17943
|
+
active: p,
|
17897
17944
|
widgets: o,
|
17898
17945
|
widgetsRef: i,
|
17899
17946
|
setActive: (w) => {
|
17900
17947
|
const E = c.value.find((k) => k.name === w);
|
17901
|
-
|
17948
|
+
p.value = E, v.value = E;
|
17902
17949
|
}
|
17903
17950
|
}), (w, E) => (u(), D("div", of, [
|
17904
17951
|
I("div", lf, [
|
@@ -17907,13 +17954,13 @@ const Qt = B({
|
|
17907
17954
|
key: `icon-${k.name}`,
|
17908
17955
|
icon: k.icon,
|
17909
17956
|
label: k.label,
|
17910
|
-
active:
|
17957
|
+
active: p.value?.name === k.name,
|
17911
17958
|
open: v.value?.name === k.name,
|
17912
17959
|
onClick: (A) => h(k)
|
17913
17960
|
}, null, 8, ["icon", "label", "active", "open", "onClick"]))), 128))
|
17914
17961
|
]),
|
17915
17962
|
I("div", cf, [
|
17916
|
-
(u(!0), D(X, null, le(
|
17963
|
+
(u(!0), D(X, null, le(m.value, (k) => (u(), y(n(Oa), {
|
17917
17964
|
key: `icon-${k.name}`,
|
17918
17965
|
icon: k.icon,
|
17919
17966
|
label: k.label,
|
@@ -17925,7 +17972,7 @@ const Qt = B({
|
|
17925
17972
|
(u(!0), D(X, null, le(c.value, (k) => (u(), y(Ha, {
|
17926
17973
|
key: k.name
|
17927
17974
|
}, [
|
17928
|
-
|
17975
|
+
p.value?.name === k.name ? (u(), y(n(sn), {
|
17929
17976
|
key: 0,
|
17930
17977
|
ref_for: !0,
|
17931
17978
|
ref_key: "widgetsRef",
|
@@ -17957,18 +18004,18 @@ const Qt = B({
|
|
17957
18004
|
), i = x(() => o?.filter((k) => !k.closable || k.checked)), c = x(() => o.map((k) => ({
|
17958
18005
|
...k,
|
17959
18006
|
disabled: !k.closable
|
17960
|
-
}))),
|
17961
|
-
if (
|
18007
|
+
}))), m = C(i.value[0]?.name), g = x(() => {
|
18008
|
+
if (m.value === "Designer")
|
17962
18009
|
return l.value;
|
17963
|
-
}),
|
18010
|
+
}), p = x(() => o.find((A) => A.name === m.value)?.props || {}), v = (k) => {
|
17964
18011
|
const A = o.find((V) => V.name === k);
|
17965
|
-
A && (A.checked = !1),
|
18012
|
+
A && (A.checked = !1), m.value === k && (m.value = i.value[0]?.name);
|
17966
18013
|
}, h = (k) => {
|
17967
18014
|
const A = o.find((V) => V.name === k.name);
|
17968
|
-
A && A.closable && (A.checked = !A.checked, A.checked && (
|
18015
|
+
A && A.closable && (A.checked = !A.checked, A.checked && (m.value = A.name), !A.checked && m.value === A.name && (m.value = i.value[0]?.name));
|
17969
18016
|
}, f = (k, A = {}) => {
|
17970
18017
|
const V = o.find((N) => N.name === k);
|
17971
|
-
V && (V.props = Object.assign({}, V.props, A), V.checked = !0,
|
18018
|
+
V && (V.props = Object.assign({}, V.props, A), V.checked = !0, m.value = V.name);
|
17972
18019
|
}, _ = (k) => {
|
17973
18020
|
if (a.value) {
|
17974
18021
|
const A = a.value[0]?.widgetRef;
|
@@ -17981,20 +18028,20 @@ const Qt = B({
|
|
17981
18028
|
}
|
17982
18029
|
};
|
17983
18030
|
return t({
|
17984
|
-
currentTab:
|
18031
|
+
currentTab: m,
|
17985
18032
|
widgets: s,
|
17986
18033
|
widgetsRef: a,
|
17987
18034
|
openTab: f,
|
17988
18035
|
reload: () => {
|
17989
|
-
|
18036
|
+
m.value === "Designer" && (l.value = Symbol());
|
17990
18037
|
},
|
17991
|
-
isDesignerActive: () =>
|
18038
|
+
isDesignerActive: () => m.value === "Designer"
|
17992
18039
|
}), (k, A) => (u(), y(n(ps), {
|
17993
18040
|
class: "v-workspace-region",
|
17994
18041
|
items: i.value,
|
17995
18042
|
menus: c.value,
|
17996
|
-
modelValue:
|
17997
|
-
"onUpdate:modelValue": A[0] || (A[0] = (V) =>
|
18043
|
+
modelValue: m.value,
|
18044
|
+
"onUpdate:modelValue": A[0] || (A[0] = (V) => m.value = V),
|
17998
18045
|
checkable: "",
|
17999
18046
|
onRemove: v,
|
18000
18047
|
onCommand: h,
|
@@ -18004,13 +18051,13 @@ const Qt = B({
|
|
18004
18051
|
(u(!0), D(X, null, le(n(s), (V) => (u(), D(X, {
|
18005
18052
|
key: V.name
|
18006
18053
|
}, [
|
18007
|
-
|
18054
|
+
m.value === V.name ? (u(), y(n(sn), {
|
18008
18055
|
ref_for: !0,
|
18009
18056
|
ref_key: "widgetsRef",
|
18010
18057
|
ref: a,
|
18011
18058
|
key: g.value,
|
18012
18059
|
region: k.region,
|
18013
|
-
widget: { ...V, props:
|
18060
|
+
widget: { ...V, props: p.value }
|
18014
18061
|
}, null, 8, ["region", "widget"])) : j("", !0)
|
18015
18062
|
], 64))), 128))
|
18016
18063
|
]),
|
@@ -18026,7 +18073,7 @@ const Qt = B({
|
|
18026
18073
|
setup(r, { expose: t }) {
|
18027
18074
|
const e = r, s = Ne(), { current: a } = Xe(), { selected: l, isSelectBlock: o } = It(), i = x(
|
18028
18075
|
() => o.value ? _t.Block : _t.Node
|
18029
|
-
), { widgets: c, widgetsRef:
|
18076
|
+
), { widgets: c, widgetsRef: m } = tn(e.region, i), g = C(), p = C(!1), v = x(() => c.value.map((w) => ({
|
18030
18077
|
name: w.name,
|
18031
18078
|
label: w.label,
|
18032
18079
|
actions: w.name === "Style" ? [
|
@@ -18049,7 +18096,7 @@ const Qt = B({
|
|
18049
18096
|
},
|
18050
18097
|
{ immediate: !0 }
|
18051
18098
|
), te(g, () => {
|
18052
|
-
|
18099
|
+
p.value = !1;
|
18053
18100
|
});
|
18054
18101
|
const f = () => {
|
18055
18102
|
if (h.value) {
|
@@ -18059,11 +18106,11 @@ const Qt = B({
|
|
18059
18106
|
});
|
18060
18107
|
}
|
18061
18108
|
}, _ = (w) => {
|
18062
|
-
w.name === "switch" && (
|
18109
|
+
w.name === "switch" && (p.value = !p.value);
|
18063
18110
|
};
|
18064
18111
|
return t({
|
18065
18112
|
widgets: c,
|
18066
|
-
widgetsRef:
|
18113
|
+
widgetsRef: m
|
18067
18114
|
}), (w, E) => n(a) ? (u(), y(n(fe), {
|
18068
18115
|
key: 0,
|
18069
18116
|
class: "v-settings-region",
|
@@ -18125,9 +18172,9 @@ const Qt = B({
|
|
18125
18172
|
key: 0,
|
18126
18173
|
ref_for: !0,
|
18127
18174
|
ref_key: "widgetsRef",
|
18128
|
-
ref:
|
18175
|
+
ref: m,
|
18129
18176
|
region: w.region,
|
18130
|
-
widget: n(Ys)({ props: { isStyleCodeMode:
|
18177
|
+
widget: n(Ys)({ props: { isStyleCodeMode: p.value } }, k)
|
18131
18178
|
}, null, 8, ["region", "widget"])) : j("", !0)
|
18132
18179
|
], 64))), 128))
|
18133
18180
|
]),
|
@@ -18191,11 +18238,11 @@ const Qt = B({
|
|
18191
18238
|
currentTab: i,
|
18192
18239
|
widgets: s,
|
18193
18240
|
widgetsRef: a
|
18194
|
-
}), (c,
|
18241
|
+
}), (c, m) => (u(), y(n(ps), {
|
18195
18242
|
class: "v-workspace-region",
|
18196
18243
|
items: o.value,
|
18197
18244
|
modelValue: i.value,
|
18198
|
-
"onUpdate:modelValue":
|
18245
|
+
"onUpdate:modelValue": m[0] || (m[0] = (g) => i.value = g)
|
18199
18246
|
}, {
|
18200
18247
|
default: b(() => [
|
18201
18248
|
(u(!0), D(X, null, le(n(s), (g) => (u(), y(Ha, {
|
@@ -18262,7 +18309,7 @@ export {
|
|
18262
18309
|
Fg as a4,
|
18263
18310
|
Qt as a5,
|
18264
18311
|
sn as a6,
|
18265
|
-
|
18312
|
+
pe as a7,
|
18266
18313
|
kt as a8,
|
18267
18314
|
Ee as a9,
|
18268
18315
|
$t as aa,
|