@vtj/designer 0.12.58 → 0.12.60
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.
@@ -1,11 +1,11 @@
|
|
1
1
|
var bl = Object.defineProperty;
|
2
2
|
var yl = (r, t, e) => t in r ? bl(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
3
3
|
var te = (r, t, e) => yl(r, typeof t != "symbol" ? t + "" : t, e);
|
4
|
-
import { computed as x, unref as n, ref as C, watch as ne, reactive as
|
5
|
-
import { ElNotification as Gs, ElMessage as
|
4
|
+
import { computed as x, unref as n, ref as C, watch as ne, reactive as Vt, toValue as ht, shallowRef as bt, shallowReadonly as wl, onMounted as un, nextTick as dt, getCurrentScope as kl, onScopeDispose as _l, getCurrentInstance as Js, toRaw as Ws, defineComponent as M, createElementBlock as B, openBlock as u, normalizeClass as he, toDisplayString as oe, createVNode as p, withCtx as b, createElementVNode as V, createBlock as w, createCommentVNode as D, createTextVNode as $, mergeProps as He, h as tn, Fragment as Y, renderList as ie, defineAsyncComponent as Sl, resolveDynamicComponent as Wo, createSlots as Ho, renderSlot as Ut, withDirectives as Ct, vShow as rn, withModifiers as it, isRef as Kn, normalizeStyle as gn, inject as Hs, provide as Al, withKeys as Rt, normalizeProps as Qo, guardReactiveProps as Go, onUnmounted as Qs, markRaw as Ns, createApp as Ko, shallowReactive as Cl, triggerRef as Yt, KeepAlive as $o } from "vue";
|
5
|
+
import { ElNotification as Gs, ElMessage as yt, ElMessageBox as jt, ElButton as ce, ElDivider as pt, ElInput as Je, ElRadioGroup as qo, ElRadioButton as Cn, ElButtonGroup as El, ElSwitch as $n, ElImage as Dn, ElUpload as ss, ElDropdown as Yo, ElDropdownMenu as Xo, ElDropdownItem as Hn, ElEmpty as Pe, ElAlert as nn, ElTooltip as Zo, ElTag as Ks, ElTree as $s, ElCollapse as os, ElCollapseItem as as, ElRow as qn, ElCol as Yn, ElDrawer as qs, ElForm as rt, ElFormItem as fn, ElBreadcrumb as xl, ElBreadcrumbItem as Il, ElLoading as Vl, ElBadge as Rl, ElAvatar as ls, vLoading as Ys, ElSelect as ea, ElOption as ta, ElCheckbox as Xs, ElLink as na, ElSegmented as Tl, ElText as jl, ElDialog as Dl, ElSteps as Bl, ElStep as xs, ElInputNumber as Ol, ElColorPicker as Ml, ElSlider as Nl, ElConfigProvider as Pl, ElContainer as Ao, ElHeader as zl, ElAside as Co, ElMain as Ul, ElFooter as Ll } from "element-plus";
|
6
6
|
import Fl from "element-plus/es/locale/lang/zh-cn";
|
7
|
-
import { XDialogForm as
|
8
|
-
import { kebabCase as Wl, jsonp as Zt, groupBy as Vn, storage as bn, delay as en, dataURLtoBlob as Hl, fileToBase64 as la, upperFirstCamelCase as ia, toRawType as Is, cloneDeep as Bn, logger as
|
7
|
+
import { XDialogForm as Lt, XField as J, XIcon as mt, createDialog as sa, XDialog as Dt, XPanel as is, XAction as Be, XTabs as rs, XContainer as be, XForm as Zs, XAttachment as Jl, XActionBar as oa, XInputUnit as aa, vResizable as Eo } from "@vtj/ui";
|
8
|
+
import { kebabCase as Wl, jsonp as Zt, groupBy as Vn, storage as bn, delay as en, dataURLtoBlob as Hl, fileToBase64 as la, upperFirstCamelCase as ia, toRawType as Is, cloneDeep as Bn, logger as Ht, isPlainObject as Ql, merge as eo, toArray as to, debounce as ra, uuid as Gl, getClientInfo as Kl, base64 as $l, arrayToMap as ql, isBoolean as Yl } from "@vtj/utils";
|
9
9
|
import { BUILT_IN_NAME as Xn, isBlock as Ne, DirectiveModel as ca, createNodeFrom as Xl, BUILT_IN_VUE as xo, BUILT_IN_VUE_ROUTER as Zl, emitter as Fe, EVENT_PROJECT_ACTIVED as Ps, EVENT_NODE_CHANGE as Rn, NodeModel as Vs, EVENT_BLOCK_CHANGE as zs, Base as ua, BUILT_IN_LIBRARAY_MAP as ei, ProjectModel as ti, EVENT_PROJECT_CHANGE as ni, EVENT_PROJECT_BLOCKS_CHANGE as si, EVENT_PROJECT_PAGES_CHANGE as oi, EVENT_PROJECT_DEPS_CHANGE as ai, EVENT_PROJECT_PUBLISH as li, EVENT_PROJECT_FILE_PUBLISH as ii, EVENT_HISTORY_CHANGE as ri, EVENT_HISTORY_LOAD as ci, EVENT_PROJECT_GEN_SOURCE as ui, BlockModel as Rs, HistoryModel as di } from "@vtj/core";
|
10
10
|
import { parseExpression as Tn, parseFunction as da, BUILT_IN_DIRECTIVES as pi, JSCodeToString as yn, LIFE_CYCLES_LIST as mi, DATA_TYPES as vi, createMock as gi, isJSExpression as cn, REMOTE as pa, HTML_TAGS as fi, clearLoaderCache as Io, ContextMode as ma, parseDeps as hi, parseUrls as bi, createAssetsCss as yi, createAssetScripts as Vo, getRawComponent as Ro, createSchemaApis as wi, mockCleanup as ki, mockApis as _i, Provider as Si, Access as Ai, ACCESS as Ci, isJSFunction as Ei } from "@vtj/renderer";
|
11
11
|
import * as xi from "@vtj/icons";
|
@@ -19,16 +19,16 @@ import { editor as Vc } 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.60
|
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.60", Rc = {
|
26
26
|
width: 390,
|
27
27
|
height: 844
|
28
28
|
}, Tc = {
|
29
29
|
width: 1024,
|
30
30
|
height: 768
|
31
|
-
},
|
31
|
+
}, Ft = /^[A-Za-z_$][\:\w_-]*$/, jc = /(\d+)\.(\d+)\.(\d+)/, Dc = [
|
32
32
|
"click",
|
33
33
|
"dblclick",
|
34
34
|
"mouseenter",
|
@@ -109,7 +109,7 @@ const jn = "0.12.58", Rc = {
|
|
109
109
|
"r",
|
110
110
|
"t"
|
111
111
|
].join(""), jo = "SESSION_ID__", Do = "ENGINE_STATE__", Lc = 8 * 1024, Fc = "https://lcdp.vtj.pro/page/17ikytmh";
|
112
|
-
var
|
112
|
+
var It = /* @__PURE__ */ ((r) => (r.Block = "block", r.Node = "node", r))(It || {}), Jc = /* @__PURE__ */ ((r) => (r.Brand = "Brand", r.Toolbar = "Toolbar", r.Actions = "Actions", r.Apps = "Apps", r.Workspace = "Workspace", r.Settings = "Settings", r.Status = "Status", r.Preview = "Preview", r))(Jc || {});
|
113
113
|
function ja() {
|
114
114
|
const r = Me(), t = x(() => r.project.value?.dependencies ?? []), e = x(() => r.project.value?.apis ?? []), s = x(() => r.project.value?.meta ?? []);
|
115
115
|
return {
|
@@ -157,7 +157,7 @@ function Gc() {
|
|
157
157
|
},
|
158
158
|
{ immediate: !0 }
|
159
159
|
);
|
160
|
-
const o =
|
160
|
+
const o = Vt({}), l = x(() => {
|
161
161
|
const d = {};
|
162
162
|
return e.value && e.value.forEach((m) => {
|
163
163
|
d[m.name] = m;
|
@@ -203,7 +203,7 @@ function Gc() {
|
|
203
203
|
searchResult: g
|
204
204
|
};
|
205
205
|
}
|
206
|
-
function
|
206
|
+
function Ze() {
|
207
207
|
const r = Me(), t = x(() => r.current.value), e = x(() => r.simulator.renderer?.context ?? null), s = x(() => r.isEmptyCurrent.value);
|
208
208
|
return {
|
209
209
|
engine: r,
|
@@ -285,7 +285,7 @@ function Yc(r) {
|
|
285
285
|
};
|
286
286
|
});
|
287
287
|
}
|
288
|
-
function
|
288
|
+
function Bt() {
|
289
289
|
const r = Me(), t = x(
|
290
290
|
() => r.simulator.designer.value
|
291
291
|
), e = x(() => t.value?.selected.value), s = x(() => Ne(e.value?.model));
|
@@ -297,8 +297,8 @@ function Dt() {
|
|
297
297
|
};
|
298
298
|
}
|
299
299
|
function Xc(r, t) {
|
300
|
-
const e = C(""), { selected: s, isSelectBlock: o } =
|
301
|
-
const c =
|
300
|
+
const e = C(""), { selected: s, isSelectBlock: o } = Bt(), l = x(() => s.value?.model.id), a = x(() => {
|
301
|
+
const c = ht(r), v = ht(t), g = [];
|
302
302
|
if (!c) return g;
|
303
303
|
const d = v?.__contextRefs[l.value || ""], f = v === d || o.value ? [] : Object.keys(d?.context || {}).filter((T) => !["context", "ref"].includes(T)).map((T) => `this.context.${T}`);
|
304
304
|
f.length && g.push({ title: "上下文", items: f });
|
@@ -433,8 +433,8 @@ function Zc(r) {
|
|
433
433
|
isExist: a
|
434
434
|
};
|
435
435
|
}
|
436
|
-
function
|
437
|
-
return
|
436
|
+
function ut(r, t) {
|
437
|
+
return jt.alert(r, {
|
438
438
|
title: "提示",
|
439
439
|
type: "warning",
|
440
440
|
...t
|
@@ -446,14 +446,14 @@ function xe(r, t = "提示") {
|
|
446
446
|
message: r
|
447
447
|
});
|
448
448
|
}
|
449
|
-
async function
|
450
|
-
return await
|
449
|
+
async function Qt(r, t) {
|
450
|
+
return await jt.confirm(r, "提示", {
|
451
451
|
type: "warning",
|
452
452
|
...t
|
453
453
|
}).catch(() => !1);
|
454
454
|
}
|
455
455
|
function De(r, t = "success") {
|
456
|
-
return
|
456
|
+
return yt({
|
457
457
|
message: r,
|
458
458
|
type: t
|
459
459
|
});
|
@@ -471,7 +471,7 @@ function eu(r) {
|
|
471
471
|
}
|
472
472
|
}), t;
|
473
473
|
}
|
474
|
-
function
|
474
|
+
function Xe(r, t, e = !1) {
|
475
475
|
let s = !0;
|
476
476
|
const o = eu(t);
|
477
477
|
try {
|
@@ -680,7 +680,7 @@ function lu(r) {
|
|
680
680
|
e.value?.setDirective(R);
|
681
681
|
},
|
682
682
|
onRemoveCustom: async (R) => {
|
683
|
-
await
|
683
|
+
await Qt("确定删除指令?") && e.value?.removeDirective(R);
|
684
684
|
},
|
685
685
|
onCustomChange: (R) => (j, W) => {
|
686
686
|
R.update({ [j]: W }), e.value?.setDirective(R);
|
@@ -796,7 +796,7 @@ function on() {
|
|
796
796
|
},
|
797
797
|
body: JSON.stringify(P)
|
798
798
|
}).then((ke) => ke.json()).catch(() => null);
|
799
|
-
return q?.success || await
|
799
|
+
return q?.success || await ut(q.message || "未知错误"), q;
|
800
800
|
},
|
801
801
|
getChats: async (P) => {
|
802
802
|
if (s?.getChats)
|
@@ -824,7 +824,7 @@ function on() {
|
|
824
824
|
},
|
825
825
|
body: JSON.stringify(P)
|
826
826
|
}).then((ke) => ke.json()).catch(() => null);
|
827
|
-
return q?.success || await
|
827
|
+
return q?.success || await ut(q.message || "未知错误"), q;
|
828
828
|
},
|
829
829
|
removeTopic: async (P) => {
|
830
830
|
if (s?.removeTopic)
|
@@ -837,46 +837,46 @@ function on() {
|
|
837
837
|
chatCompletions: async (P, L, H, q) => {
|
838
838
|
if (s?.chatCompletions)
|
839
839
|
return await s?.chatCompletions(P, L, H, q);
|
840
|
-
const ke = t?.getData()?.token, _e = `${e}/api/open/completions/${ke}?tid=${P}&id=${L}`, ze = new AbortController(),
|
841
|
-
if (!
|
842
|
-
const
|
843
|
-
if (
|
840
|
+
const ke = t?.getData()?.token, _e = `${e}/api/open/completions/${ke}?tid=${P}&id=${L}`, ze = new AbortController(), Et = ze.signal, kt = (tt) => {
|
841
|
+
if (!tt.startsWith("data: ")) return;
|
842
|
+
const Ge = tt.slice(6).trim();
|
843
|
+
if (Ge)
|
844
844
|
try {
|
845
|
-
const
|
846
|
-
H?.(
|
845
|
+
const ct = JSON.parse(Ge);
|
846
|
+
H?.(ct, !1);
|
847
847
|
} catch {
|
848
|
-
q?.(new Error(
|
848
|
+
q?.(new Error(Ge)), ze.abort();
|
849
849
|
}
|
850
|
-
},
|
851
|
-
const
|
852
|
-
|
850
|
+
}, qe = (tt) => {
|
851
|
+
const Ge = tt instanceof Error && tt.name === "AbortError", ct = tt instanceof Error ? tt : new Error(String(tt));
|
852
|
+
Ge || (q?.(ct, Ge), ze.abort());
|
853
853
|
};
|
854
|
-
let
|
855
|
-
const
|
854
|
+
let et = "";
|
855
|
+
const Ot = new TextDecoder();
|
856
856
|
return fetch(_e, {
|
857
857
|
method: "get",
|
858
|
-
signal:
|
859
|
-
}).then(async (
|
860
|
-
const
|
861
|
-
if (
|
858
|
+
signal: Et
|
859
|
+
}).then(async (tt) => {
|
860
|
+
const Ge = tt.body?.getReader();
|
861
|
+
if (Ge)
|
862
862
|
try {
|
863
863
|
for (; ; ) {
|
864
|
-
const { done:
|
865
|
-
if (
|
866
|
-
|
864
|
+
const { done: ct, value: _t } = await Ge.read();
|
865
|
+
if (ct) {
|
866
|
+
et && kt(et), H?.(null, !0);
|
867
867
|
break;
|
868
868
|
}
|
869
|
-
|
870
|
-
const
|
869
|
+
et += Ot.decode(_t, { stream: !0 });
|
870
|
+
const Mt = et.split(`
|
871
871
|
`);
|
872
|
-
|
873
|
-
for (const
|
874
|
-
|
872
|
+
et = Mt.pop() || "";
|
873
|
+
for (const vt of Mt)
|
874
|
+
kt(vt);
|
875
875
|
}
|
876
|
-
} catch (
|
877
|
-
|
876
|
+
} catch (ct) {
|
877
|
+
qe(ct);
|
878
878
|
}
|
879
|
-
}).catch(
|
879
|
+
}).catch(qe), () => ze.abort();
|
880
880
|
},
|
881
881
|
saveChat: async (P) => {
|
882
882
|
if (s?.saveChat)
|
@@ -912,7 +912,7 @@ function on() {
|
|
912
912
|
const P = t?.getData()?.token, L = `${e}/api/open/order/${P}`, H = await window.fetch(L, {
|
913
913
|
method: "post"
|
914
914
|
}).then((q) => q.json()).catch(() => null);
|
915
|
-
return H?.success || await
|
915
|
+
return H?.success || await ut(H.message || "未知错误"), H;
|
916
916
|
},
|
917
917
|
cancelOrder: async (P) => {
|
918
918
|
if (s?.cancelOrder)
|
@@ -943,7 +943,7 @@ function on() {
|
|
943
943
|
method: "post",
|
944
944
|
body: q
|
945
945
|
}).then((_e) => _e.json()).catch((_e) => _e);
|
946
|
-
return ke?.success || await
|
946
|
+
return ke?.success || await ut(ke.message || "未知错误"), ke;
|
947
947
|
},
|
948
948
|
postJsonTopic: async (P) => {
|
949
949
|
if (s?.postJsonTopic)
|
@@ -956,7 +956,7 @@ function on() {
|
|
956
956
|
method: "post",
|
957
957
|
body: q
|
958
958
|
}).then((_e) => _e.json()).catch((_e) => _e);
|
959
|
-
return ke?.success || await
|
959
|
+
return ke?.success || await ut(ke.message || "未知错误"), ke;
|
960
960
|
},
|
961
961
|
cancelChat: async (P) => {
|
962
962
|
if (s?.cancelChat)
|
@@ -981,20 +981,20 @@ function ru() {
|
|
981
981
|
const f = r.current.value, h = r.project.value;
|
982
982
|
if (!h) return;
|
983
983
|
if (!f) {
|
984
|
-
|
984
|
+
yt.warning({
|
985
985
|
message: "设计区无文件,请先打开页面或区块"
|
986
986
|
});
|
987
987
|
return;
|
988
988
|
}
|
989
989
|
const _ = await l(m);
|
990
990
|
if (!_)
|
991
|
-
return await
|
991
|
+
return await jt.alert("模板不可用,可能该模板没发布过版本", {
|
992
992
|
type: "error",
|
993
993
|
title: "提示"
|
994
994
|
});
|
995
995
|
const y = f.toDsl(), { id: I, name: k } = y, E = { ..._, id: I, name: k }, A = h.currentFile;
|
996
996
|
r.onSaveBlockFileFinish(() => {
|
997
|
-
f.update(E),
|
997
|
+
f.update(E), yt.success({
|
998
998
|
message: "模板已加载完成"
|
999
999
|
});
|
1000
1000
|
}), A && (A.market = {
|
@@ -1062,13 +1062,13 @@ function gu(r) {
|
|
1062
1062
|
return Js();
|
1063
1063
|
}
|
1064
1064
|
function fu(r, t = !0, e) {
|
1065
|
-
gu() ? un(r, e) : t ? r() :
|
1065
|
+
gu() ? un(r, e) : t ? r() : dt(r);
|
1066
1066
|
}
|
1067
1067
|
function hu(r, t, e = {}) {
|
1068
1068
|
const {
|
1069
1069
|
immediate: s = !0,
|
1070
1070
|
immediateCallback: o = !1
|
1071
|
-
} = e, l =
|
1071
|
+
} = e, l = bt(!1);
|
1072
1072
|
let a;
|
1073
1073
|
function i() {
|
1074
1074
|
a && (clearTimeout(a), a = void 0);
|
@@ -1079,7 +1079,7 @@ function hu(r, t, e = {}) {
|
|
1079
1079
|
function v(...g) {
|
1080
1080
|
o && r(), i(), l.value = !0, a = setTimeout(() => {
|
1081
1081
|
l.value = !1, a = void 0, r(...g);
|
1082
|
-
},
|
1082
|
+
}, ht(t));
|
1083
1083
|
}
|
1084
1084
|
return s && (l.value = !0, ds && v()), io(c), {
|
1085
1085
|
isPending: wl(l),
|
@@ -1098,26 +1098,26 @@ function bu(r, t, e) {
|
|
1098
1098
|
);
|
1099
1099
|
}
|
1100
1100
|
const ps = ds ? window : void 0, Oa = ds ? window.navigator : void 0;
|
1101
|
-
function
|
1101
|
+
function Tt(r) {
|
1102
1102
|
var t;
|
1103
|
-
const e =
|
1103
|
+
const e = ht(r);
|
1104
1104
|
return (t = e?.$el) != null ? t : e;
|
1105
1105
|
}
|
1106
1106
|
function xn(...r) {
|
1107
1107
|
const t = [], e = () => {
|
1108
1108
|
t.forEach((i) => i()), t.length = 0;
|
1109
1109
|
}, s = (i, c, v, g) => (i.addEventListener(c, v, g), () => i.removeEventListener(c, v, g)), o = x(() => {
|
1110
|
-
const i = Qn(
|
1110
|
+
const i = Qn(ht(r[0])).filter((c) => c != null);
|
1111
1111
|
return i.every((c) => typeof c != "string") ? i : void 0;
|
1112
1112
|
}), l = bu(
|
1113
1113
|
() => {
|
1114
1114
|
var i, c;
|
1115
1115
|
return [
|
1116
|
-
(c = (i = o.value) == null ? void 0 : i.map((v) =>
|
1117
|
-
Qn(
|
1116
|
+
(c = (i = o.value) == null ? void 0 : i.map((v) => Tt(v))) != null ? c : [ps].filter((v) => v != null),
|
1117
|
+
Qn(ht(o.value ? r[1] : r[0])),
|
1118
1118
|
Qn(n(o.value ? r[2] : r[1])),
|
1119
1119
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
1120
|
-
|
1120
|
+
ht(o.value ? r[3] : r[2])
|
1121
1121
|
];
|
1122
1122
|
},
|
1123
1123
|
([i, c, v, g]) => {
|
@@ -1149,24 +1149,24 @@ function yu(r, t, e = {}) {
|
|
1149
1149
|
Array.from(s.document.body.children).forEach((I) => I.addEventListener("click", vn, y)), s.document.documentElement.addEventListener("click", vn, y);
|
1150
1150
|
}
|
1151
1151
|
let c = !0;
|
1152
|
-
const v = (y) =>
|
1152
|
+
const v = (y) => ht(o).some((I) => {
|
1153
1153
|
if (typeof I == "string")
|
1154
1154
|
return Array.from(s.document.querySelectorAll(I)).some((k) => k === y.target || y.composedPath().includes(k));
|
1155
1155
|
{
|
1156
|
-
const k =
|
1156
|
+
const k = Tt(I);
|
1157
1157
|
return k && (y.target === k || y.composedPath().includes(k));
|
1158
1158
|
}
|
1159
1159
|
});
|
1160
1160
|
function g(y) {
|
1161
|
-
const I =
|
1161
|
+
const I = ht(y);
|
1162
1162
|
return I && I.$.subTree.shapeFlag === 16;
|
1163
1163
|
}
|
1164
1164
|
function d(y, I) {
|
1165
|
-
const k =
|
1165
|
+
const k = ht(y), E = k.$.subTree && k.$.subTree.children;
|
1166
1166
|
return E == null || !Array.isArray(E) ? !1 : E.some((A) => A.el === I.target || I.composedPath().includes(A.el));
|
1167
1167
|
}
|
1168
1168
|
const m = (y) => {
|
1169
|
-
const I =
|
1169
|
+
const I = Tt(r);
|
1170
1170
|
if (y.target != null && !(!(I instanceof Element) && g(r) && d(r, y)) && !(!I || I === y.target || y.composedPath().includes(I))) {
|
1171
1171
|
if ("detail" in y && y.detail === 0 && (c = !v(y)), !c) {
|
1172
1172
|
c = !0;
|
@@ -1183,13 +1183,13 @@ function yu(r, t, e = {}) {
|
|
1183
1183
|
}, 0), m(y));
|
1184
1184
|
}, { passive: !0, capture: l }),
|
1185
1185
|
xn(s, "pointerdown", (y) => {
|
1186
|
-
const I =
|
1186
|
+
const I = Tt(r);
|
1187
1187
|
c = !v(y) && !!(I && !y.composedPath().includes(I));
|
1188
1188
|
}, { passive: !0 }),
|
1189
1189
|
a && xn(s, "blur", (y) => {
|
1190
1190
|
setTimeout(() => {
|
1191
1191
|
var I;
|
1192
|
-
const k =
|
1192
|
+
const k = Tt(r);
|
1193
1193
|
((I = s.document.activeElement) == null ? void 0 : I.tagName) === "IFRAME" && !k?.contains(s.document.activeElement) && t(y);
|
1194
1194
|
}, 0);
|
1195
1195
|
}, { passive: !0 })
|
@@ -1205,7 +1205,7 @@ function yu(r, t, e = {}) {
|
|
1205
1205
|
} : _;
|
1206
1206
|
}
|
1207
1207
|
function wu() {
|
1208
|
-
const r =
|
1208
|
+
const r = bt(!1), t = Js();
|
1209
1209
|
return t && un(() => {
|
1210
1210
|
r.value = !0;
|
1211
1211
|
}, t), r;
|
@@ -1218,7 +1218,7 @@ function Oo(r, t = {}) {
|
|
1218
1218
|
const {
|
1219
1219
|
controls: e = !1,
|
1220
1220
|
navigator: s = Oa
|
1221
|
-
} = t, o = ro(() => s && "permissions" in s), l =
|
1221
|
+
} = t, o = ro(() => s && "permissions" in s), l = bt(), a = typeof r == "string" ? { name: r } : r, i = bt(), c = () => {
|
1222
1222
|
var g, d;
|
1223
1223
|
i.value = (d = (g = l.value) == null ? void 0 : g.state) != null ? d : "prompt";
|
1224
1224
|
};
|
@@ -1250,7 +1250,7 @@ function co(r = {}) {
|
|
1250
1250
|
source: s,
|
1251
1251
|
copiedDuring: o = 1500,
|
1252
1252
|
legacy: l = !1
|
1253
|
-
} = r, a = ro(() => t && "clipboard" in t), i = Oo("clipboard-read"), c = Oo("clipboard-write"), v = x(() => a.value || l), g =
|
1253
|
+
} = r, a = ro(() => t && "clipboard" in t), i = Oo("clipboard-read"), c = Oo("clipboard-write"), v = x(() => a.value || l), g = bt(""), d = bt(!1), m = hu(() => d.value = !1, o, { immediate: !1 });
|
1254
1254
|
async function f() {
|
1255
1255
|
let k = !(a.value && I(i.value));
|
1256
1256
|
if (!k)
|
@@ -1262,7 +1262,7 @@ function co(r = {}) {
|
|
1262
1262
|
k && (g.value = y());
|
1263
1263
|
}
|
1264
1264
|
v.value && e && xn(["copy", "cut"], f, { passive: !0 });
|
1265
|
-
async function h(k =
|
1265
|
+
async function h(k = ht(s)) {
|
1266
1266
|
if (v.value && k != null) {
|
1267
1267
|
let E = !(a.value && I(c.value));
|
1268
1268
|
if (!E)
|
@@ -1301,8 +1301,8 @@ function _u(r, t, e = {}) {
|
|
1301
1301
|
const a = ro(() => s && "ResizeObserver" in s), i = () => {
|
1302
1302
|
l && (l.disconnect(), l = void 0);
|
1303
1303
|
}, c = x(() => {
|
1304
|
-
const d =
|
1305
|
-
return Array.isArray(d) ? d.map((m) =>
|
1304
|
+
const d = ht(r);
|
1305
|
+
return Array.isArray(d) ? d.map((m) => Tt(m)) : [Tt(d)];
|
1306
1306
|
}), v = ne(
|
1307
1307
|
c,
|
1308
1308
|
(d) => {
|
@@ -1324,13 +1324,13 @@ function _u(r, t, e = {}) {
|
|
1324
1324
|
function wn(r, t = { width: 0, height: 0 }, e = {}) {
|
1325
1325
|
const { window: s = ps, box: o = "content-box" } = e, l = x(() => {
|
1326
1326
|
var d, m;
|
1327
|
-
return (m = (d =
|
1328
|
-
}), a =
|
1327
|
+
return (m = (d = Tt(r)) == null ? void 0 : d.namespaceURI) == null ? void 0 : m.includes("svg");
|
1328
|
+
}), a = bt(t.width), i = bt(t.height), { stop: c } = _u(
|
1329
1329
|
r,
|
1330
1330
|
([d]) => {
|
1331
1331
|
const m = o === "border-box" ? d.borderBoxSize : o === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
|
1332
1332
|
if (s && l.value) {
|
1333
|
-
const f =
|
1333
|
+
const f = Tt(r);
|
1334
1334
|
if (f) {
|
1335
1335
|
const h = f.getBoundingClientRect();
|
1336
1336
|
a.value = h.width, i.value = h.height;
|
@@ -1344,11 +1344,11 @@ function wn(r, t = { width: 0, height: 0 }, e = {}) {
|
|
1344
1344
|
e
|
1345
1345
|
);
|
1346
1346
|
fu(() => {
|
1347
|
-
const d =
|
1347
|
+
const d = Tt(r);
|
1348
1348
|
d && (a.value = "offsetWidth" in d ? d.offsetWidth : t.width, i.value = "offsetHeight" in d ? d.offsetHeight : t.height);
|
1349
1349
|
});
|
1350
1350
|
const v = ne(
|
1351
|
-
() =>
|
1351
|
+
() => Tt(r),
|
1352
1352
|
(d) => {
|
1353
1353
|
a.value = d ? t.width : 0, i.value = d ? t.height : 0;
|
1354
1354
|
}
|
@@ -1383,7 +1383,7 @@ function Su(r, t, e, s = {}) {
|
|
1383
1383
|
return ne(
|
1384
1384
|
() => r[t],
|
1385
1385
|
(O) => {
|
1386
|
-
T || (T = !0, A.value = y(O),
|
1386
|
+
T || (T = !0, A.value = y(O), dt(() => T = !1));
|
1387
1387
|
}
|
1388
1388
|
), ne(
|
1389
1389
|
A,
|
@@ -1459,137 +1459,149 @@ function Eu() {
|
|
1459
1459
|
postImageTopic: I,
|
1460
1460
|
postJsonTopic: k,
|
1461
1461
|
cancelChat: E
|
1462
|
-
} = on(), A = "CHAT_HIDE_CODE", T = t.skeleton?.getRegion("Apps").regionRef, O = C(!1), R = C(!1), j = C(!0), W = C(!1), X = Au("LLM", e), G = C([]), Z = C([]),
|
1463
|
-
const
|
1464
|
-
if (
|
1465
|
-
const we =
|
1466
|
-
we[0] &&
|
1462
|
+
} = on(), A = "CHAT_HIDE_CODE", T = t.skeleton?.getRegion("Apps").regionRef, O = C(!1), R = C(!1), j = C(!0), W = C(!1), X = Au("LLM", e), G = C([]), Z = C([]), U = C(null), ue = C(null), P = C(), L = C(), H = C(!!bn.get(A, { type: "local" })), q = C(""), ke = C(), _e = x(() => Z.value.some((z) => z.status === "Pending")), ze = x(() => ke.value ? ke.value.mode === 2 && !ke.value.invited : !0), { height: Et } = wn(P), kt = async (z) => {
|
1463
|
+
const le = await l(z);
|
1464
|
+
if (le && le.success) {
|
1465
|
+
const we = le.data || [];
|
1466
|
+
we[0] && U.value && (U.value.image && (we[0].image = _(U.value.image)), U.value.json && (we[0].json = y(U.value.json)), U.value.type && (we[0].type = U.value.type), U.value.dataType && (we[0].type = U.value.dataType)), Z.value = le.data;
|
1467
1467
|
}
|
1468
|
-
},
|
1469
|
-
if (O.value = !1, ke.value = await d(), !ke.value || !
|
1468
|
+
}, qe = async (z) => {
|
1469
|
+
if (O.value = !1, ke.value = await d(), !ke.value || !z || z.id === U.value?.fileId) return;
|
1470
1470
|
G.value = [], Z.value = [], j.value = !0;
|
1471
|
-
const
|
1472
|
-
|
1473
|
-
},
|
1471
|
+
const le = await o(z.id).catch(() => null);
|
1472
|
+
le && le.success && (G.value = le.data), G.value.length && (j.value = !1, U.value = G.value[0], await kt(U.value.id)), O.value = !0;
|
1473
|
+
}, et = async (z) => {
|
1474
1474
|
R.value = !0;
|
1475
|
-
const
|
1475
|
+
const le = await Cu(z, t), we = await s(le).catch(() => null);
|
1476
1476
|
if (R.value = !1, we && we.success) {
|
1477
1477
|
const { topic: Ce, chat: fe } = we.data;
|
1478
|
-
fe.type = Ce.type, Z.value = [], G.value.unshift(Ce), j.value = !1,
|
1479
|
-
const st =
|
1480
|
-
Z.value.push(st),
|
1481
|
-
|
1478
|
+
fe.type = Ce.type, Z.value = [], G.value.unshift(Ce), j.value = !1, U.value = Ce;
|
1479
|
+
const st = Vt(fe);
|
1480
|
+
Z.value.push(st), vt(st, (ot) => {
|
1481
|
+
z.auto && Jt(ot);
|
1482
1482
|
}), await en(0), L.value && L.value.scrollToBottom();
|
1483
1483
|
} else
|
1484
|
-
await
|
1484
|
+
await qe(null);
|
1485
1485
|
return we;
|
1486
|
-
},
|
1486
|
+
}, Ot = async (z) => {
|
1487
1487
|
R.value = !0;
|
1488
|
-
const
|
1488
|
+
const le = await Mo(z, t), we = await I(le);
|
1489
1489
|
if (R.value = !1, we && we.success) {
|
1490
1490
|
const { topic: Ce, chat: fe } = we.data;
|
1491
|
-
Z.value = [], G.value.unshift(Ce), j.value = !1,
|
1492
|
-
const st =
|
1493
|
-
Z.value.push(st),
|
1494
|
-
|
1491
|
+
Z.value = [], G.value.unshift(Ce), j.value = !1, U.value = Ce, Ce.image && (fe.image = _(Ce.image)), fe.type = Ce.type;
|
1492
|
+
const st = Vt(fe);
|
1493
|
+
Z.value.push(st), vt(st, (ot) => {
|
1494
|
+
if (ot.status === "Error" && ot.message)
|
1495
|
+
return Ge({
|
1496
|
+
model: z.model,
|
1497
|
+
auto: z.auto,
|
1498
|
+
prompt: ot.message
|
1499
|
+
});
|
1500
|
+
ot.status === "Success" && z.auto && Jt(ot);
|
1495
1501
|
}), await en(0), L.value && L.value.scrollToBottom();
|
1496
1502
|
} else
|
1497
|
-
await
|
1503
|
+
await qe(null);
|
1498
1504
|
return we;
|
1499
|
-
},
|
1505
|
+
}, tt = async (z) => {
|
1500
1506
|
R.value = !0;
|
1501
|
-
const
|
1507
|
+
const le = await Mo(z, t), we = await k(le);
|
1502
1508
|
if (R.value = !1, we && we.success) {
|
1503
1509
|
const { topic: Ce, chat: fe } = we.data;
|
1504
|
-
Z.value = [], G.value.unshift(Ce), j.value = !1,
|
1505
|
-
const st =
|
1506
|
-
Z.value.push(st),
|
1507
|
-
|
1510
|
+
Z.value = [], G.value.unshift(Ce), j.value = !1, U.value = Ce, Ce.image && (fe.image = _(Ce.image)), Ce.json && (fe.json = y(Ce.json)), fe.type = Ce.type, fe.dataType = Ce.dataType;
|
1511
|
+
const st = Vt(fe);
|
1512
|
+
Z.value.push(st), vt(st, (ot) => {
|
1513
|
+
if (ot.status === "Error" && ot.message)
|
1514
|
+
return Ge({
|
1515
|
+
model: z.model,
|
1516
|
+
auto: z.auto,
|
1517
|
+
prompt: ot.message
|
1518
|
+
});
|
1519
|
+
ot.status === "Success" && z.auto && Jt(ot);
|
1508
1520
|
}), await en(0), L.value && L.value.scrollToBottom();
|
1509
1521
|
} else
|
1510
|
-
await
|
1522
|
+
await qe(null);
|
1511
1523
|
return we;
|
1512
|
-
},
|
1513
|
-
if (!
|
1524
|
+
}, Ge = async (z) => {
|
1525
|
+
if (!U.value) return;
|
1514
1526
|
R.value = !0;
|
1515
|
-
const
|
1516
|
-
topicId:
|
1517
|
-
prompt:
|
1518
|
-
}, we = await a(
|
1527
|
+
const le = {
|
1528
|
+
topicId: U.value.id,
|
1529
|
+
prompt: z.prompt
|
1530
|
+
}, we = await a(le).catch(() => null);
|
1519
1531
|
if (R.value = !1, we && we.success) {
|
1520
|
-
const Ce =
|
1521
|
-
Z.value.push(Ce),
|
1532
|
+
const Ce = Vt(we.data);
|
1533
|
+
Z.value.push(Ce), vt(Ce, (fe) => {
|
1522
1534
|
if (fe.status === "Error" && fe.message)
|
1523
|
-
return
|
1524
|
-
...
|
1535
|
+
return Ge({
|
1536
|
+
...z,
|
1525
1537
|
prompt: fe.message
|
1526
1538
|
});
|
1527
|
-
fe.status === "Success" &&
|
1539
|
+
fe.status === "Success" && z.auto && Jt(fe);
|
1528
1540
|
}), await en(0), L.value && L.value.scrollToBottom();
|
1529
1541
|
} else
|
1530
|
-
await
|
1542
|
+
await qe(null);
|
1531
1543
|
return we;
|
1532
|
-
},
|
1533
|
-
const
|
1534
|
-
|
1535
|
-
},
|
1536
|
-
if (!
|
1537
|
-
const
|
1544
|
+
}, ct = async (z) => {
|
1545
|
+
const le = await i(z.id).catch(() => null);
|
1546
|
+
le && le.success && (G.value = G.value.filter((we) => we.id !== z.id), z.id === U.value?.id && (Z.value = [], U.value = null, j.value = !0));
|
1547
|
+
}, _t = async (z) => {
|
1548
|
+
if (!U.value) return;
|
1549
|
+
const le = U.value?.fileId, we = t.project.value?.toDsl(), { name: Ce = "" } = t.current.value || {}, fe = lt(z.content);
|
1538
1550
|
if (fe)
|
1539
1551
|
return await t.service.parseVue(we, {
|
1540
|
-
id:
|
1552
|
+
id: le,
|
1541
1553
|
name: Ce,
|
1542
1554
|
source: fe
|
1543
1555
|
});
|
1544
|
-
},
|
1545
|
-
let
|
1546
|
-
return Array.isArray(
|
1547
|
-
`,
|
1548
|
-
`)),
|
1549
|
-
},
|
1550
|
-
q.value = "",
|
1556
|
+
}, Mt = (z) => {
|
1557
|
+
let le = "";
|
1558
|
+
return Array.isArray(z) && (le += `页面存在以下错误,请检查并修复:
|
1559
|
+
`, le += z.join(`;
|
1560
|
+
`)), le || "代码有异常,请检查并修复";
|
1561
|
+
}, vt = async (z, le) => {
|
1562
|
+
q.value = "", z.content = "", z.reasoning = "", z.status = "Pending", z.reasoning = "", z.message = "";
|
1551
1563
|
let we = 0;
|
1552
1564
|
const Ce = Date.now();
|
1553
1565
|
return An = await c(
|
1554
|
-
|
1555
|
-
|
1566
|
+
z.topicId,
|
1567
|
+
z.id,
|
1556
1568
|
async (fe, st) => {
|
1557
1569
|
const _n = fe?.choices?.[0]?.delta;
|
1558
1570
|
if (_n) {
|
1559
|
-
const
|
1560
|
-
|
1571
|
+
const gt = _n.content || "", Kt = _n.reasoning_content || "";
|
1572
|
+
gt && (z.content += gt), Kt && (z.reasoning += Kt, we += Date.now() - Ce);
|
1561
1573
|
}
|
1562
1574
|
if (fe?.usage) {
|
1563
|
-
const
|
1564
|
-
if (
|
1565
|
-
return
|
1566
|
-
|
1575
|
+
const gt = fe.usage.completion_tokens || 0;
|
1576
|
+
if (gt >= Lc)
|
1577
|
+
return z.status = "Failed", z.message = `生成tokens数量达到了MAX_TOKENS【${gt}】已被截断!`, z.dsl = null, null;
|
1578
|
+
z.tokens = (z.tokens || 0) + (fe.usage.total_tokens || 0);
|
1567
1579
|
}
|
1568
1580
|
if (st) {
|
1569
|
-
|
1570
|
-
const
|
1571
|
-
if (
|
1581
|
+
z.status = "Success", z.thinking = Math.ceil(we / 1e3), z.vue = lt(z.content);
|
1582
|
+
const gt = await _t(z).catch((Kt) => (z.message = Mt(Kt), z.status = "Error", null));
|
1583
|
+
if (gt)
|
1572
1584
|
try {
|
1573
|
-
|
1585
|
+
z.dsl = typeof gt == "object" ? gt : JSON.parse(gt), Array.isArray(z.dsl) && (z.status = "Error", z.message = Mt(z.dsl), z.dsl = null);
|
1574
1586
|
} catch (Kt) {
|
1575
|
-
|
1587
|
+
z.dsl = null, z.status = "Error", z.message = Mt(Kt.message);
|
1576
1588
|
}
|
1577
|
-
await v(
|
1589
|
+
await v(z), le && le(z);
|
1578
1590
|
}
|
1579
1591
|
},
|
1580
1592
|
async (fe) => {
|
1581
|
-
(fe.message || fe.name || "未知错误") === "network error" ?
|
1593
|
+
(fe.message || fe.name || "未知错误") === "network error" ? z.message = "网络异常,请稍后再试" : z.message = "请求失败,请稍后再试", z.status = "Failed", console.warn("completions error", fe), fe?.message && xe(fe.message, "生成错误"), await v(z), le && le(z);
|
1582
1594
|
}
|
1583
1595
|
), An;
|
1584
|
-
},
|
1585
|
-
const
|
1586
|
-
return
|
1587
|
-
}, nt = async (
|
1588
|
-
if (!
|
1589
|
-
const
|
1590
|
-
id:
|
1596
|
+
}, lt = (z) => {
|
1597
|
+
const le = /```vue\n([\s\S]*?)\n```/;
|
1598
|
+
return z.match(le)?.[1] ?? "";
|
1599
|
+
}, nt = async (z) => {
|
1600
|
+
if (!U.value || !ue.value || !z) return;
|
1601
|
+
const le = U.value?.fileId, we = t.project.value?.toDsl(), { name: Ce = "" } = t.current.value || {}, fe = await t.service.parseVue(we, {
|
1602
|
+
id: le,
|
1591
1603
|
name: Ce,
|
1592
|
-
source:
|
1604
|
+
source: z
|
1593
1605
|
}).catch((st) => st);
|
1594
1606
|
if (Array.isArray(fe))
|
1595
1607
|
return Promise.reject(fe);
|
@@ -1599,78 +1611,78 @@ function Eu() {
|
|
1599
1611
|
ue.value.dsl = null;
|
1600
1612
|
}
|
1601
1613
|
return await v(ue.value), fe;
|
1602
|
-
},
|
1614
|
+
}, Gt = () => {
|
1603
1615
|
L.value && !j.value && L.value.scrollToTop();
|
1604
1616
|
}, vs = () => {
|
1605
1617
|
L.value && !j.value && L.value.scrollToBottom();
|
1606
1618
|
}, gs = () => {
|
1607
|
-
j.value || _e.value || Z.value.map((
|
1608
|
-
|
1619
|
+
j.value || _e.value || Z.value.map((z) => {
|
1620
|
+
z.collapsed = !1;
|
1609
1621
|
});
|
1610
1622
|
}, fs = () => {
|
1611
|
-
j.value || _e.value || Z.value.map((
|
1612
|
-
|
1623
|
+
j.value || _e.value || Z.value.map((z) => {
|
1624
|
+
z.collapsed = !0;
|
1613
1625
|
});
|
1614
|
-
}, hs = (
|
1626
|
+
}, hs = (z) => {
|
1615
1627
|
if (!_e.value)
|
1616
|
-
return
|
1617
|
-
|
1618
|
-
|
1619
|
-
},
|
1620
|
-
|
1621
|
-
},
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
}, Mn = async (
|
1628
|
-
if (!
|
1629
|
-
An && typeof An == "function" && An(),
|
1630
|
-
const
|
1631
|
-
|
1632
|
-
},
|
1633
|
-
q.value =
|
1628
|
+
return vt(z, (le) => {
|
1629
|
+
t.state.autoApply && Jt(le);
|
1630
|
+
});
|
1631
|
+
}, Jt = (z, le) => {
|
1632
|
+
z.dsl ? t.applyAI(z.dsl) : le && ut("DSL不完整,无法应用到页面"), W.value = !1, ue.value = null;
|
1633
|
+
}, bs = (z) => {
|
1634
|
+
z.vue = lt(z.content), ue.value = z, W.value = !0;
|
1635
|
+
}, ys = (z) => {
|
1636
|
+
if (!U.value) return;
|
1637
|
+
const le = z.message ? z.message : "请检查代码是否有错误,是否符合规则要求,并改正";
|
1638
|
+
Nt(le);
|
1639
|
+
}, Mn = async (z) => {
|
1640
|
+
if (!U.value) return;
|
1641
|
+
An && typeof An == "function" && An(), z.status = "Canceled";
|
1642
|
+
const le = await E(z);
|
1643
|
+
le && le.data && Object.assign(z, le.data);
|
1644
|
+
}, Nt = (z, le) => {
|
1645
|
+
q.value = z, le && (j.value = le);
|
1634
1646
|
}, Nn = () => {
|
1635
1647
|
j.value || (H.value = !H.value, bn.save(A, H.value, { type: "local" }));
|
1636
1648
|
};
|
1637
1649
|
return ne(
|
1638
1650
|
() => T?.active,
|
1639
|
-
(
|
1640
|
-
|
1651
|
+
(z) => {
|
1652
|
+
z.name === "AI" && qe(t.current.value);
|
1641
1653
|
},
|
1642
1654
|
{
|
1643
1655
|
immediate: !0
|
1644
1656
|
}
|
1645
|
-
), ne(t.current, (
|
1646
|
-
|
1647
|
-
}), ne(
|
1657
|
+
), ne(t.current, (z, le) => {
|
1658
|
+
z?.id !== le?.id && (U.value = null);
|
1659
|
+
}), ne(Et, () => {
|
1648
1660
|
L.value && _e.value && L.value.autoScrollToBottom();
|
1649
1661
|
}), {
|
1650
1662
|
engine: t,
|
1651
1663
|
isLogined: r,
|
1652
1664
|
isReady: O,
|
1653
|
-
init:
|
1665
|
+
init: qe,
|
1654
1666
|
loading: R,
|
1655
1667
|
isNewChat: j,
|
1656
1668
|
models: X,
|
1657
|
-
onPostTopic:
|
1669
|
+
onPostTopic: et,
|
1658
1670
|
topics: G,
|
1659
1671
|
chats: Z,
|
1660
|
-
currentTopic:
|
1661
|
-
onPostChat:
|
1662
|
-
loadChats:
|
1663
|
-
onRemoveTopic:
|
1664
|
-
getVueCode:
|
1665
|
-
vue2Dsl:
|
1672
|
+
currentTopic: U,
|
1673
|
+
onPostChat: Ge,
|
1674
|
+
loadChats: kt,
|
1675
|
+
onRemoveTopic: ct,
|
1676
|
+
getVueCode: lt,
|
1677
|
+
vue2Dsl: _t,
|
1666
1678
|
onRefresh: hs,
|
1667
|
-
onApply:
|
1679
|
+
onApply: Jt,
|
1668
1680
|
onView: bs,
|
1669
1681
|
listRef: P,
|
1670
1682
|
panelRef: L,
|
1671
1683
|
currentChat: ue,
|
1672
1684
|
showDetail: W,
|
1673
|
-
scrollToTop:
|
1685
|
+
scrollToTop: Gt,
|
1674
1686
|
scrollToBottom: vs,
|
1675
1687
|
expandAll: gs,
|
1676
1688
|
collapseAll: fs,
|
@@ -1678,7 +1690,7 @@ function Eu() {
|
|
1678
1690
|
toggleHideCode: Nn,
|
1679
1691
|
isHideCode: H,
|
1680
1692
|
onFix: ys,
|
1681
|
-
fillPromptInput:
|
1693
|
+
fillPromptInput: Nt,
|
1682
1694
|
promptText: q,
|
1683
1695
|
getHotTopics: g,
|
1684
1696
|
settings: ke,
|
@@ -1688,8 +1700,8 @@ function Eu() {
|
|
1688
1700
|
getOrder: h,
|
1689
1701
|
updateChatDsl: nt,
|
1690
1702
|
getImage: _,
|
1691
|
-
onPostImageTopic:
|
1692
|
-
onPostJsonTopic:
|
1703
|
+
onPostImageTopic: Ot,
|
1704
|
+
onPostJsonTopic: tt,
|
1693
1705
|
onCancelChat: Mn
|
1694
1706
|
};
|
1695
1707
|
}
|
@@ -1703,7 +1715,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1703
1715
|
link: {}
|
1704
1716
|
},
|
1705
1717
|
setup(r) {
|
1706
|
-
const { engine: t } =
|
1718
|
+
const { engine: t } = Ze(), e = r, s = x(() => e.icon || t.project.value?.config?.logo || xu), o = () => {
|
1707
1719
|
e.link && (location.href = e.link);
|
1708
1720
|
};
|
1709
1721
|
return (l, a) => (u(), B("div", {
|
@@ -1730,7 +1742,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1730
1742
|
__name: "index",
|
1731
1743
|
emits: ["click"],
|
1732
1744
|
setup(r, { emit: t }) {
|
1733
|
-
const e = t, { engine: s } =
|
1745
|
+
const e = t, { engine: s } = Ze(), o = x(() => s.project.value?.config?.title || s.project.value?.name), l = x(() => s.project.value?.currentFile?.title), a = () => {
|
1734
1746
|
e("click", s.project.value);
|
1735
1747
|
};
|
1736
1748
|
return (i, c) => (u(), B("div", Du, [
|
@@ -1742,7 +1754,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1742
1754
|
default: b(() => [
|
1743
1755
|
p(n(Ii), { class: "v-switcher-widget__back" }),
|
1744
1756
|
V("span", null, oe(o.value), 1),
|
1745
|
-
l.value ? (u(), w(n(
|
1757
|
+
l.value ? (u(), w(n(pt), {
|
1746
1758
|
key: 0,
|
1747
1759
|
direction: "vertical"
|
1748
1760
|
})) : D("", !0),
|
@@ -1782,12 +1794,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1782
1794
|
}, null, 8, ["modelValue"])
|
1783
1795
|
]));
|
1784
1796
|
}
|
1785
|
-
}),
|
1797
|
+
}), wt = (r, t) => {
|
1786
1798
|
const e = r.__vccOpts || r;
|
1787
1799
|
for (const [s, o] of t)
|
1788
1800
|
e[s] = o;
|
1789
1801
|
return e;
|
1790
|
-
}, Pu = /* @__PURE__ */
|
1802
|
+
}, Pu = /* @__PURE__ */ wt(Nu, [["__scopeId", "data-v-3f069bbf"]]), zu = { class: "v-toolbar-widget" }, Uu = /* @__PURE__ */ M({
|
1791
1803
|
name: "ToolbarWidget",
|
1792
1804
|
inheritAttrs: !1,
|
1793
1805
|
__name: "index",
|
@@ -1892,7 +1904,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1892
1904
|
]),
|
1893
1905
|
_: 1
|
1894
1906
|
}),
|
1895
|
-
p(n(
|
1907
|
+
p(n(pt), { direction: "vertical" }),
|
1896
1908
|
p(n($n), {
|
1897
1909
|
class: "v-toolbar-widget__outline",
|
1898
1910
|
size: "default",
|
@@ -1925,7 +1937,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1925
1937
|
dsl: {}
|
1926
1938
|
},
|
1927
1939
|
setup(r) {
|
1928
|
-
const t = r, { getTemplateCategories: e, publishTemplate: s, getTemplateById: o, engine: l } = on(), a =
|
1940
|
+
const t = r, { getTemplateCategories: e, publishTemplate: s, getTemplateById: o, engine: l } = on(), a = Vt({
|
1929
1941
|
name: t.name,
|
1930
1942
|
label: t.label,
|
1931
1943
|
share: !1
|
@@ -1938,13 +1950,13 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1938
1950
|
});
|
1939
1951
|
const v = x(() => c.value ? c.value : t.canvas ? t.canvas.toDataURL("image/png") : null), g = async () => {
|
1940
1952
|
if (!v.value)
|
1941
|
-
return await
|
1953
|
+
return await jt.alert("截图失败,无法完成发布", {
|
1942
1954
|
title: "提示",
|
1943
1955
|
type: "error"
|
1944
1956
|
}), !1;
|
1945
1957
|
const m = Hl(v.value), { dsl: f, id: h } = t;
|
1946
1958
|
let _;
|
1947
|
-
i.value && (_ = await
|
1959
|
+
i.value && (_ = await jt.confirm(
|
1948
1960
|
"该模板已存在,请确认您的操作是更新模板还是新建",
|
1949
1961
|
{
|
1950
1962
|
type: "warning",
|
@@ -1962,16 +1974,16 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
1962
1974
|
version: "",
|
1963
1975
|
platform: y,
|
1964
1976
|
...a
|
1965
|
-
}, k = await s(I).catch((E) => (
|
1977
|
+
}, k = await s(I).catch((E) => (yt.error({
|
1966
1978
|
message: E.message || E || "未知错误"
|
1967
1979
|
}), !1));
|
1968
|
-
return k && (
|
1980
|
+
return k && (yt.success({
|
1969
1981
|
message: "发布模板成功!"
|
1970
1982
|
}), l.skeleton?.getWidget("Templates")?.widgetRef.refreshTemplates()), !!k;
|
1971
1983
|
}, d = async (m) => {
|
1972
1984
|
m.raw ? c.value = await la(m.raw) : c.value = "";
|
1973
1985
|
};
|
1974
|
-
return (m, f) => (u(), w(n(
|
1986
|
+
return (m, f) => (u(), w(n(Lt), {
|
1975
1987
|
width: "600px",
|
1976
1988
|
height: "760px",
|
1977
1989
|
icon: n(Zn),
|
@@ -2018,7 +2030,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2018
2030
|
name: "name",
|
2019
2031
|
required: "",
|
2020
2032
|
rules: {
|
2021
|
-
pattern: n(
|
2033
|
+
pattern: n(Ft),
|
2022
2034
|
message: "名称格式不正确,要求英文字母大写驼峰格式"
|
2023
2035
|
}
|
2024
2036
|
}, null, 8, ["rules"]),
|
@@ -2059,7 +2071,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2059
2071
|
_: 1
|
2060
2072
|
}, 8, ["icon", "model"]));
|
2061
2073
|
}
|
2062
|
-
}), Ju = /* @__PURE__ */
|
2074
|
+
}), Ju = /* @__PURE__ */ wt(Fu, [["__scopeId", "data-v-54848d12"]]), Wu = { class: "x-coder-result" }, Hu = ["href"], Qu = /* @__PURE__ */ M({
|
2063
2075
|
__name: "coder",
|
2064
2076
|
props: {
|
2065
2077
|
link: {}
|
@@ -2084,7 +2096,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2084
2096
|
coder: { type: Boolean, default: !1 }
|
2085
2097
|
},
|
2086
2098
|
setup(r) {
|
2087
|
-
const t = r, { engine: e, designer: s } =
|
2099
|
+
const t = r, { engine: e, designer: s } = Bt(), { isLogined: o, toRemoteAuth: l } = on(), a = C(!1), i = C(!1), c = C(), v = () => {
|
2088
2100
|
e.current.value ? (a.value ? e.skeleton?.getWidget("Previewer")?.widgetRef.refresh() : (s.value?.setSelected(null), e.simulator.refresh()), De("刷新完成", "success")) : De("请先打开文件", "warning");
|
2089
2101
|
}, g = async () => {
|
2090
2102
|
e.current.value ? (a.value && (e.skeleton?.closePreview(), a.value = !1, await en(1e3)), s.value?.setSelected(e.current.value)) : De("请先打开文件", "warning");
|
@@ -2119,7 +2131,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2119
2131
|
dsl: e.current.value?.toDsl()
|
2120
2132
|
}, i.value = !0;
|
2121
2133
|
} else
|
2122
|
-
await
|
2134
|
+
await jt.confirm(
|
2123
2135
|
"发布到模板需登录系统,您还没登录或登录已过期,请重新登录!",
|
2124
2136
|
"提示",
|
2125
2137
|
{
|
@@ -2160,9 +2172,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2160
2172
|
const E = e.project.value?.locked, A = !!E;
|
2161
2173
|
if (await o()) {
|
2162
2174
|
const T = e.access?.getData();
|
2163
|
-
A ? T?.name && T.name === E ? (e.project.value?.unlock(T.name), De("项目已解除锁定")) :
|
2175
|
+
A ? T?.name && T.name === E ? (e.project.value?.unlock(T.name), De("项目已解除锁定")) : ut(`项目已被[ ${E} ]锁定`) : T?.name && (e.project.value?.lock(T.name), De("项目已锁定,只有你才能更改项目"));
|
2164
2176
|
} else
|
2165
|
-
await
|
2177
|
+
await jt.confirm(
|
2166
2178
|
`${A ? "解锁" : "锁定"}项目需要登录,您还没登录或已过期,请重新登录!`,
|
2167
2179
|
"提示",
|
2168
2180
|
{
|
@@ -2181,7 +2193,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2181
2193
|
onClick: k
|
2182
2194
|
}, {
|
2183
2195
|
default: b(() => [
|
2184
|
-
p(n(
|
2196
|
+
p(n(mt), { icon: n(Oi) }, null, 8, ["icon"])
|
2185
2197
|
]),
|
2186
2198
|
_: 1
|
2187
2199
|
}, 8, ["type"]),
|
@@ -2230,7 +2242,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2230
2242
|
]),
|
2231
2243
|
_: 1
|
2232
2244
|
})) : D("", !0),
|
2233
|
-
p(n(
|
2245
|
+
p(n(pt), { direction: "vertical" }),
|
2234
2246
|
t.coder ? (u(), w(n(ce), {
|
2235
2247
|
key: 3,
|
2236
2248
|
onClick: _,
|
@@ -2349,11 +2361,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2349
2361
|
onFocus: m
|
2350
2362
|
}, {
|
2351
2363
|
prepend: b(() => [
|
2352
|
-
p(n(
|
2364
|
+
p(n(mt), { icon: i.value }, null, 8, ["icon"])
|
2353
2365
|
]),
|
2354
2366
|
_: 1
|
2355
2367
|
}, 8, ["size", "model-value", "suffix-icon"]),
|
2356
|
-
o.value ? (u(), w(n(
|
2368
|
+
o.value ? (u(), w(n(Dt), {
|
2357
2369
|
key: 0,
|
2358
2370
|
title: "图标选择器",
|
2359
2371
|
width: "1000px",
|
@@ -2389,7 +2401,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2389
2401
|
placeholder: "请输入查询关键字"
|
2390
2402
|
}, null, 8, ["size", "prefix-icon", "modelValue"]),
|
2391
2403
|
V("div", Yu, [
|
2392
|
-
(u(!0), B(Y, null,
|
2404
|
+
(u(!0), B(Y, null, ie(c.value, (_) => (u(), w(n(mt), {
|
2393
2405
|
icon: _[1],
|
2394
2406
|
onClick: (y) => v(_[0]),
|
2395
2407
|
class: he({ "is-active": l.value === _[0] })
|
@@ -2403,7 +2415,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2403
2415
|
]));
|
2404
2416
|
}
|
2405
2417
|
}), Oe = Sl({
|
2406
|
-
loader: () => import("./Editor-
|
2418
|
+
loader: () => import("./Editor-NkZ1fFiU.js"),
|
2407
2419
|
loadingComponent: M({
|
2408
2420
|
render() {
|
2409
2421
|
return tn("div", "正在拼命加载...");
|
@@ -2422,7 +2434,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2422
2434
|
parentId: {}
|
2423
2435
|
},
|
2424
2436
|
setup(r) {
|
2425
|
-
const t = r, { project: e, engine: s } = pn(), { designer: o } =
|
2437
|
+
const t = r, { project: e, engine: s } = pn(), { designer: o } = Bt(), l = x(() => t.item ? "编辑页面" : "新增页面"), a = x(() => {
|
2426
2438
|
const { platform: E = "web" } = e.value || {};
|
2427
2439
|
return E === "web";
|
2428
2440
|
}), i = x(() => {
|
@@ -2469,11 +2481,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2469
2481
|
], _ = (E) => {
|
2470
2482
|
d.value && (d.value.name = ia(E));
|
2471
2483
|
}, y = async (E) => e.value?.existPageName(E.name, [E.id]) ? (xe("页面名称已存在,请更换"), !1) : (t.item ? (e.value?.updatePage(E), o.value?.setSelected(null), s.simulator.refresh()) : e.value?.createPage(E, t.parentId), !0), { copy: I } = co({}), k = (E) => {
|
2472
|
-
I(E),
|
2484
|
+
I(E), yt.success({
|
2473
2485
|
message: "已经复制到粘贴板"
|
2474
2486
|
});
|
2475
2487
|
};
|
2476
|
-
return (E, A) => (u(), w(n(
|
2488
|
+
return (E, A) => (u(), w(n(Lt), {
|
2477
2489
|
title: l.value,
|
2478
2490
|
width: "800px",
|
2479
2491
|
height: "650px",
|
@@ -2503,7 +2515,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2503
2515
|
p(n(nn), { closable: !1 }, {
|
2504
2516
|
default: b(() => [
|
2505
2517
|
$(oe(`${n(s).options.pageBasePath || ""}/${c.value}/${d.value.id}`) + " ", 1),
|
2506
|
-
p(n(
|
2518
|
+
p(n(mt), {
|
2507
2519
|
icon: n(fa),
|
2508
2520
|
onClick: A[0] || (A[0] = (T) => k(
|
2509
2521
|
`${n(s).options.pageBasePath || ""}/${c.value}/${d.value.id}`
|
@@ -2521,7 +2533,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2521
2533
|
required: "",
|
2522
2534
|
onChange: _,
|
2523
2535
|
rules: {
|
2524
|
-
pattern: n(
|
2536
|
+
pattern: n(Ft),
|
2525
2537
|
message: "名称格式不正确,要求英文驼峰格式"
|
2526
2538
|
}
|
2527
2539
|
}, null, 8, ["rules"]),
|
@@ -2804,7 +2816,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2804
2816
|
title: "保存",
|
2805
2817
|
onClick: f
|
2806
2818
|
}, null, 8, ["size", "icon"])) : D("", !0),
|
2807
|
-
s.collapsable ?
|
2819
|
+
s.collapsable ? Ct((u(), w(n(Be), {
|
2808
2820
|
key: 5,
|
2809
2821
|
size: A.$attrs.size,
|
2810
2822
|
mode: "icon",
|
@@ -2815,7 +2827,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2815
2827
|
}, null, 8, ["size", "icon"])), [
|
2816
2828
|
[rn, l.value]
|
2817
2829
|
]) : D("", !0),
|
2818
|
-
s.collapsable ?
|
2830
|
+
s.collapsable ? Ct((u(), w(n(Be), {
|
2819
2831
|
key: 6,
|
2820
2832
|
size: A.$attrs.size,
|
2821
2833
|
mode: "icon",
|
@@ -2826,17 +2838,17 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2826
2838
|
}, null, 8, ["size", "icon"])), [
|
2827
2839
|
[rn, !l.value]
|
2828
2840
|
]) : D("", !0),
|
2829
|
-
|
2841
|
+
Ut(A.$slots, "actions")
|
2830
2842
|
]),
|
2831
2843
|
default: b(() => [
|
2832
|
-
|
2844
|
+
Ut(A.$slots, "default")
|
2833
2845
|
]),
|
2834
2846
|
_: 2
|
2835
2847
|
}, [
|
2836
2848
|
A.$slots.footer ? {
|
2837
2849
|
name: "footer",
|
2838
2850
|
fn: b(() => [
|
2839
|
-
|
2851
|
+
Ut(A.$slots, "footer")
|
2840
2852
|
]),
|
2841
2853
|
key: "0"
|
2842
2854
|
} : void 0
|
@@ -2929,7 +2941,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2929
2941
|
])
|
2930
2942
|
]),
|
2931
2943
|
default: b(() => [
|
2932
|
-
|
2944
|
+
Ut(c.$slots, "default")
|
2933
2945
|
]),
|
2934
2946
|
_: 3
|
2935
2947
|
}));
|
@@ -2940,7 +2952,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2940
2952
|
}, nd = { class: "v-item__title-wrapper" }, sd = { class: "v-item__content" }, od = {
|
2941
2953
|
key: 3,
|
2942
2954
|
class: "v-item__tags"
|
2943
|
-
},
|
2955
|
+
}, $e = /* @__PURE__ */ M({
|
2944
2956
|
name: "VItem",
|
2945
2957
|
__name: "item",
|
2946
2958
|
props: {
|
@@ -3033,7 +3045,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3033
3045
|
})), v = () => {
|
3034
3046
|
o("click", s.modelValue);
|
3035
3047
|
}, g = async (m) => {
|
3036
|
-
m === "remove" ? await
|
3048
|
+
m === "remove" ? await jt.confirm("确定删除吗?", "提示", {
|
3037
3049
|
type: "warning"
|
3038
3050
|
}).catch(() => !1) && o("action", {
|
3039
3051
|
name: m,
|
@@ -3064,8 +3076,8 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3064
3076
|
align: "center"
|
3065
3077
|
}, {
|
3066
3078
|
default: b(() => [
|
3067
|
-
|
3068
|
-
m.icon ? (u(), w(n(
|
3079
|
+
Ut(m.$slots, "default", {}, () => [
|
3080
|
+
m.icon ? (u(), w(n(mt), {
|
3069
3081
|
key: 0,
|
3070
3082
|
icon: m.icon
|
3071
3083
|
}, null, 8, ["icon"])) : D("", !0),
|
@@ -3089,7 +3101,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3089
3101
|
}, oe(m.subtitle), 3)) : D("", !0)
|
3090
3102
|
]),
|
3091
3103
|
s.textTags ? (u(), B("div", od, [
|
3092
|
-
(u(!0), B(Y, null,
|
3104
|
+
(u(!0), B(Y, null, ie(s.textTags, (h) => (u(), B("span", null, oe(h), 1))), 256))
|
3093
3105
|
])) : D("", !0)
|
3094
3106
|
])
|
3095
3107
|
]),
|
@@ -3097,17 +3109,17 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3097
3109
|
}),
|
3098
3110
|
p(n(be), {
|
3099
3111
|
class: "v-item__wrapper",
|
3100
|
-
onClick: f[2] || (f[2] =
|
3112
|
+
onClick: f[2] || (f[2] = it(() => {
|
3101
3113
|
}, ["stop"]))
|
3102
3114
|
}, {
|
3103
3115
|
default: b(() => [
|
3104
3116
|
p(n(be), {
|
3105
3117
|
class: "v-item__actions",
|
3106
|
-
onClick: f[1] || (f[1] =
|
3118
|
+
onClick: f[1] || (f[1] = it(() => {
|
3107
3119
|
}, ["stop"]))
|
3108
3120
|
}, {
|
3109
3121
|
default: b(() => [
|
3110
|
-
(u(!0), B(Y, null,
|
3122
|
+
(u(!0), B(Y, null, ie(a.value, (h) => (u(), w(n(Be), {
|
3111
3123
|
name: h.name,
|
3112
3124
|
title: h.label,
|
3113
3125
|
mode: "icon",
|
@@ -3124,7 +3136,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3124
3136
|
class: "v-item__switch",
|
3125
3137
|
size: "small"
|
3126
3138
|
}, null, 8, ["modelValue"])) : D("", !0),
|
3127
|
-
|
3139
|
+
Ut(m.$slots, "status")
|
3128
3140
|
]),
|
3129
3141
|
_: 3
|
3130
3142
|
}),
|
@@ -3185,7 +3197,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3185
3197
|
}, i = () => {
|
3186
3198
|
s("copy");
|
3187
3199
|
}, c = async () => {
|
3188
|
-
await
|
3200
|
+
await jt.confirm("确认删除?", "提示", {
|
3189
3201
|
type: "warning"
|
3190
3202
|
}).catch(() => !1) && s("remove");
|
3191
3203
|
}, v = (f) => {
|
@@ -3210,8 +3222,8 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3210
3222
|
align: "center"
|
3211
3223
|
}, {
|
3212
3224
|
default: b(() => [
|
3213
|
-
|
3214
|
-
e.icon ? (u(), w(n(
|
3225
|
+
Ut(f.$slots, "default", {}, () => [
|
3226
|
+
e.icon ? (u(), w(n(mt), {
|
3215
3227
|
key: 0,
|
3216
3228
|
class: "v-box__icon",
|
3217
3229
|
icon: o(e.icon),
|
@@ -3303,7 +3315,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3303
3315
|
placeholder: "筛选可用项"
|
3304
3316
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
3305
3317
|
V("div", ud, [
|
3306
|
-
p(n(
|
3318
|
+
p(n(pt), { "border-style": "dotted" }, {
|
3307
3319
|
default: b(() => h[1] || (h[1] = [
|
3308
3320
|
$("可用项")
|
3309
3321
|
])),
|
@@ -3321,7 +3333,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3321
3333
|
"filter-node-method": i
|
3322
3334
|
}, {
|
3323
3335
|
default: b(({ data: _ }) => [
|
3324
|
-
p(
|
3336
|
+
p($e, {
|
3325
3337
|
title: _.label,
|
3326
3338
|
subtitle: _.type,
|
3327
3339
|
"subtitle-cls": _.type,
|
@@ -3343,7 +3355,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3343
3355
|
])
|
3344
3356
|
]));
|
3345
3357
|
}
|
3346
|
-
}), pd = /* @__PURE__ */
|
3358
|
+
}), pd = /* @__PURE__ */ wt(dd, [["__scopeId", "data-v-1fe7beb5"]]), uo = /* @__PURE__ */ M({
|
3347
3359
|
__name: "binder",
|
3348
3360
|
props: {
|
3349
3361
|
title: {},
|
@@ -3386,11 +3398,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3386
3398
|
}, _ = (I) => {
|
3387
3399
|
s("pick", I);
|
3388
3400
|
}, y = (I) => {
|
3389
|
-
a(I),
|
3401
|
+
a(I), yt.success({
|
3390
3402
|
message: "已经复制到粘贴板"
|
3391
3403
|
});
|
3392
3404
|
};
|
3393
|
-
return (I, k) => (u(), w(n(
|
3405
|
+
return (I, k) => (u(), w(n(Dt), {
|
3394
3406
|
"model-value": e.modelValue,
|
3395
3407
|
class: "v-binder",
|
3396
3408
|
title: I.title,
|
@@ -3428,7 +3440,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3428
3440
|
flex: !1
|
3429
3441
|
}, {
|
3430
3442
|
default: b(() => [
|
3431
|
-
|
3443
|
+
Ct(V("div", null, [
|
3432
3444
|
p(n(Je), {
|
3433
3445
|
modelValue: n(l),
|
3434
3446
|
"onUpdate:modelValue": k[0] || (k[0] = (E) => Kn(l) ? l.value = E : null),
|
@@ -3437,14 +3449,14 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3437
3449
|
"prefix-icon": n(dn),
|
3438
3450
|
placeholder: "筛选可用项"
|
3439
3451
|
}, null, 8, ["modelValue", "prefix-icon"]),
|
3440
|
-
(u(!0), B(Y, null,
|
3441
|
-
p(n(
|
3452
|
+
(u(!0), B(Y, null, ie(n(o), (E) => (u(), B("div", null, [
|
3453
|
+
p(n(pt), { "border-style": "dotted" }, {
|
3442
3454
|
default: b(() => [
|
3443
3455
|
$(oe(E.title), 1)
|
3444
3456
|
]),
|
3445
3457
|
_: 2
|
3446
3458
|
}, 1024),
|
3447
|
-
(u(!0), B(Y, null,
|
3459
|
+
(u(!0), B(Y, null, ie(E.items, (A) => (u(), w($e, {
|
3448
3460
|
title: A,
|
3449
3461
|
background: "",
|
3450
3462
|
actions: ["copy"],
|
@@ -3457,7 +3469,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3457
3469
|
], 512), [
|
3458
3470
|
[rn, c.value === "normal"]
|
3459
3471
|
]),
|
3460
|
-
|
3472
|
+
Ct(p(pd, {
|
3461
3473
|
context: e.context,
|
3462
3474
|
onCopy: y,
|
3463
3475
|
onPick: _
|
@@ -3542,7 +3554,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3542
3554
|
"submit-method": g
|
3543
3555
|
}, {
|
3544
3556
|
default: b(() => [
|
3545
|
-
|
3557
|
+
Ut(I.$slots, "default")
|
3546
3558
|
]),
|
3547
3559
|
_: 3
|
3548
3560
|
}, 8, ["model", "rules"])
|
@@ -3569,7 +3581,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3569
3581
|
}, i = () => {
|
3570
3582
|
o.value ? (s("submit", o.value), s("update:modelValue", !1)) : xe("请选择插槽");
|
3571
3583
|
};
|
3572
|
-
return (c, v) => (u(), w(n(
|
3584
|
+
return (c, v) => (u(), w(n(Dt), He({
|
3573
3585
|
class: "v-slots-picker",
|
3574
3586
|
title: `选择插槽: ${e.name}`,
|
3575
3587
|
width: "600px",
|
@@ -3592,7 +3604,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3592
3604
|
wrap: "wrap"
|
3593
3605
|
}, {
|
3594
3606
|
default: b(() => [
|
3595
|
-
(u(!0), B(Y, null,
|
3607
|
+
(u(!0), B(Y, null, ie(e.slots, (g, d) => (u(), w(n(be), {
|
3596
3608
|
class: he(["v-slots-picker__item", { "is-active": g.name === o.value?.name }]),
|
3597
3609
|
grow: "",
|
3598
3610
|
flex: !1,
|
@@ -3640,14 +3652,14 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3640
3652
|
class: he(["v-viewport", e.value]),
|
3641
3653
|
style: gn(l.value)
|
3642
3654
|
}, [
|
3643
|
-
|
3655
|
+
Ut(a.$slots, "default")
|
3644
3656
|
], 6));
|
3645
3657
|
}
|
3646
3658
|
}), gd = /* @__PURE__ */ M({
|
3647
3659
|
name: "VMicroApp",
|
3648
3660
|
__name: "micro-app",
|
3649
3661
|
setup(r) {
|
3650
|
-
return (t, e) => (u(), w(n(
|
3662
|
+
return (t, e) => (u(), w(n(Dt), {
|
3651
3663
|
title: "页面模板",
|
3652
3664
|
width: "80%",
|
3653
3665
|
height: "80%"
|
@@ -3659,11 +3671,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3659
3671
|
__: [0]
|
3660
3672
|
}));
|
3661
3673
|
}
|
3662
|
-
}), Uf = /* @__PURE__ */
|
3674
|
+
}), Uf = /* @__PURE__ */ wt(gd, [["__scopeId", "data-v-d44d0728"]]), fd = /* @__PURE__ */ M({
|
3663
3675
|
name: "PagesWidget",
|
3664
3676
|
__name: "index",
|
3665
3677
|
setup(r) {
|
3666
|
-
const { project: t, engine: e } = pn(), s = x(() => t.value?.pages || []), { current: o } =
|
3678
|
+
const { project: t, engine: e } = pn(), s = x(() => t.value?.pages || []), { current: o } = Ze(), l = C(!1), a = C(), i = C(), c = x(() => `(共 ${s.value.length} 项)`), v = x(() => {
|
3667
3679
|
const { platform: y = "web" } = t.value || {};
|
3668
3680
|
return y === "uniapp";
|
3669
3681
|
}), g = (y) => {
|
@@ -3698,7 +3710,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3698
3710
|
}
|
3699
3711
|
}, h = (y, I, k) => k === "inner" ? !!I.data.dir : !0, _ = () => {
|
3700
3712
|
t.value?.update({
|
3701
|
-
pages:
|
3713
|
+
pages: ht(s)
|
3702
3714
|
});
|
3703
3715
|
};
|
3704
3716
|
return (y, I) => (u(), w(n(ge), {
|
@@ -3718,7 +3730,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3718
3730
|
onNodeDrop: _
|
3719
3731
|
}, {
|
3720
3732
|
default: b(({ data: k, node: E }) => [
|
3721
|
-
p(n(
|
3733
|
+
p(n($e), {
|
3722
3734
|
class: "v-pages-widget__item",
|
3723
3735
|
icon: n(Us)[k.icon],
|
3724
3736
|
title: k.title,
|
@@ -3805,7 +3817,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3805
3817
|
"model-value": e.modelValue,
|
3806
3818
|
"suffix-icon": n(Qi)
|
3807
3819
|
}, k.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
3808
|
-
i.value ? (u(), w(n(
|
3820
|
+
i.value ? (u(), w(n(Dt), {
|
3809
3821
|
key: 0,
|
3810
3822
|
modelValue: i.value,
|
3811
3823
|
"onUpdate:modelValue": E[2] || (E[2] = (A) => i.value = A),
|
@@ -3849,15 +3861,15 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3849
3861
|
name: "BlocksWidget",
|
3850
3862
|
__name: "index",
|
3851
3863
|
setup(r) {
|
3852
|
-
const { span: t } = lo(), { blocks: e, engine: s } = Wc(), o = C(""), l = x(() => o.value ? e.value.filter((
|
3853
|
-
() => Vn(l.value, (
|
3864
|
+
const { span: t } = lo(), { blocks: e, engine: s } = Wc(), o = C(""), l = x(() => o.value ? e.value.filter((U) => U.name.includes(o.value) || U.title?.includes(o.value)) : e.value), a = x(
|
3865
|
+
() => Vn(l.value, (U) => U.category || "默认分组")
|
3854
3866
|
), i = x(() => Object.keys(a.value)), c = {
|
3855
3867
|
filterable: !0,
|
3856
3868
|
allowCreate: !0,
|
3857
3869
|
defaultFirstOption: !0
|
3858
|
-
}, v = x(() => i.value.map((
|
3859
|
-
label:
|
3860
|
-
value:
|
3870
|
+
}, v = x(() => i.value.map((U) => ({
|
3871
|
+
label: U,
|
3872
|
+
value: U
|
3861
3873
|
}))), g = [
|
3862
3874
|
{
|
3863
3875
|
label: "设计",
|
@@ -3887,7 +3899,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3887
3899
|
label: "插件",
|
3888
3900
|
type: "danger"
|
3889
3901
|
}
|
3890
|
-
}, m = C(void 0), { current: f } =
|
3902
|
+
}, m = C(void 0), { current: f } = Ze(), h = C(!1), _ = x(() => m.value?.id ? "编辑区块" : "新增区块"), y = x(() => `(共 ${e.value.length} 个)`), I = () => ({
|
3891
3903
|
fromType: "Schema",
|
3892
3904
|
name: "",
|
3893
3905
|
title: "",
|
@@ -3899,10 +3911,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3899
3911
|
return ".json";
|
3900
3912
|
if (m.value?.fromType === "Plugin")
|
3901
3913
|
return ".js,.css,.json";
|
3902
|
-
}), E = x(() => m.value?.fromType === "Plugin"), A = async (
|
3903
|
-
const ue =
|
3914
|
+
}), E = x(() => m.value?.fromType === "Plugin"), A = async (U) => {
|
3915
|
+
const ue = U, P = s.project.value;
|
3904
3916
|
if (!P) return !1;
|
3905
|
-
if (
|
3917
|
+
if (U.id)
|
3906
3918
|
if (!P.existBlockName(ue.name, [ue.id]))
|
3907
3919
|
P.updateBlock(ue);
|
3908
3920
|
else
|
@@ -3914,28 +3926,28 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3914
3926
|
return !0;
|
3915
3927
|
}, T = () => {
|
3916
3928
|
m.value = I(), h.value = !0;
|
3917
|
-
}, O = (
|
3918
|
-
m.value = Bn(
|
3919
|
-
}, R = (
|
3920
|
-
s.project.value?.cloneBlock(
|
3921
|
-
}, j = (
|
3922
|
-
s.project.value?.removeBlock(
|
3923
|
-
}, W = (
|
3924
|
-
m.value && (m.value.name = ia(
|
3925
|
-
}, X = async (
|
3926
|
-
if (!
|
3927
|
-
s.project.value?.active(
|
3929
|
+
}, O = (U) => {
|
3930
|
+
m.value = Bn(U), h.value = !0;
|
3931
|
+
}, R = (U) => {
|
3932
|
+
s.project.value?.cloneBlock(U);
|
3933
|
+
}, j = (U) => {
|
3934
|
+
s.project.value?.removeBlock(U.id);
|
3935
|
+
}, W = (U) => {
|
3936
|
+
m.value && (m.value.name = ia(U));
|
3937
|
+
}, X = async (U) => {
|
3938
|
+
if (!U.fromType || U.fromType === "Schema") {
|
3939
|
+
s.project.value?.active(U);
|
3928
3940
|
const ue = s.skeleton?.getRegion("Workspace");
|
3929
3941
|
ue && ue.regionRef.openTab("Designer");
|
3930
3942
|
}
|
3931
|
-
}, G = async (
|
3932
|
-
const ue = Xl(
|
3943
|
+
}, G = async (U) => {
|
3944
|
+
const ue = Xl(U), P = await s.assets.getBlockMaterial(ue, U.name), L = s.skeleton?.getWidget("Designer")?.widgetRef?.designer;
|
3933
3945
|
L && P && L.setDragging(P);
|
3934
3946
|
}, Z = () => {
|
3935
|
-
const
|
3936
|
-
|
3947
|
+
const U = s.skeleton?.getWidget("Designer")?.widgetRef?.designer;
|
3948
|
+
U && U.setDragging(null);
|
3937
3949
|
};
|
3938
|
-
return (
|
3950
|
+
return (U, ue) => (u(), w(n(ge), {
|
3939
3951
|
class: "v-blocks-widget",
|
3940
3952
|
title: "区块管理",
|
3941
3953
|
subtitle: y.value,
|
@@ -3958,7 +3970,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3958
3970
|
"model-value": i.value
|
3959
3971
|
}, {
|
3960
3972
|
default: b(() => [
|
3961
|
-
(u(!0), B(Y, null,
|
3973
|
+
(u(!0), B(Y, null, ie(a.value, (P, L) => (u(), w(n(as), {
|
3962
3974
|
name: L,
|
3963
3975
|
title: `${L} (${P.length})`
|
3964
3976
|
}, {
|
@@ -3968,7 +3980,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3968
3980
|
gutter: 5
|
3969
3981
|
}, {
|
3970
3982
|
default: b(() => [
|
3971
|
-
(u(!0), B(Y, null,
|
3983
|
+
(u(!0), B(Y, null, ie(P, (H) => (u(), w(n(Yn), {
|
3972
3984
|
key: H.id,
|
3973
3985
|
span: n(t)
|
3974
3986
|
}, {
|
@@ -4003,7 +4015,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4003
4015
|
key: 0,
|
4004
4016
|
description: "找不到符合条件的区块"
|
4005
4017
|
})),
|
4006
|
-
p(n(
|
4018
|
+
p(n(Lt), {
|
4007
4019
|
modelValue: h.value,
|
4008
4020
|
"onUpdate:modelValue": ue[1] || (ue[1] = (P) => h.value = P),
|
4009
4021
|
title: _.value,
|
@@ -4029,7 +4041,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4029
4041
|
tip: "名称为英文驼峰格式",
|
4030
4042
|
rules: {
|
4031
4043
|
message: "名称格式错误",
|
4032
|
-
pattern: n(
|
4044
|
+
pattern: n(Ft)
|
4033
4045
|
},
|
4034
4046
|
onChange: W
|
4035
4047
|
}, null, 8, ["rules"]),
|
@@ -4106,7 +4118,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4106
4118
|
gutter: 5
|
4107
4119
|
}, {
|
4108
4120
|
default: b(() => [
|
4109
|
-
(u(!0), B(Y, null,
|
4121
|
+
(u(!0), B(Y, null, ie(n(c), (f, h) => (u(), w(n(Yn), {
|
4110
4122
|
span: n(t),
|
4111
4123
|
key: `${f.name}_${h}`
|
4112
4124
|
}, {
|
@@ -4140,7 +4152,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4140
4152
|
"onUpdate:modelValue": m[1] || (m[1] = (f) => n(a)[n(o)] = f)
|
4141
4153
|
}, {
|
4142
4154
|
default: b(() => [
|
4143
|
-
(u(!0), B(Y, null,
|
4155
|
+
(u(!0), B(Y, null, ie(n(l).children, (f) => (u(), w(n(as), {
|
4144
4156
|
key: f.name,
|
4145
4157
|
name: f.name,
|
4146
4158
|
title: `${f.label} (${f.count})`
|
@@ -4152,7 +4164,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4152
4164
|
gutter: 5
|
4153
4165
|
}, {
|
4154
4166
|
default: b(() => [
|
4155
|
-
(u(!0), B(Y, null,
|
4167
|
+
(u(!0), B(Y, null, ie(f.components, (h) => (u(), w(n(Yn), {
|
4156
4168
|
span: n(t),
|
4157
4169
|
key: h.name
|
4158
4170
|
}, {
|
@@ -4189,7 +4201,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4189
4201
|
name: "OutlineWidget",
|
4190
4202
|
__name: "index",
|
4191
4203
|
setup(r) {
|
4192
|
-
const { engine: t, designer: e, selected: s } =
|
4204
|
+
const { engine: t, designer: e, selected: s } = Bt(), { current: o } = Ze(), l = C([]), a = (O, R) => {
|
4193
4205
|
if (R === "slot") return [];
|
4194
4206
|
if (Ne(O))
|
4195
4207
|
return O.locked ? ["unlock"] : ["lock"];
|
@@ -4238,7 +4250,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4238
4250
|
}
|
4239
4251
|
];
|
4240
4252
|
}, g = async () => {
|
4241
|
-
l.value = v(), s.value?.model && (await
|
4253
|
+
l.value = v(), s.value?.model && (await dt(), e.value?.setSelected(s.value.model));
|
4242
4254
|
}, d = x(() => s.value?.model.id), m = async (O) => {
|
4243
4255
|
const R = O.data;
|
4244
4256
|
if (R.type === "slot" || Ne(R.model) || R.model.locked || R.model.name === "template")
|
@@ -4258,8 +4270,8 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4258
4270
|
if (Ne(W.model))
|
4259
4271
|
Z = j === "inner", e.value?.setDropping(Z ? W.model : null, "inner");
|
4260
4272
|
else {
|
4261
|
-
const
|
4262
|
-
Z = !!await e.value?.allowDrop(
|
4273
|
+
const U = W.model;
|
4274
|
+
Z = !!await e.value?.allowDrop(U, G), e.value?.setDropping(Z ? U : null, "inner");
|
4263
4275
|
}
|
4264
4276
|
return Z;
|
4265
4277
|
}, h = (O) => {
|
@@ -4281,7 +4293,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4281
4293
|
G,
|
4282
4294
|
Z
|
4283
4295
|
)) {
|
4284
|
-
e.value?.setDropping(null), g(),
|
4296
|
+
e.value?.setDropping(null), g(), yt.warning({
|
4285
4297
|
message: `${W.model.name}不能放置到该位置`
|
4286
4298
|
}), e.value?.setDragging(null);
|
4287
4299
|
return;
|
@@ -4360,7 +4372,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4360
4372
|
onNodeDragEnd: E
|
4361
4373
|
}, {
|
4362
4374
|
default: b(({ data: j, node: W }) => [
|
4363
|
-
p(n(
|
4375
|
+
p(n($e), {
|
4364
4376
|
class: he(["v-outline-widget__item", {
|
4365
4377
|
"is-locked": j.model.locked,
|
4366
4378
|
"is-invisible": j.model.invisible,
|
@@ -4395,7 +4407,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4395
4407
|
const { history: t, load: e, total: s } = Da(), o = x(() => `(共 ${s.value} 条)`), l = (i) => {
|
4396
4408
|
i.name === "remove" && t.value?.remove(i.modelValue.id);
|
4397
4409
|
}, a = async () => {
|
4398
|
-
await
|
4410
|
+
await Qt("确定要清空历史记录吗?") && t.value?.clear();
|
4399
4411
|
};
|
4400
4412
|
return (i, c) => (u(), w(n(ge), {
|
4401
4413
|
class: "v-history-widget",
|
@@ -4409,7 +4421,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4409
4421
|
key: 0,
|
4410
4422
|
"image-size": 50
|
4411
4423
|
})) : D("", !0),
|
4412
|
-
n(t) ? (u(!0), B(Y, { key: 1 },
|
4424
|
+
n(t) ? (u(!0), B(Y, { key: 1 }, ie(n(t).items, (v, g) => (u(), w(n($e), {
|
4413
4425
|
index: g + 1,
|
4414
4426
|
title: v.label,
|
4415
4427
|
"model-value": v,
|
@@ -4453,7 +4465,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4453
4465
|
name: "name",
|
4454
4466
|
label: "接口名称",
|
4455
4467
|
required: "",
|
4456
|
-
rules: { pattern: n(
|
4468
|
+
rules: { pattern: n(Ft), message: "名称格式不正确" }
|
4457
4469
|
}, null, 8, ["rules"]),
|
4458
4470
|
p(n(J), {
|
4459
4471
|
name: "label",
|
@@ -4659,7 +4671,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4659
4671
|
}
|
4660
4672
|
), ne(s, async () => {
|
4661
4673
|
l.value?.formRef.validate(async (_) => {
|
4662
|
-
_ || (await
|
4674
|
+
_ || (await dt(), s.value = "base");
|
4663
4675
|
});
|
4664
4676
|
});
|
4665
4677
|
const d = () => {
|
@@ -4669,7 +4681,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4669
4681
|
}, f = async (_) => t.project?.existApiName(
|
4670
4682
|
a.value.name,
|
4671
4683
|
t.model ? [a.value.id] : []
|
4672
|
-
) ? (xe(`API名称 [ ${a.value.name} ] 已存在`), !1) : a.value.headers && !
|
4684
|
+
) ? (xe(`API名称 [ ${a.value.name} ] 已存在`), !1) : a.value.headers && !Xe(a.value.headers, window) || a.value.mockTemplate && !Xe(a.value.mockTemplate, window) ? !1 : (t.project?.setApi(a.value), o.value?.close(), !0), h = () => {
|
4673
4685
|
if (a.value.mockTemplate) {
|
4674
4686
|
const _ = Tn(
|
4675
4687
|
a.value.mockTemplate,
|
@@ -4684,7 +4696,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4684
4696
|
c.value = JSON.stringify(k, null, 2), i.value = !0;
|
4685
4697
|
}
|
4686
4698
|
};
|
4687
|
-
return (_, y) => (u(), w(n(
|
4699
|
+
return (_, y) => (u(), w(n(Dt), {
|
4688
4700
|
ref_key: "dialogRef",
|
4689
4701
|
ref: o,
|
4690
4702
|
title: e.value,
|
@@ -4769,7 +4781,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4769
4781
|
submitMethod: f
|
4770
4782
|
}, {
|
4771
4783
|
default: b(() => [
|
4772
|
-
|
4784
|
+
Ct(p(Ed, { categories: _.categories }, null, 8, ["categories"]), [
|
4773
4785
|
[rn, s.value === "base"]
|
4774
4786
|
]),
|
4775
4787
|
s.value === "settings" ? (u(), B("div", Rd, [
|
@@ -4884,12 +4896,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4884
4896
|
"onUpdate:modelValue": I[1] || (I[1] = (k) => g.value = k)
|
4885
4897
|
}, {
|
4886
4898
|
default: b(() => [
|
4887
|
-
(u(!0), B(Y, null,
|
4899
|
+
(u(!0), B(Y, null, ie(i.value, (k, E) => (u(), w(n(as), {
|
4888
4900
|
name: E,
|
4889
4901
|
title: `${E} (${k.length})`
|
4890
4902
|
}, {
|
4891
4903
|
default: b(() => [
|
4892
|
-
(u(!0), B(Y, null,
|
4904
|
+
(u(!0), B(Y, null, ie(k, (A) => (u(), w(n($e), {
|
4893
4905
|
key: A.id,
|
4894
4906
|
small: "",
|
4895
4907
|
title: A.name,
|
@@ -4954,7 +4966,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4954
4966
|
onPlus: d
|
4955
4967
|
}, {
|
4956
4968
|
default: b(() => [
|
4957
|
-
(u(!0), B(Y, null,
|
4969
|
+
(u(!0), B(Y, null, ie(n(t), (y) => (u(), w(n($e), {
|
4958
4970
|
key: y.package,
|
4959
4971
|
title: y.package,
|
4960
4972
|
subtitle: y.version,
|
@@ -4967,7 +4979,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4967
4979
|
onClick: (I) => m(y),
|
4968
4980
|
onAction: (I) => f(y, I)
|
4969
4981
|
}, null, 8, ["title", "subtitle", "actions", "switch", "modelValue", "onUpdate:modelValue", "onSwitch", "onClick", "onAction"]))), 128)),
|
4970
|
-
p(n(
|
4982
|
+
p(n(Lt), {
|
4971
4983
|
modelValue: s.value,
|
4972
4984
|
"onUpdate:modelValue": _[1] || (_[1] = (y) => s.value = y),
|
4973
4985
|
width: "600px",
|
@@ -5003,7 +5015,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5003
5015
|
editor: "textarea",
|
5004
5016
|
props: { rows: 3 },
|
5005
5017
|
tip: "多个资源可以换行输入",
|
5006
|
-
onKeyup: _[0] || (_[0] =
|
5018
|
+
onKeyup: _[0] || (_[0] = Rt(it(() => {
|
5007
5019
|
}, ["stop"]), ["enter"])),
|
5008
5020
|
required: ""
|
5009
5021
|
}),
|
@@ -5076,7 +5088,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5076
5088
|
}), v = (m) => {
|
5077
5089
|
s("action", { type: "selected", model: m.command });
|
5078
5090
|
}, g = async (m) => {
|
5079
|
-
m.name === "remove" ? await
|
5091
|
+
m.name === "remove" ? await Qt("确定删除?") && s("action", { type: m.name, model: e.model }) : s("action", { type: m.name, model: e.model });
|
5080
5092
|
}, d = () => {
|
5081
5093
|
s("action", { type: "open", model: e.model });
|
5082
5094
|
};
|
@@ -5122,7 +5134,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5122
5134
|
inheritAttrs: !1,
|
5123
5135
|
__name: "index",
|
5124
5136
|
setup(r, { expose: t }) {
|
5125
|
-
const e = C(), s = C(), { width: o, height: l } = wn(e), { dependencies: a, engine: i, apis: c, meta: v } = ja(), { current: g, isEmpty: d } =
|
5137
|
+
const e = C(), s = C(), { width: o, height: l } = wn(e), { dependencies: a, engine: i, apis: c, meta: v } = ja(), { current: g, isEmpty: d } = Ze(), m = x(() => i.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc"), f = x(() => i.skeleton?.getWidget("Toolbar")?.widgetRef.customSize), h = x(() => i.project.value?.config || {}), _ = x(() => i.project.value?.uniConfig || {}), { designer: y, hover: I, dropping: k, selected: E, lines: A } = Kc(
|
5126
5138
|
s,
|
5127
5139
|
a,
|
5128
5140
|
c,
|
@@ -5155,10 +5167,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5155
5167
|
case "open":
|
5156
5168
|
const Z = X.from;
|
5157
5169
|
if (console.log("open", Z), typeof Z == "object" && Z.type === "Schema") {
|
5158
|
-
const
|
5159
|
-
if (
|
5170
|
+
const U = i.project.value?.getBlock(Z.id);
|
5171
|
+
if (U) {
|
5160
5172
|
const ue = i.skeleton?.getRegion("Apps").regionRef;
|
5161
|
-
ue && ue.setActive("Blocks"), i.project.value?.active(
|
5173
|
+
ue && ue.setActive("Blocks"), i.project.value?.active(U);
|
5162
5174
|
}
|
5163
5175
|
}
|
5164
5176
|
break;
|
@@ -5222,7 +5234,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5222
5234
|
description: "请新建或打开文件"
|
5223
5235
|
})),
|
5224
5236
|
n(i).state.outlineEnabled && n(A).length ? (u(), B("div", Md, [
|
5225
|
-
(u(!0), B(Y, null,
|
5237
|
+
(u(!0), B(Y, null, ie(n(A), (X) => (u(), B("div", {
|
5226
5238
|
style: gn(X)
|
5227
5239
|
}, null, 4))), 256))
|
5228
5240
|
])) : D("", !0),
|
@@ -5283,7 +5295,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5283
5295
|
onPlus: c
|
5284
5296
|
}, {
|
5285
5297
|
default: b(() => [
|
5286
|
-
(u(!0), B(Y, null,
|
5298
|
+
(u(!0), B(Y, null, ie(h.list, (y) => (u(), w(n($e), {
|
5287
5299
|
title: t.itemTitle(y),
|
5288
5300
|
border: "",
|
5289
5301
|
actions: ["edit", "remove"],
|
@@ -5305,7 +5317,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5305
5317
|
onPick: g
|
5306
5318
|
}, {
|
5307
5319
|
default: b(() => [
|
5308
|
-
|
5320
|
+
Ut(h.$slots, "fields", Qo(Go({ model: l.value, isEdit: a.value, nameLabel: h.nameLabel, valueLabel: h.valueLabel })), () => [
|
5309
5321
|
p(n(J), {
|
5310
5322
|
name: "name",
|
5311
5323
|
label: h.nameLabel,
|
@@ -5359,7 +5371,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5359
5371
|
type: "JSExpression",
|
5360
5372
|
value: v
|
5361
5373
|
};
|
5362
|
-
return
|
5374
|
+
return Xe(g, t.context, !0) ? (t.current?.setState(c, g), !0) : !1;
|
5363
5375
|
};
|
5364
5376
|
return (a, i) => (u(), w(On, {
|
5365
5377
|
title: "状态数据",
|
@@ -5391,7 +5403,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5391
5403
|
type: "JSFunction",
|
5392
5404
|
value: v
|
5393
5405
|
};
|
5394
|
-
return
|
5406
|
+
return Xe(g, t.context, !0) ? (t.current?.setFunction("computed", c, g), !0) : !1;
|
5395
5407
|
};
|
5396
5408
|
return (a, i) => (u(), w(On, {
|
5397
5409
|
title: "计算属性",
|
@@ -5423,7 +5435,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5423
5435
|
type: "JSFunction",
|
5424
5436
|
value: v
|
5425
5437
|
};
|
5426
|
-
return
|
5438
|
+
return Xe(g, t.context, !0) ? (t.current?.setFunction("methods", c, g), !0) : !1;
|
5427
5439
|
};
|
5428
5440
|
return (a, i) => (u(), w(On, {
|
5429
5441
|
title: "组件方法",
|
@@ -5461,7 +5473,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5461
5473
|
type: "JSFunction",
|
5462
5474
|
value: d
|
5463
5475
|
};
|
5464
|
-
return
|
5476
|
+
return Xe(m, e.context, !0) ? (e.current?.setFunction("lifeCycles", g, m), !0) : !1;
|
5465
5477
|
};
|
5466
5478
|
return (c, v) => (u(), w(On, {
|
5467
5479
|
title: "生命周期",
|
@@ -5528,7 +5540,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5528
5540
|
type: "JSFunction",
|
5529
5541
|
value: i.handler
|
5530
5542
|
};
|
5531
|
-
if (!
|
5543
|
+
if (!Xe(v, t.context, !0) || !Xe(g, t.context, !0))
|
5532
5544
|
return !1;
|
5533
5545
|
const d = {
|
5534
5546
|
...i,
|
@@ -5604,7 +5616,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5604
5616
|
}), Wd = /* @__PURE__ */ M({
|
5605
5617
|
__name: "index",
|
5606
5618
|
setup(r) {
|
5607
|
-
const { current: t, context: e } =
|
5619
|
+
const { current: t, context: e } = Ze();
|
5608
5620
|
return (s, o) => (u(), w(n(be), {
|
5609
5621
|
class: "v-scripts-widget",
|
5610
5622
|
direction: "column",
|
@@ -5662,16 +5674,16 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5662
5674
|
fit: !1
|
5663
5675
|
}, {
|
5664
5676
|
default: b(() => [
|
5665
|
-
p(n(
|
5677
|
+
p(n(rt), {
|
5666
5678
|
class: "v-properties-widget__form",
|
5667
5679
|
size: "small",
|
5668
5680
|
"label-position": "right",
|
5669
5681
|
"label-width": i.value,
|
5670
|
-
onKeydown: v[0] || (v[0] =
|
5682
|
+
onKeydown: v[0] || (v[0] = Rt(it(() => {
|
5671
5683
|
}, ["prevent", "stop"]), ["enter"]))
|
5672
5684
|
}, {
|
5673
5685
|
default: b(() => [
|
5674
|
-
(u(!0), B(Y, null,
|
5686
|
+
(u(!0), B(Y, null, ie(e.items, (g) => (u(), w(n(pe), He({ ref_for: !0 }, g, {
|
5675
5687
|
key: `${g.name}_${e.node.id}`,
|
5676
5688
|
current: e.current,
|
5677
5689
|
context: e.context,
|
@@ -5690,7 +5702,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5690
5702
|
name: "PropertiesWidget",
|
5691
5703
|
__name: "index",
|
5692
5704
|
setup(r) {
|
5693
|
-
const { current: t, context: e } =
|
5705
|
+
const { current: t, context: e } = Ze(), { selected: s } = Bt(), {
|
5694
5706
|
node: o,
|
5695
5707
|
commonProps: l,
|
5696
5708
|
change: a,
|
@@ -5707,7 +5719,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5707
5719
|
const k = Object.keys(o.value?.props || {});
|
5708
5720
|
return !d(I.name) && !k.includes(I.name) ? (v(I.name), !0) : (xe("已存在该属性名称"), !1);
|
5709
5721
|
}, y = async (I) => {
|
5710
|
-
await
|
5722
|
+
await Qt("确定删除?") && g(I);
|
5711
5723
|
};
|
5712
5724
|
return (I, k) => n(t) ? (u(), w(n(be), {
|
5713
5725
|
key: 0,
|
@@ -5748,7 +5760,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5748
5760
|
onPlus: h,
|
5749
5761
|
onRemove: y
|
5750
5762
|
}, null, 8, ["current", "context", "node", "items", "onChange"])) : D("", !0),
|
5751
|
-
p(n(
|
5763
|
+
p(n(Lt), {
|
5752
5764
|
modelValue: m.value,
|
5753
5765
|
"onUpdate:modelValue": k[0] || (k[0] = (E) => m.value = E),
|
5754
5766
|
title: "新增自定义属性",
|
@@ -5765,7 +5777,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5765
5777
|
required: "",
|
5766
5778
|
rules: {
|
5767
5779
|
message: "名称格式错误",
|
5768
|
-
pattern: n(
|
5780
|
+
pattern: n(Ft)
|
5769
5781
|
}
|
5770
5782
|
}, null, 8, ["rules"])
|
5771
5783
|
]),
|
@@ -5784,7 +5796,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5784
5796
|
value: {}
|
5785
5797
|
},
|
5786
5798
|
setup(r) {
|
5787
|
-
const t = r, e = C(), s =
|
5799
|
+
const t = r, e = C(), s = Vt({
|
5788
5800
|
type: "JSExpression",
|
5789
5801
|
value: t.value
|
5790
5802
|
}), o = (l) => {
|
@@ -5831,7 +5843,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5831
5843
|
event: {}
|
5832
5844
|
},
|
5833
5845
|
setup(r) {
|
5834
|
-
const t = r, e = C(), o =
|
5846
|
+
const t = r, e = C(), o = Vt({
|
5835
5847
|
name: t.name,
|
5836
5848
|
...t.event,
|
5837
5849
|
modifiers: Object.keys(t.event?.modifiers || {}),
|
@@ -5886,7 +5898,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5886
5898
|
name: "EventsWidget",
|
5887
5899
|
__name: "index",
|
5888
5900
|
setup(r) {
|
5889
|
-
const { current: t, context: e } =
|
5901
|
+
const { current: t, context: e } = Ze(), { selected: s } = Bt(), { mouseEventList: o, keyboardEventList: l, componentEventList: a } = su(s), i = C({
|
5890
5902
|
name: "",
|
5891
5903
|
event: void 0
|
5892
5904
|
}), c = C(!1), v = (h) => {
|
@@ -5896,12 +5908,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5896
5908
|
...h,
|
5897
5909
|
modifiers: h.modifiers.reduce((I, k) => (I[k] = !0, I), {})
|
5898
5910
|
};
|
5899
|
-
return
|
5911
|
+
return Xe(_.handler, e.value, !0) ? ((s.value?.model).setEvent(_), !0) : !1;
|
5900
5912
|
}, d = async (h) => {
|
5901
5913
|
const _ = s.value?.model;
|
5902
5914
|
h.name && (_.removeEvent(h.name), c.value = !1);
|
5903
5915
|
}, m = async () => {
|
5904
|
-
i.value.name && await
|
5916
|
+
i.value.name && await Qt("确定要删除该事件吗?") && d(i.value);
|
5905
5917
|
}, f = (h) => {
|
5906
5918
|
const { name: _, modelValue: y } = h;
|
5907
5919
|
_ === "edit" && v(y), _ === "remove" && d(y);
|
@@ -5924,7 +5936,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5924
5936
|
"image-size": 50,
|
5925
5937
|
description: "该组件无自带事件"
|
5926
5938
|
})),
|
5927
|
-
(u(!0), B(Y, null,
|
5939
|
+
(u(!0), B(Y, null, ie(n(a), (y) => (u(), w(n($e), {
|
5928
5940
|
key: `component_${y.name}`,
|
5929
5941
|
title: y.name,
|
5930
5942
|
"model-value": y,
|
@@ -5945,7 +5957,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5945
5957
|
fit: !1
|
5946
5958
|
}, {
|
5947
5959
|
default: b(() => [
|
5948
|
-
(u(!0), B(Y, null,
|
5960
|
+
(u(!0), B(Y, null, ie(n(o), (y) => (u(), w(n($e), {
|
5949
5961
|
key: `mouse_${y.name}`,
|
5950
5962
|
title: y.name,
|
5951
5963
|
"model-value": y,
|
@@ -5967,7 +5979,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5967
5979
|
fit: !1
|
5968
5980
|
}, {
|
5969
5981
|
default: b(() => [
|
5970
|
-
(u(!0), B(Y, null,
|
5982
|
+
(u(!0), B(Y, null, ie(n(l), (y) => (u(), w(n($e), {
|
5971
5983
|
key: `keyboard_${y.name}`,
|
5972
5984
|
title: y.name,
|
5973
5985
|
"model-value": y,
|
@@ -6000,7 +6012,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6000
6012
|
name: "CssWidget",
|
6001
6013
|
__name: "index",
|
6002
6014
|
setup(r) {
|
6003
|
-
const { current: t } =
|
6015
|
+
const { current: t } = Ze(), e = C(), s = x(() => t.value?.css || ""), o = (a) => {
|
6004
6016
|
t.value?.setCss(a);
|
6005
6017
|
}, l = () => {
|
6006
6018
|
const i = (e.value?.getEditor()).getValue();
|
@@ -6032,7 +6044,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6032
6044
|
name: "DirectivesWidget",
|
6033
6045
|
__name: "index",
|
6034
6046
|
setup(r) {
|
6035
|
-
const { current: t, context: e } =
|
6047
|
+
const { current: t, context: e } = Ze(), { selected: s } = Bt(), {
|
6036
6048
|
vIf: o,
|
6037
6049
|
vElseIf: l,
|
6038
6050
|
vElse: a,
|
@@ -6063,10 +6075,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6063
6075
|
fit: !1
|
6064
6076
|
}, {
|
6065
6077
|
default: b(() => [
|
6066
|
-
p(n(
|
6078
|
+
p(n(rt), {
|
6067
6079
|
size: "small",
|
6068
6080
|
"label-width": "80px",
|
6069
|
-
onKeydown: O[0] || (O[0] =
|
6081
|
+
onKeydown: O[0] || (O[0] = Rt(it(() => {
|
6070
6082
|
}, ["prevent", "stop"]), ["enter"]))
|
6071
6083
|
}, {
|
6072
6084
|
default: b(() => [
|
@@ -6139,10 +6151,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6139
6151
|
fit: !1
|
6140
6152
|
}, {
|
6141
6153
|
default: b(() => [
|
6142
|
-
p(n(
|
6154
|
+
p(n(rt), {
|
6143
6155
|
size: "small",
|
6144
6156
|
"label-width": "80px",
|
6145
|
-
onKeydown: O[1] || (O[1] =
|
6157
|
+
onKeydown: O[1] || (O[1] = Rt(it(() => {
|
6146
6158
|
}, ["prevent", "stop"]), ["enter"]))
|
6147
6159
|
}, {
|
6148
6160
|
default: b(() => [
|
@@ -6192,7 +6204,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6192
6204
|
fit: !1
|
6193
6205
|
}, {
|
6194
6206
|
default: b(() => [
|
6195
|
-
(u(!0), B(Y, null,
|
6207
|
+
(u(!0), B(Y, null, ie(n(d), (R, j) => (u(), w(n(ge), {
|
6196
6208
|
card: "",
|
6197
6209
|
border: "",
|
6198
6210
|
class: "v-sub-panel",
|
@@ -6202,10 +6214,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6202
6214
|
fit: !1
|
6203
6215
|
}, {
|
6204
6216
|
default: b(() => [
|
6205
|
-
p(n(
|
6217
|
+
p(n(rt), {
|
6206
6218
|
size: "small",
|
6207
6219
|
"label-width": "60px",
|
6208
|
-
onKeydown: O[2] || (O[2] =
|
6220
|
+
onKeydown: O[2] || (O[2] = Rt(it(() => {
|
6209
6221
|
}, ["prevent", "stop"]), ["enter"]))
|
6210
6222
|
}, {
|
6211
6223
|
default: b(() => [
|
@@ -6242,7 +6254,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6242
6254
|
onPlus: n(y)
|
6243
6255
|
}, {
|
6244
6256
|
default: b(() => [
|
6245
|
-
(u(!0), B(Y, null,
|
6257
|
+
(u(!0), B(Y, null, ie(n(m), (R, j) => (u(), w(n(ge), {
|
6246
6258
|
key: R.id,
|
6247
6259
|
card: "",
|
6248
6260
|
border: "",
|
@@ -6255,10 +6267,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6255
6267
|
onRemove: (W) => n(I)(R)
|
6256
6268
|
}, {
|
6257
6269
|
default: b(() => [
|
6258
|
-
p(n(
|
6270
|
+
p(n(rt), {
|
6259
6271
|
size: "small",
|
6260
6272
|
"label-width": "60px",
|
6261
|
-
onKeydown: O[3] || (O[3] =
|
6273
|
+
onKeydown: O[3] || (O[3] = Rt(it(() => {
|
6262
6274
|
}, ["prevent", "stop"]), ["enter"]))
|
6263
6275
|
}, {
|
6264
6276
|
default: b(() => [
|
@@ -6336,9 +6348,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6336
6348
|
value: a
|
6337
6349
|
})), l = async (a) => {
|
6338
6350
|
const i = a.default;
|
6339
|
-
return i && !
|
6351
|
+
return i && !Xe(i, t.context, !0) ? !1 : (t.current.setProp(a), !0);
|
6340
6352
|
};
|
6341
|
-
return (a, i) => (u(), w(n(
|
6353
|
+
return (a, i) => (u(), w(n(Lt), {
|
6342
6354
|
title: e.value,
|
6343
6355
|
width: "800px",
|
6344
6356
|
height: "500px",
|
@@ -6355,7 +6367,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6355
6367
|
disabled: !!t.item,
|
6356
6368
|
rules: {
|
6357
6369
|
message: "名称格式错误",
|
6358
|
-
pattern: n(
|
6370
|
+
pattern: n(Ft)
|
6359
6371
|
}
|
6360
6372
|
}, null, 8, ["disabled", "rules"]),
|
6361
6373
|
p(n(J), {
|
@@ -6400,7 +6412,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6400
6412
|
},
|
6401
6413
|
setup(r) {
|
6402
6414
|
const t = r, e = x(() => t.item ? "编辑定义事件" : "新增定义事件"), s = C(t.item), o = async (l) => (t.item && t.current.removeEmit(t.item.name, !0), t.current.setEmit(l), !0);
|
6403
|
-
return (l, a) => (u(), w(n(
|
6415
|
+
return (l, a) => (u(), w(n(Lt), {
|
6404
6416
|
title: e.value,
|
6405
6417
|
width: "600px",
|
6406
6418
|
height: "200px",
|
@@ -6416,7 +6428,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6416
6428
|
disabled: !!t.item,
|
6417
6429
|
rules: {
|
6418
6430
|
message: "名称格式错误",
|
6419
|
-
pattern: n(
|
6431
|
+
pattern: n(Ft)
|
6420
6432
|
}
|
6421
6433
|
}, null, 8, ["disabled", "rules"]),
|
6422
6434
|
p(n(J), {
|
@@ -6452,7 +6464,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6452
6464
|
},
|
6453
6465
|
setup(r) {
|
6454
6466
|
const t = r, e = x(() => t.item ? "编辑定义插槽" : "新增定义插槽"), s = C(t.item), o = async (l) => (t.item && t.current.removeSlot(t.item.name, !0), t.current.setSlot(l), !0);
|
6455
|
-
return (l, a) => (u(), w(n(
|
6467
|
+
return (l, a) => (u(), w(n(Lt), {
|
6456
6468
|
title: e.value,
|
6457
6469
|
width: "600px",
|
6458
6470
|
height: "200px",
|
@@ -6468,7 +6480,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6468
6480
|
required: "",
|
6469
6481
|
rules: {
|
6470
6482
|
message: "名称格式错误",
|
6471
|
-
pattern: n(
|
6483
|
+
pattern: n(Ft)
|
6472
6484
|
}
|
6473
6485
|
}, null, 8, ["disabled", "rules"]),
|
6474
6486
|
p(n(J), {
|
@@ -6514,9 +6526,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6514
6526
|
)
|
6515
6527
|
), o = async (l) => {
|
6516
6528
|
const a = l.default;
|
6517
|
-
return a && (a.value = a.value || "null", !
|
6529
|
+
return a && (a.value = a.value || "null", !Xe(a, t.context, !0)) ? !1 : (t.current.setInject(l), !0);
|
6518
6530
|
};
|
6519
|
-
return (l, a) => (u(), w(n(
|
6531
|
+
return (l, a) => (u(), w(n(Lt), {
|
6520
6532
|
title: e.value,
|
6521
6533
|
width: "800px",
|
6522
6534
|
height: "500px",
|
@@ -6533,7 +6545,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6533
6545
|
disabled: !!t.item,
|
6534
6546
|
rules: {
|
6535
6547
|
message: "名称格式错误",
|
6536
|
-
pattern: n(
|
6548
|
+
pattern: n(Ft)
|
6537
6549
|
}
|
6538
6550
|
}, null, 8, ["disabled", "rules"]),
|
6539
6551
|
p(n(J), {
|
@@ -6564,11 +6576,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6564
6576
|
name: "DefinedWidget",
|
6565
6577
|
__name: "index",
|
6566
6578
|
setup(r) {
|
6567
|
-
const { current: t, context: e } =
|
6579
|
+
const { current: t, context: e } = Ze(), s = x(() => (t.value?.props || []).map((G) => typeof G == "string" ? { name: G } : G)), o = x(() => (t.value?.emits || []).map((G) => typeof G == "string" ? { name: G, params: [] } : Object.assign({ params: [] }, G))), l = x(() => (t.value?.slots || []).map((G) => typeof G == "string" ? { name: G, params: [] } : Object.assign({ params: [] }, G))), a = x(() => t.value?.inject || []), i = C(!1), c = C(), v = C(!1), g = C(), d = C(!1), m = C(), f = C(!1), h = C(), _ = () => {
|
6568
6580
|
c.value = void 0, i.value = !0;
|
6569
6581
|
}, y = (G) => {
|
6570
|
-
const { name: Z, modelValue:
|
6571
|
-
Z === "edit" && I(
|
6582
|
+
const { name: Z, modelValue: U } = G;
|
6583
|
+
Z === "edit" && I(U), Z === "remove" && t.value?.removeProp(U);
|
6572
6584
|
}, I = (G) => {
|
6573
6585
|
c.value = G, i.value = !0;
|
6574
6586
|
}, k = () => {
|
@@ -6576,22 +6588,22 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6576
6588
|
}, E = (G) => {
|
6577
6589
|
g.value = { ...G }, v.value = !0;
|
6578
6590
|
}, A = (G) => {
|
6579
|
-
const { name: Z, modelValue:
|
6580
|
-
Z === "edit" && E(
|
6591
|
+
const { name: Z, modelValue: U } = G;
|
6592
|
+
Z === "edit" && E(U), Z === "remove" && t.value?.removeEmit(U.name);
|
6581
6593
|
}, T = () => {
|
6582
6594
|
m.value = void 0, d.value = !0;
|
6583
6595
|
}, O = (G) => {
|
6584
6596
|
m.value = { ...G }, d.value = !0;
|
6585
6597
|
}, R = (G) => {
|
6586
|
-
const { name: Z, modelValue:
|
6587
|
-
Z === "edit" && O(
|
6598
|
+
const { name: Z, modelValue: U } = G;
|
6599
|
+
Z === "edit" && O(U), Z === "remove" && t.value?.removeSlot(U.name);
|
6588
6600
|
}, j = () => {
|
6589
6601
|
h.value = void 0, f.value = !0;
|
6590
6602
|
}, W = (G) => {
|
6591
6603
|
h.value = G, f.value = !0;
|
6592
6604
|
}, X = (G) => {
|
6593
|
-
const { name: Z, modelValue:
|
6594
|
-
Z === "edit" && W(
|
6605
|
+
const { name: Z, modelValue: U } = G;
|
6606
|
+
Z === "edit" && W(U), Z === "remove" && t.value?.removeInject(U);
|
6595
6607
|
};
|
6596
6608
|
return (G, Z) => n(t) && n(e) ? (u(), w(n(be), {
|
6597
6609
|
key: 0,
|
@@ -6609,12 +6621,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6609
6621
|
onPlus: _
|
6610
6622
|
}, {
|
6611
6623
|
default: b(() => [
|
6612
|
-
(u(!0), B(Y, null,
|
6613
|
-
"model-value":
|
6614
|
-
title:
|
6624
|
+
(u(!0), B(Y, null, ie(s.value, (U) => (u(), w(n($e), {
|
6625
|
+
"model-value": U,
|
6626
|
+
title: U.name,
|
6615
6627
|
border: "",
|
6616
6628
|
actions: ["edit", "remove"],
|
6617
|
-
onClick: (ue) => I(
|
6629
|
+
onClick: (ue) => I(U),
|
6618
6630
|
onAction: y
|
6619
6631
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
6620
6632
|
s.value.length ? D("", !0) : (u(), w(n(Pe), {
|
@@ -6626,7 +6638,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6626
6638
|
current: n(t),
|
6627
6639
|
context: n(e),
|
6628
6640
|
modelValue: i.value,
|
6629
|
-
"onUpdate:modelValue": Z[0] || (Z[0] = (
|
6641
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = (U) => i.value = U),
|
6630
6642
|
item: c.value
|
6631
6643
|
}, null, 8, ["current", "context", "modelValue", "item"])) : D("", !0)
|
6632
6644
|
]),
|
@@ -6641,12 +6653,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6641
6653
|
onPlus: k
|
6642
6654
|
}, {
|
6643
6655
|
default: b(() => [
|
6644
|
-
(u(!0), B(Y, null,
|
6645
|
-
"model-value":
|
6646
|
-
title:
|
6656
|
+
(u(!0), B(Y, null, ie(o.value, (U) => (u(), w(n($e), {
|
6657
|
+
"model-value": U,
|
6658
|
+
title: U.name,
|
6647
6659
|
border: "",
|
6648
6660
|
actions: ["remove"],
|
6649
|
-
onClick: (ue) => E(
|
6661
|
+
onClick: (ue) => E(U),
|
6650
6662
|
onAction: A
|
6651
6663
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
6652
6664
|
o.value.length ? D("", !0) : (u(), w(n(Pe), {
|
@@ -6656,7 +6668,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6656
6668
|
v.value ? (u(), w(Xd, {
|
6657
6669
|
key: 1,
|
6658
6670
|
modelValue: v.value,
|
6659
|
-
"onUpdate:modelValue": Z[1] || (Z[1] = (
|
6671
|
+
"onUpdate:modelValue": Z[1] || (Z[1] = (U) => v.value = U),
|
6660
6672
|
current: n(t),
|
6661
6673
|
context: n(e),
|
6662
6674
|
item: g.value
|
@@ -6673,12 +6685,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6673
6685
|
onPlus: T
|
6674
6686
|
}, {
|
6675
6687
|
default: b(() => [
|
6676
|
-
(u(!0), B(Y, null,
|
6677
|
-
"model-value":
|
6678
|
-
title:
|
6688
|
+
(u(!0), B(Y, null, ie(l.value, (U) => (u(), w(n($e), {
|
6689
|
+
"model-value": U,
|
6690
|
+
title: U.name,
|
6679
6691
|
border: "",
|
6680
6692
|
actions: ["remove"],
|
6681
|
-
onClick: (ue) => O(
|
6693
|
+
onClick: (ue) => O(U),
|
6682
6694
|
onAction: R
|
6683
6695
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
6684
6696
|
l.value.length ? D("", !0) : (u(), w(n(Pe), {
|
@@ -6688,7 +6700,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6688
6700
|
d.value ? (u(), w(Zd, {
|
6689
6701
|
key: 1,
|
6690
6702
|
modelValue: d.value,
|
6691
|
-
"onUpdate:modelValue": Z[2] || (Z[2] = (
|
6703
|
+
"onUpdate:modelValue": Z[2] || (Z[2] = (U) => d.value = U),
|
6692
6704
|
current: n(t),
|
6693
6705
|
context: n(e),
|
6694
6706
|
item: m.value
|
@@ -6706,12 +6718,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6706
6718
|
onPlus: j
|
6707
6719
|
}, {
|
6708
6720
|
default: b(() => [
|
6709
|
-
(u(!0), B(Y, null,
|
6710
|
-
"model-value":
|
6711
|
-
title:
|
6721
|
+
(u(!0), B(Y, null, ie(a.value, (U) => (u(), w(n($e), {
|
6722
|
+
"model-value": U,
|
6723
|
+
title: U.name,
|
6712
6724
|
border: "",
|
6713
6725
|
actions: ["remove"],
|
6714
|
-
onClick: (ue) => W(
|
6726
|
+
onClick: (ue) => W(U),
|
6715
6727
|
onAction: X
|
6716
6728
|
}, null, 8, ["model-value", "title", "onClick"]))), 256)),
|
6717
6729
|
a.value.length ? D("", !0) : (u(), w(n(Pe), {
|
@@ -6721,7 +6733,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6721
6733
|
f.value ? (u(), w(ep, {
|
6722
6734
|
key: 1,
|
6723
6735
|
modelValue: f.value,
|
6724
|
-
"onUpdate:modelValue": Z[3] || (Z[3] = (
|
6736
|
+
"onUpdate:modelValue": Z[3] || (Z[3] = (U) => f.value = U),
|
6725
6737
|
current: n(t),
|
6726
6738
|
context: n(e),
|
6727
6739
|
item: h.value
|
@@ -6814,12 +6826,12 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6814
6826
|
if (!t.item && t.current.dataSources[R])
|
6815
6827
|
return xe(`名称【${R}】已经存在,请更换名称`), !1;
|
6816
6828
|
if (T?.value) {
|
6817
|
-
if (!
|
6829
|
+
if (!Xe(T, t.context, !0))
|
6818
6830
|
return !1;
|
6819
6831
|
} else
|
6820
6832
|
A.transform = void 0;
|
6821
6833
|
if (O?.value) {
|
6822
|
-
if (!
|
6834
|
+
if (!Xe(O, t.context, !0))
|
6823
6835
|
return !1;
|
6824
6836
|
} else
|
6825
6837
|
A.test = void 0;
|
@@ -6834,7 +6846,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6834
6846
|
xe("请先填写测试用例");
|
6835
6847
|
return;
|
6836
6848
|
}
|
6837
|
-
if (!
|
6849
|
+
if (!Xe(c.value.test, t.context, !0))
|
6838
6850
|
return;
|
6839
6851
|
const T = async (...j) => {
|
6840
6852
|
if (c.value.type === "mock") {
|
@@ -6844,7 +6856,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6844
6856
|
let W = t.context?.$apis[c.value.ref];
|
6845
6857
|
if (W)
|
6846
6858
|
return await W.apply(W, j);
|
6847
|
-
|
6859
|
+
Ht.warn(`API【${c.value.ref}】不存在`);
|
6848
6860
|
}
|
6849
6861
|
}, O = Tn(c.value.test, {
|
6850
6862
|
runApi: T
|
@@ -6855,11 +6867,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6855
6867
|
const j = await O();
|
6856
6868
|
g.value = JSON.stringify(await R(j), null, 2), a?.enableIntercept();
|
6857
6869
|
} catch (j) {
|
6858
|
-
|
6870
|
+
Ht.error(j);
|
6859
6871
|
}
|
6860
6872
|
v.value = !1, d.value = !0;
|
6861
6873
|
};
|
6862
|
-
return (A, T) => (u(), w(n(
|
6874
|
+
return (A, T) => (u(), w(n(Lt), {
|
6863
6875
|
width: "1000px",
|
6864
6876
|
height: "700px",
|
6865
6877
|
title: f.value,
|
@@ -6916,7 +6928,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6916
6928
|
disabled: !!t.item,
|
6917
6929
|
rules: {
|
6918
6930
|
message: "名称格式错误",
|
6919
|
-
pattern: n(
|
6931
|
+
pattern: n(Ft)
|
6920
6932
|
}
|
6921
6933
|
}, null, 8, ["disabled", "rules"]),
|
6922
6934
|
p(n(J), {
|
@@ -7000,7 +7012,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7000
7012
|
name: "DataSourcesWidget",
|
7001
7013
|
__name: "index",
|
7002
7014
|
setup(r) {
|
7003
|
-
const { current: t, context: e } =
|
7015
|
+
const { current: t, context: e } = Ze(), s = C(!1), o = C(), l = x(() => Object.values(t.value?.dataSources || {}).filter(
|
7004
7016
|
(g) => ["meta", "api", "mock"].includes(g.type)
|
7005
7017
|
)), a = (g) => ({
|
7006
7018
|
api: "primary",
|
@@ -7029,7 +7041,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7029
7041
|
onPlus: i
|
7030
7042
|
}, {
|
7031
7043
|
default: b(() => [
|
7032
|
-
(u(!0), B(Y, null,
|
7044
|
+
(u(!0), B(Y, null, ie(l.value, (m) => (u(), w(n($e), {
|
7033
7045
|
border: "",
|
7034
7046
|
title: m.name,
|
7035
7047
|
subtitle: m.label,
|
@@ -7210,7 +7222,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7210
7222
|
collapsable: ""
|
7211
7223
|
}, {
|
7212
7224
|
default: b(() => [
|
7213
|
-
p(n(
|
7225
|
+
p(n(rt), {
|
7214
7226
|
size: "small",
|
7215
7227
|
"label-width": "80px"
|
7216
7228
|
}, {
|
@@ -7291,7 +7303,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7291
7303
|
name: "StyleWidget",
|
7292
7304
|
__name: "JsonMode",
|
7293
7305
|
setup(r) {
|
7294
|
-
const { selected: t } =
|
7306
|
+
const { selected: t } = Bt(), e = C(), s = x(() => {
|
7295
7307
|
const c = t.value?.model || null;
|
7296
7308
|
return Ne(c) ? null : c;
|
7297
7309
|
}), o = x(() => s.value?.getPropValue("style") || {}), l = x(() => cn(o.value) ? JSON.stringify({}) : JSON.stringify(Ls(o.value), null, 2)), a = (c) => {
|
@@ -7403,7 +7415,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7403
7415
|
wrap: "wrap"
|
7404
7416
|
}, {
|
7405
7417
|
default: b(() => [
|
7406
|
-
(u(), B(Y, null,
|
7418
|
+
(u(), B(Y, null, ie(e, (_) => V("span", {
|
7407
7419
|
onClick: (y) => v(_)
|
7408
7420
|
}, oe(_), 9, rp)), 64))
|
7409
7421
|
]),
|
@@ -7886,14 +7898,14 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7886
7898
|
collapsable: ""
|
7887
7899
|
}, {
|
7888
7900
|
default: b(() => [
|
7889
|
-
p(n(
|
7901
|
+
p(n(rt), {
|
7890
7902
|
class: "v-style-widget__sizing",
|
7891
7903
|
size: "small",
|
7892
7904
|
"label-width": "60px",
|
7893
7905
|
inline: ""
|
7894
7906
|
}, {
|
7895
7907
|
default: b(() => [
|
7896
|
-
(u(), B(Y, null,
|
7908
|
+
(u(), B(Y, null, ie(o, (i) => p(n(pe), {
|
7897
7909
|
name: i.name,
|
7898
7910
|
label: i.label,
|
7899
7911
|
setters: { name: i.setter },
|
@@ -7909,7 +7921,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7909
7921
|
_: 1
|
7910
7922
|
}));
|
7911
7923
|
}
|
7912
|
-
}), Np = { class: "v-style-widget__positioning" }, Pp = { class: "spacing-wrap" }, zp = ["width", "height"], Up = ["d"], Lp = ["d"], Fp = ["d"], Jp = ["d"], Wp = { id: "margin-outer" }, Hp = ["width", "height"], Qp = ["width", "height"], Gp = { id: "margin-inner" }, Kp = ["width", "height"], $p = ["width", "height"],
|
7924
|
+
}), Np = { class: "v-style-widget__positioning" }, Pp = { class: "spacing-wrap" }, zp = ["width", "height"], Up = ["d"], Lp = ["d"], Fp = ["d"], Jp = ["d"], Wp = { id: "margin-outer" }, Hp = ["width", "height"], Qp = ["width", "height"], Gp = { id: "margin-inner" }, Kp = ["width", "height"], $p = ["width", "height"], St = 36, At = 24, qp = /* @__PURE__ */ M({
|
7913
7925
|
__name: "positioning",
|
7914
7926
|
props: {
|
7915
7927
|
styleJson: {},
|
@@ -7946,7 +7958,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7946
7958
|
}, {
|
7947
7959
|
default: b(() => [
|
7948
7960
|
V("div", Np, [
|
7949
|
-
p(n(
|
7961
|
+
p(n(rt), {
|
7950
7962
|
"label-width": "60px",
|
7951
7963
|
size: "small"
|
7952
7964
|
}, {
|
@@ -7992,9 +8004,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7992
8004
|
d: `
|
7993
8005
|
m1,1
|
7994
8006
|
h${n(s) - 1}
|
7995
|
-
l-${
|
7996
|
-
h-${n(s) - 2 *
|
7997
|
-
l-${
|
8007
|
+
l-${St},${At}
|
8008
|
+
h-${n(s) - 2 * St}
|
8009
|
+
l-${St},-${At}z`,
|
7998
8010
|
"data-automation-id": "padding-top-button",
|
7999
8011
|
"aria-label": "Padding top button",
|
8000
8012
|
class: "tb-path-color",
|
@@ -8010,9 +8022,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8010
8022
|
d: `
|
8011
8023
|
m${n(s) - 1},1
|
8012
8024
|
v${n(o) - 1}
|
8013
|
-
l-${
|
8014
|
-
v-${n(o) - 2 *
|
8015
|
-
l${
|
8025
|
+
l-${St},-${At}
|
8026
|
+
v-${n(o) - 2 * At}
|
8027
|
+
l${St},-${At}z`,
|
8016
8028
|
"data-automation-id": "padding-right-button",
|
8017
8029
|
"aria-label": "Padding right button",
|
8018
8030
|
class: "lr-path-color",
|
@@ -8028,9 +8040,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8028
8040
|
d: `
|
8029
8041
|
m1,${n(o) - 1}
|
8030
8042
|
h${n(s) - 1}
|
8031
|
-
l-${
|
8032
|
-
h-${n(s) - 2 *
|
8033
|
-
l-${
|
8043
|
+
l-${St},-${At}
|
8044
|
+
h-${n(s) - 2 * St}
|
8045
|
+
l-${St},${At}z`,
|
8034
8046
|
"data-automation-id": "padding-bottom-button",
|
8035
8047
|
"aria-label": "Padding bottom button",
|
8036
8048
|
class: "tb-path-color",
|
@@ -8046,9 +8058,9 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8046
8058
|
d: `
|
8047
8059
|
m1,1
|
8048
8060
|
v${n(o) - 1}
|
8049
|
-
l${
|
8050
|
-
v-${n(o) - 2 *
|
8051
|
-
l-${
|
8061
|
+
l${St},-${At}
|
8062
|
+
v-${n(o) - 2 * At}
|
8063
|
+
l-${St},-${At}z`,
|
8052
8064
|
"data-automation-id": "padding-left-button",
|
8053
8065
|
"aria-label": "Padding left button",
|
8054
8066
|
class: "lr-path-color",
|
@@ -8084,8 +8096,8 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8084
8096
|
V("rect", {
|
8085
8097
|
x: "36",
|
8086
8098
|
y: "24",
|
8087
|
-
width: n(s) - 2 *
|
8088
|
-
height: n(o) - 2 *
|
8099
|
+
width: n(s) - 2 * St + 1,
|
8100
|
+
height: n(o) - 2 * At + 1,
|
8089
8101
|
fill: "transparent",
|
8090
8102
|
rx: "2",
|
8091
8103
|
ry: "2",
|
@@ -8097,8 +8109,8 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8097
8109
|
"clip-path": "url(#margin-inner)",
|
8098
8110
|
x: "36",
|
8099
8111
|
y: "24",
|
8100
|
-
width: n(s) - 2 *
|
8101
|
-
height: n(o) - 2 *
|
8112
|
+
width: n(s) - 2 * St + 1,
|
8113
|
+
height: n(o) - 2 * At + 1,
|
8102
8114
|
fill: "transparent",
|
8103
8115
|
rx: "2",
|
8104
8116
|
ry: "2",
|
@@ -8228,14 +8240,14 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8228
8240
|
collapsable: ""
|
8229
8241
|
}, {
|
8230
8242
|
default: b(() => [
|
8231
|
-
p(n(
|
8243
|
+
p(n(rt), {
|
8232
8244
|
class: "v-style-widget__texting",
|
8233
8245
|
size: "small",
|
8234
8246
|
"label-width": "60px",
|
8235
8247
|
inline: ""
|
8236
8248
|
}, {
|
8237
8249
|
default: b(() => [
|
8238
|
-
(u(), B(Y, null,
|
8250
|
+
(u(), B(Y, null, ie(e, (c) => p(n(pe), {
|
8239
8251
|
name: c.name,
|
8240
8252
|
label: c.label,
|
8241
8253
|
setters: { name: c.setter },
|
@@ -8247,7 +8259,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8247
8259
|
]),
|
8248
8260
|
_: 1
|
8249
8261
|
}),
|
8250
|
-
p(n(
|
8262
|
+
p(n(rt), {
|
8251
8263
|
size: "small",
|
8252
8264
|
"label-width": "60px"
|
8253
8265
|
}, {
|
@@ -8333,7 +8345,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8333
8345
|
collapsable: ""
|
8334
8346
|
}, {
|
8335
8347
|
default: b(() => [
|
8336
|
-
p(n(
|
8348
|
+
p(n(rt), {
|
8337
8349
|
"label-width": "60px",
|
8338
8350
|
size: "small"
|
8339
8351
|
}, {
|
@@ -8445,7 +8457,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8445
8457
|
collapsable: ""
|
8446
8458
|
}, {
|
8447
8459
|
default: b(() => [
|
8448
|
-
p(n(
|
8460
|
+
p(n(rt), {
|
8449
8461
|
"label-width": "60px",
|
8450
8462
|
size: "small"
|
8451
8463
|
}, {
|
@@ -8563,7 +8575,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8563
8575
|
collapsable: ""
|
8564
8576
|
}, {
|
8565
8577
|
default: b(() => [
|
8566
|
-
p(n(
|
8578
|
+
p(n(rt), {
|
8567
8579
|
"label-width": "60px",
|
8568
8580
|
size: "small"
|
8569
8581
|
}, {
|
@@ -8613,7 +8625,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8613
8625
|
isStyleCodeMode: { type: Boolean }
|
8614
8626
|
},
|
8615
8627
|
setup(r) {
|
8616
|
-
const t = r, { selected: e } =
|
8628
|
+
const t = r, { selected: e } = Bt(), s = x(() => {
|
8617
8629
|
const c = e.value?.model || null;
|
8618
8630
|
return Ne(c) ? null : c;
|
8619
8631
|
}), o = x(() => s.value?.getPropValue("style") || {}), l = x(() => Ls(o.value)), a = x(() => cn(o.value)), i = (c, v) => {
|
@@ -8696,7 +8708,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8696
8708
|
path: { type: Function }
|
8697
8709
|
},
|
8698
8710
|
setup(r, { expose: t }) {
|
8699
|
-
const e = r, s = C(), o = C(Symbol()), { current: l, engine: a } =
|
8711
|
+
const e = r, s = C(), o = C(Symbol()), { current: l, engine: a } = Ze(), { width: i, height: c } = wn(s), v = x(() => l.value && e.path ? e.path(l.value, a.project.value) : null), g = x(() => a.skeleton?.getWidget("Toolbar")?.widgetRef.mode ?? "pc");
|
8700
8712
|
return t({
|
8701
8713
|
refresh: () => {
|
8702
8714
|
o.value = Symbol();
|
@@ -8729,7 +8741,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8729
8741
|
inheritAttrs: !1,
|
8730
8742
|
__name: "index",
|
8731
8743
|
setup(r) {
|
8732
|
-
const { selected: t, designer: e } =
|
8744
|
+
const { selected: t, designer: e } = Bt(), s = x(() => (t.value?.path || []).slice(0).reverse()), o = (a) => {
|
8733
8745
|
e.value?.setSelected(a);
|
8734
8746
|
}, l = (a) => {
|
8735
8747
|
e.value?.setHover(a);
|
@@ -8740,7 +8752,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8740
8752
|
"separator-icon": n(Yr)
|
8741
8753
|
}, {
|
8742
8754
|
default: b(() => [
|
8743
|
-
(u(!0), B(Y, null,
|
8755
|
+
(u(!0), B(Y, null, ie(s.value, (c) => (u(), w(n(Il), {
|
8744
8756
|
onClick: (v) => o(c),
|
8745
8757
|
onMouseover: (v) => l(c)
|
8746
8758
|
}, {
|
@@ -8757,11 +8769,11 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8757
8769
|
name: "SchemaWidget",
|
8758
8770
|
__name: "index",
|
8759
8771
|
setup(r) {
|
8760
|
-
const { current: t } =
|
8772
|
+
const { current: t } = Ze(), e = C(), s = x(
|
8761
8773
|
() => JSON.stringify(t.value?.toDsl() || {}, null, 2)
|
8762
8774
|
), o = x(() => t.value ? t.value.name : ""), l = async () => {
|
8763
8775
|
const i = (e.value?.getEditor()).getValue();
|
8764
|
-
if (i && await
|
8776
|
+
if (i && await Qt(
|
8765
8777
|
"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"
|
8766
8778
|
))
|
8767
8779
|
try {
|
@@ -8797,10 +8809,10 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8797
8809
|
name: "RawWidget",
|
8798
8810
|
__name: "index",
|
8799
8811
|
setup(r) {
|
8800
|
-
const { current: t, engine: e } =
|
8812
|
+
const { current: t, engine: e } = Ze(), s = C(), o = C(""), l = x(() => t.value ? `$vtj/vue/${t.value.id}.vue` : ""), a = x(() => t.value ? t.value.name : ""), i = async () => {
|
8801
8813
|
const v = (s.value?.getEditor()).getValue();
|
8802
8814
|
if (v) {
|
8803
|
-
const g = await
|
8815
|
+
const g = await Qt(
|
8804
8816
|
"手动修改源码有风险,可能导致页面无法加载,请确认您的操作无误。"
|
8805
8817
|
), d = e.project.value?.toDsl();
|
8806
8818
|
if (g && t.value && d) {
|
@@ -8935,7 +8947,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8935
8947
|
V("span", null, oe(n(jn)), 1)
|
8936
8948
|
])
|
8937
8949
|
]),
|
8938
|
-
a.value ? (u(), w(n(
|
8950
|
+
a.value ? (u(), w(n(pt), {
|
8939
8951
|
key: 0,
|
8940
8952
|
direction: "vertical"
|
8941
8953
|
})) : D("", !0),
|
@@ -9066,7 +9078,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9066
9078
|
"model-value": e.type,
|
9067
9079
|
"suffix-icon": n(kn)
|
9068
9080
|
}, m.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
9069
|
-
a.value ? (u(), w(n(
|
9081
|
+
a.value ? (u(), w(n(Dt), {
|
9070
9082
|
key: 0,
|
9071
9083
|
modelValue: a.value,
|
9072
9084
|
"onUpdate:modelValue": f[0] || (f[0] = (h) => a.value = h),
|
@@ -9125,7 +9137,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9125
9137
|
type: "JSFunction",
|
9126
9138
|
value: m
|
9127
9139
|
};
|
9128
|
-
|
9140
|
+
Xe(f, {}) && (o.value = m, i("change", f), l.value = !1);
|
9129
9141
|
}
|
9130
9142
|
}, v = () => {
|
9131
9143
|
o.value = "", i("change", void 0), l.value = !1;
|
@@ -9141,7 +9153,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9141
9153
|
"model-value": "JSFunction",
|
9142
9154
|
"suffix-icon": n(kn)
|
9143
9155
|
}, d.$attrs), null, 16, ["suffix-icon"]),
|
9144
|
-
l.value ? (u(), w(n(
|
9156
|
+
l.value ? (u(), w(n(Dt), {
|
9145
9157
|
key: 0,
|
9146
9158
|
modelValue: l.value,
|
9147
9159
|
"onUpdate:modelValue": m[0] || (m[0] = (f) => l.value = f),
|
@@ -9209,7 +9221,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9209
9221
|
"model-value": e.type,
|
9210
9222
|
"suffix-icon": n(kn)
|
9211
9223
|
}, d.$attrs), null, 16, ["model-value", "suffix-icon"]),
|
9212
|
-
a.value ? (u(), w(n(
|
9224
|
+
a.value ? (u(), w(n(Dt), {
|
9213
9225
|
key: 0,
|
9214
9226
|
modelValue: a.value,
|
9215
9227
|
"onUpdate:modelValue": m[0] || (m[0] = (f) => a.value = f),
|
@@ -9263,7 +9275,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9263
9275
|
title: "UniApp 配置"
|
9264
9276
|
}, {
|
9265
9277
|
default: b(() => [
|
9266
|
-
p(n(
|
9278
|
+
p(n(pt), {
|
9267
9279
|
"content-position": "center",
|
9268
9280
|
"border-style": "dotted"
|
9269
9281
|
}, {
|
@@ -9273,14 +9285,14 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9273
9285
|
_: 1,
|
9274
9286
|
__: [7]
|
9275
9287
|
}),
|
9276
|
-
p(n(
|
9288
|
+
p(n(rt), {
|
9277
9289
|
size: "small",
|
9278
9290
|
"label-position": "top"
|
9279
9291
|
}, {
|
9280
9292
|
default: b(() => [
|
9281
9293
|
p(n(fn), {
|
9282
9294
|
label: "manifest.json",
|
9283
|
-
onKeydown: a[1] || (a[1] =
|
9295
|
+
onKeydown: a[1] || (a[1] = Rt(it(() => {
|
9284
9296
|
}, ["prevent"]), ["enter", "native"]))
|
9285
9297
|
}, {
|
9286
9298
|
default: b(() => [
|
@@ -9293,7 +9305,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9293
9305
|
}),
|
9294
9306
|
p(n(fn), {
|
9295
9307
|
label: "pages.json",
|
9296
|
-
onKeydown: a[3] || (a[3] =
|
9308
|
+
onKeydown: a[3] || (a[3] = Rt(it(() => {
|
9297
9309
|
}, ["prevent"]), ["enter", "native"]))
|
9298
9310
|
}, {
|
9299
9311
|
default: b(() => [
|
@@ -9306,7 +9318,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9306
9318
|
}),
|
9307
9319
|
p(n(fn), {
|
9308
9320
|
label: "CSS",
|
9309
|
-
onKeydown: a[5] || (a[5] =
|
9321
|
+
onKeydown: a[5] || (a[5] = Rt(it(() => {
|
9310
9322
|
}, ["prevent"]), ["enter", "native"]))
|
9311
9323
|
}, {
|
9312
9324
|
default: b(() => [
|
@@ -9320,7 +9332,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9320
9332
|
]),
|
9321
9333
|
_: 1
|
9322
9334
|
}),
|
9323
|
-
p(n(
|
9335
|
+
p(n(pt), {
|
9324
9336
|
"content-position": "center",
|
9325
9337
|
"border-style": "dotted"
|
9326
9338
|
}, {
|
@@ -9330,13 +9342,13 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9330
9342
|
_: 1,
|
9331
9343
|
__: [8]
|
9332
9344
|
}),
|
9333
|
-
p(n(
|
9345
|
+
p(n(rt), {
|
9334
9346
|
size: "small",
|
9335
9347
|
"label-position": "top"
|
9336
9348
|
}, {
|
9337
9349
|
default: b(() => [
|
9338
|
-
(u(!0), B(Y, null,
|
9339
|
-
onKeydown: a[6] || (a[6] =
|
9350
|
+
(u(!0), B(Y, null, ie(n(t), (i) => (u(), w(n(fn), {
|
9351
|
+
onKeydown: a[6] || (a[6] = Rt(it(() => {
|
9340
9352
|
}, ["prevent"]), ["enter", "native"])),
|
9341
9353
|
label: i,
|
9342
9354
|
key: i
|
@@ -9419,7 +9431,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9419
9431
|
const O = Number(m.value);
|
9420
9432
|
return h.value[O].model;
|
9421
9433
|
}), k = x(() => `(共 ${s.value.length} 个)`), E = async (O) => {
|
9422
|
-
await l() ? await a(O.id) : await
|
9434
|
+
await l() ? await a(O.id) : await jt.confirm(
|
9423
9435
|
"使用模版需登录,您还没登录或已过期,请重新登录!",
|
9424
9436
|
"提示",
|
9425
9437
|
{
|
@@ -9428,13 +9440,13 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9428
9440
|
}
|
9429
9441
|
).catch(() => !1) && o();
|
9430
9442
|
}, A = (O) => O.share ? !1 : O.userId === i?.getData()?.id, T = async (O) => {
|
9431
|
-
await
|
9443
|
+
await jt.confirm("确定删除该模版?", "提示", {
|
9432
9444
|
type: "warning"
|
9433
9445
|
}).catch(() => !1) && (await g(O.id), c());
|
9434
9446
|
};
|
9435
9447
|
return t({
|
9436
9448
|
refreshTemplates: c
|
9437
|
-
}), (O, R) =>
|
9449
|
+
}), (O, R) => Ct((u(), w(n(ge), {
|
9438
9450
|
class: "v-blocks-widget v-templates-widgets",
|
9439
9451
|
title: "模板",
|
9440
9452
|
subtitle: k.value,
|
@@ -9466,7 +9478,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9466
9478
|
"onUpdate:modelValue": R[1] || (R[1] = (j) => _.value = j)
|
9467
9479
|
}, {
|
9468
9480
|
default: b(() => [
|
9469
|
-
(u(!0), B(Y, null,
|
9481
|
+
(u(!0), B(Y, null, ie(I.value, (j, W) => (u(), w(n(as), {
|
9470
9482
|
name: W,
|
9471
9483
|
title: `${W} (${j.length})`
|
9472
9484
|
}, {
|
@@ -9476,7 +9488,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9476
9488
|
gutter: 5
|
9477
9489
|
}, {
|
9478
9490
|
default: b(() => [
|
9479
|
-
(u(!0), B(Y, null,
|
9491
|
+
(u(!0), B(Y, null, ie(j, (X) => (u(), w(n(Yn), {
|
9480
9492
|
key: X.id,
|
9481
9493
|
span: n(e)
|
9482
9494
|
}, {
|
@@ -9560,7 +9572,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9560
9572
|
[n(Ys), n(v)]
|
9561
9573
|
]);
|
9562
9574
|
}
|
9563
|
-
}), Tm = /* @__PURE__ */
|
9575
|
+
}), Tm = /* @__PURE__ */ wt(Rm, [["__scopeId", "data-v-146ae3c1"]]), jm = /* @__PURE__ */ M({
|
9564
9576
|
__name: "index",
|
9565
9577
|
setup(r) {
|
9566
9578
|
const t = Me(), { access: e } = t || {}, s = x(() => {
|
@@ -9573,13 +9585,13 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9573
9585
|
size: 30,
|
9574
9586
|
icon: n(ao),
|
9575
9587
|
src: s.value
|
9576
|
-
}, null, 8, ["icon", "src"])) : (u(), w(n(
|
9588
|
+
}, null, 8, ["icon", "src"])) : (u(), w(n(mt), {
|
9577
9589
|
key: 1,
|
9578
9590
|
icon: n(Xr),
|
9579
9591
|
size: 20
|
9580
9592
|
}, null, 8, ["icon"]));
|
9581
9593
|
}
|
9582
|
-
}), Dm = /* @__PURE__ */
|
9594
|
+
}), Dm = /* @__PURE__ */ wt(jm, [["__scopeId", "data-v-03f3833f"]]), Bm = { class: "v-ai-widget-record" }, Om = {
|
9583
9595
|
key: 0,
|
9584
9596
|
class: "v-ai-widget-record__list"
|
9585
9597
|
}, Mm = /* @__PURE__ */ M({
|
@@ -9612,7 +9624,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9612
9624
|
_: 1,
|
9613
9625
|
__: [0]
|
9614
9626
|
}, 8, ["icon"]),
|
9615
|
-
p(n(
|
9627
|
+
p(n(pt), {
|
9616
9628
|
"content-position": "left",
|
9617
9629
|
"border-style": "dotted"
|
9618
9630
|
}, {
|
@@ -9623,7 +9635,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9623
9635
|
__: [1]
|
9624
9636
|
}),
|
9625
9637
|
e.topics.length ? (u(), B("div", Om, [
|
9626
|
-
(u(!0), B(Y, null,
|
9638
|
+
(u(!0), B(Y, null, ie(e.topics, (v, g) => (u(), w(n($e), {
|
9627
9639
|
index: g + 1,
|
9628
9640
|
title: v.title,
|
9629
9641
|
"model-value": v,
|
@@ -9670,7 +9682,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9670
9682
|
), ne(
|
9671
9683
|
() => l.state.autoApply,
|
9672
9684
|
(g) => {
|
9673
|
-
|
9685
|
+
yt.success({
|
9674
9686
|
message: g ? "已开启自动应用到页面功能" : "已经关闭自动应用到页面功能"
|
9675
9687
|
});
|
9676
9688
|
}
|
@@ -9711,7 +9723,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9711
9723
|
disabled: s.lockModel || s.loading
|
9712
9724
|
}, {
|
9713
9725
|
default: b(() => [
|
9714
|
-
(u(!0), B(Y, null,
|
9726
|
+
(u(!0), B(Y, null, ie(s.models, (m) => (u(), w(n(ta), {
|
9715
9727
|
label: m.label,
|
9716
9728
|
value: m.value
|
9717
9729
|
}, null, 8, ["label", "value"]))), 256))
|
@@ -9758,7 +9770,7 @@ const xu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
9758
9770
|
src: s.value
|
9759
9771
|
}, null, 8, ["icon", "src"]));
|
9760
9772
|
}
|
9761
|
-
}), Um = /* @__PURE__ */
|
9773
|
+
}), Um = /* @__PURE__ */ wt(zm, [["__scopeId", "data-v-8432885d"]]);
|
9762
9774
|
function Lm(r) {
|
9763
9775
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
9764
9776
|
}
|
@@ -10001,7 +10013,7 @@ function Fm() {
|
|
10001
10013
|
return se;
|
10002
10014
|
}).map((me) => `(${me})`).join(N);
|
10003
10015
|
}
|
10004
|
-
const O = /\b\B/, R = "[a-zA-Z]\\w*", j = "[a-zA-Z_]\\w*", W = "\\b\\d+(\\.\\d+)?", X = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", G = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
|
10016
|
+
const O = /\b\B/, R = "[a-zA-Z]\\w*", j = "[a-zA-Z_]\\w*", W = "\\b\\d+(\\.\\d+)?", X = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", G = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", U = (S = {}) => {
|
10005
10017
|
const N = /^#![ ]*\//;
|
10006
10018
|
return S.binary && (S.begin = _(
|
10007
10019
|
N,
|
@@ -10101,19 +10113,19 @@ function Fm() {
|
|
10101
10113
|
// look for 3 words in a row
|
10102
10114
|
}
|
10103
10115
|
), me;
|
10104
|
-
}, ke = q("//", "$"), _e = q("/\\*", "\\*/"), ze = q("#", "$"),
|
10116
|
+
}, ke = q("//", "$"), _e = q("/\\*", "\\*/"), ze = q("#", "$"), Et = {
|
10105
10117
|
scope: "number",
|
10106
10118
|
begin: W,
|
10107
10119
|
relevance: 0
|
10108
|
-
},
|
10120
|
+
}, kt = {
|
10109
10121
|
scope: "number",
|
10110
10122
|
begin: X,
|
10111
10123
|
relevance: 0
|
10112
|
-
},
|
10124
|
+
}, qe = {
|
10113
10125
|
scope: "number",
|
10114
10126
|
begin: G,
|
10115
10127
|
relevance: 0
|
10116
|
-
},
|
10128
|
+
}, et = {
|
10117
10129
|
scope: "regexp",
|
10118
10130
|
begin: /\/(?=[^/\n]*\/)/,
|
10119
10131
|
end: /\/[gimuy]*/,
|
@@ -10126,29 +10138,29 @@ function Fm() {
|
|
10126
10138
|
contains: [ue]
|
10127
10139
|
}
|
10128
10140
|
]
|
10129
|
-
},
|
10141
|
+
}, Ot = {
|
10130
10142
|
scope: "title",
|
10131
10143
|
begin: R,
|
10132
10144
|
relevance: 0
|
10133
|
-
},
|
10145
|
+
}, tt = {
|
10134
10146
|
scope: "title",
|
10135
10147
|
begin: j,
|
10136
10148
|
relevance: 0
|
10137
|
-
},
|
10149
|
+
}, Ge = {
|
10138
10150
|
// excludes method names from keyword processing
|
10139
10151
|
begin: "\\.\\s*" + j,
|
10140
10152
|
relevance: 0
|
10141
10153
|
};
|
10142
|
-
var
|
10154
|
+
var _t = /* @__PURE__ */ Object.freeze({
|
10143
10155
|
__proto__: null,
|
10144
10156
|
APOS_STRING_MODE: P,
|
10145
10157
|
BACKSLASH_ESCAPE: ue,
|
10146
|
-
BINARY_NUMBER_MODE:
|
10158
|
+
BINARY_NUMBER_MODE: qe,
|
10147
10159
|
BINARY_NUMBER_RE: G,
|
10148
10160
|
COMMENT: q,
|
10149
10161
|
C_BLOCK_COMMENT_MODE: _e,
|
10150
10162
|
C_LINE_COMMENT_MODE: ke,
|
10151
|
-
C_NUMBER_MODE:
|
10163
|
+
C_NUMBER_MODE: kt,
|
10152
10164
|
C_NUMBER_RE: X,
|
10153
10165
|
END_SAME_AS_BEGIN: function(S) {
|
10154
10166
|
return Object.assign(
|
@@ -10168,31 +10180,31 @@ function Fm() {
|
|
10168
10180
|
HASH_COMMENT_MODE: ze,
|
10169
10181
|
IDENT_RE: R,
|
10170
10182
|
MATCH_NOTHING_RE: O,
|
10171
|
-
METHOD_GUARD:
|
10172
|
-
NUMBER_MODE:
|
10183
|
+
METHOD_GUARD: Ge,
|
10184
|
+
NUMBER_MODE: Et,
|
10173
10185
|
NUMBER_RE: W,
|
10174
10186
|
PHRASAL_WORDS_MODE: H,
|
10175
10187
|
QUOTE_STRING_MODE: L,
|
10176
|
-
REGEXP_MODE:
|
10188
|
+
REGEXP_MODE: et,
|
10177
10189
|
RE_STARTERS_RE: Z,
|
10178
|
-
SHEBANG:
|
10179
|
-
TITLE_MODE:
|
10190
|
+
SHEBANG: U,
|
10191
|
+
TITLE_MODE: Ot,
|
10180
10192
|
UNDERSCORE_IDENT_RE: j,
|
10181
|
-
UNDERSCORE_TITLE_MODE:
|
10193
|
+
UNDERSCORE_TITLE_MODE: tt
|
10182
10194
|
});
|
10183
|
-
function
|
10195
|
+
function Mt(S, N) {
|
10184
10196
|
S.input[S.index - 1] === "." && N.ignoreMatch();
|
10185
10197
|
}
|
10186
|
-
function
|
10198
|
+
function vt(S, N) {
|
10187
10199
|
S.className !== void 0 && (S.scope = S.className, delete S.className);
|
10188
10200
|
}
|
10189
|
-
function
|
10190
|
-
N && S.beginKeywords && (S.begin = "\\b(" + S.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", S.__beforeBegin =
|
10201
|
+
function lt(S, N) {
|
10202
|
+
N && S.beginKeywords && (S.begin = "\\b(" + S.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", S.__beforeBegin = Mt, S.keywords = S.keywords || S.beginKeywords, delete S.beginKeywords, S.relevance === void 0 && (S.relevance = 0));
|
10191
10203
|
}
|
10192
10204
|
function nt(S, N) {
|
10193
10205
|
Array.isArray(S.illegal) && (S.illegal = I(...S.illegal));
|
10194
10206
|
}
|
10195
|
-
function
|
10207
|
+
function Gt(S, N) {
|
10196
10208
|
if (S.match) {
|
10197
10209
|
if (S.begin || S.end) throw new Error("begin & end are not supported with match");
|
10198
10210
|
S.begin = S.match, delete S.match;
|
@@ -10229,12 +10241,12 @@ function Fm() {
|
|
10229
10241
|
"value"
|
10230
10242
|
// common variable name
|
10231
10243
|
], hs = "keyword";
|
10232
|
-
function
|
10244
|
+
function Jt(S, N, Q = hs) {
|
10233
10245
|
const me = /* @__PURE__ */ Object.create(null);
|
10234
10246
|
return typeof S == "string" ? Ue(Q, S.split(" ")) : Array.isArray(S) ? Ue(Q, S) : Object.keys(S).forEach(function(Le) {
|
10235
10247
|
Object.assign(
|
10236
10248
|
me,
|
10237
|
-
|
10249
|
+
Jt(S[Le], N, Le)
|
10238
10250
|
);
|
10239
10251
|
}), me;
|
10240
10252
|
function Ue(Le, se) {
|
@@ -10250,13 +10262,13 @@ function Fm() {
|
|
10250
10262
|
function ys(S) {
|
10251
10263
|
return fs.includes(S.toLowerCase());
|
10252
10264
|
}
|
10253
|
-
const Mn = {},
|
10265
|
+
const Mn = {}, Nt = (S) => {
|
10254
10266
|
console.error(S);
|
10255
10267
|
}, Nn = (S, ...N) => {
|
10256
10268
|
console.log(`WARN: ${S}`, ...N);
|
10257
|
-
},
|
10269
|
+
}, z = (S, N) => {
|
10258
10270
|
Mn[`${S}/${N}`] || (console.log(`Deprecated as of ${S}. ${N}`), Mn[`${S}/${N}`] = !0);
|
10259
|
-
},
|
10271
|
+
}, le = new Error();
|
10260
10272
|
function we(S, N, { key: Q }) {
|
10261
10273
|
let me = 0;
|
10262
10274
|
const Ue = S[Q], Le = {}, se = {};
|
@@ -10267,25 +10279,25 @@ function Fm() {
|
|
10267
10279
|
function Ce(S) {
|
10268
10280
|
if (Array.isArray(S.begin)) {
|
10269
10281
|
if (S.skip || S.excludeBegin || S.returnBegin)
|
10270
|
-
throw
|
10282
|
+
throw Nt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), le;
|
10271
10283
|
if (typeof S.beginScope != "object" || S.beginScope === null)
|
10272
|
-
throw
|
10284
|
+
throw Nt("beginScope must be object"), le;
|
10273
10285
|
we(S, S.begin, { key: "beginScope" }), S.begin = T(S.begin, { joinWith: "" });
|
10274
10286
|
}
|
10275
10287
|
}
|
10276
10288
|
function fe(S) {
|
10277
10289
|
if (Array.isArray(S.end)) {
|
10278
10290
|
if (S.skip || S.excludeEnd || S.returnEnd)
|
10279
|
-
throw
|
10291
|
+
throw Nt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), le;
|
10280
10292
|
if (typeof S.endScope != "object" || S.endScope === null)
|
10281
|
-
throw
|
10293
|
+
throw Nt("endScope must be object"), le;
|
10282
10294
|
we(S, S.end, { key: "endScope" }), S.end = T(S.end, { joinWith: "" });
|
10283
10295
|
}
|
10284
10296
|
}
|
10285
10297
|
function st(S) {
|
10286
10298
|
S.scope && typeof S.scope == "object" && S.scope !== null && (S.beginScope = S.scope, delete S.scope);
|
10287
10299
|
}
|
10288
|
-
function
|
10300
|
+
function ot(S) {
|
10289
10301
|
st(S), typeof S.beginScope == "string" && (S.beginScope = { _wrap: S.beginScope }), typeof S.endScope == "string" && (S.endScope = { _wrap: S.endScope }), Ce(S), fe(S);
|
10290
10302
|
}
|
10291
10303
|
function _n(S) {
|
@@ -10314,8 +10326,8 @@ function Fm() {
|
|
10314
10326
|
const de = this.matcherRe.exec(ee);
|
10315
10327
|
if (!de)
|
10316
10328
|
return null;
|
10317
|
-
const
|
10318
|
-
return de.splice(0,
|
10329
|
+
const Ke = de.findIndex((Sn, ks) => ks > 0 && Sn !== void 0), We = this.matchIndexes[Ke];
|
10330
|
+
return de.splice(0, Ke), Object.assign(de, We);
|
10319
10331
|
}
|
10320
10332
|
}
|
10321
10333
|
class me {
|
@@ -10326,7 +10338,7 @@ function Fm() {
|
|
10326
10338
|
getMatcher(ee) {
|
10327
10339
|
if (this.multiRegexes[ee]) return this.multiRegexes[ee];
|
10328
10340
|
const de = new Q();
|
10329
|
-
return this.rules.slice(ee).forEach(([
|
10341
|
+
return this.rules.slice(ee).forEach(([Ke, We]) => de.addRule(Ke, We)), de.compile(), this.multiRegexes[ee] = de, de;
|
10330
10342
|
}
|
10331
10343
|
resumingScanAtSamePosition() {
|
10332
10344
|
return this.regexIndex !== 0;
|
@@ -10342,12 +10354,12 @@ function Fm() {
|
|
10342
10354
|
exec(ee) {
|
10343
10355
|
const de = this.getMatcher(this.regexIndex);
|
10344
10356
|
de.lastIndex = this.lastIndex;
|
10345
|
-
let
|
10346
|
-
if (this.resumingScanAtSamePosition() && !(
|
10357
|
+
let Ke = de.exec(ee);
|
10358
|
+
if (this.resumingScanAtSamePosition() && !(Ke && Ke.index === this.lastIndex)) {
|
10347
10359
|
const We = this.getMatcher(0);
|
10348
|
-
We.lastIndex = this.lastIndex + 1,
|
10360
|
+
We.lastIndex = this.lastIndex + 1, Ke = We.exec(ee);
|
10349
10361
|
}
|
10350
|
-
return
|
10362
|
+
return Ke && (this.regexIndex += Ke.position + 1, this.regexIndex === this.count && this.considerAll()), Ke;
|
10351
10363
|
}
|
10352
10364
|
}
|
10353
10365
|
function Ue(se) {
|
@@ -10361,22 +10373,22 @@ function Fm() {
|
|
10361
10373
|
);
|
10362
10374
|
if (se.isCompiled) return de;
|
10363
10375
|
[
|
10364
|
-
|
10376
|
+
vt,
|
10365
10377
|
// do this early so compiler extensions generally don't have to worry about
|
10366
10378
|
// the distinction between match/begin
|
10367
|
-
Ht,
|
10368
10379
|
Gt,
|
10380
|
+
ot,
|
10369
10381
|
gs
|
10370
10382
|
].forEach((We) => We(se, ee)), S.compilerExtensions.forEach((We) => We(se, ee)), se.__beforeBegin = null, [
|
10371
|
-
|
10383
|
+
lt,
|
10372
10384
|
// do this later so compiler extensions that come earlier have access to the
|
10373
10385
|
// raw array if they wanted to perhaps manipulate it, etc.
|
10374
10386
|
nt,
|
10375
10387
|
// default to 1 relevance if not specified
|
10376
10388
|
vs
|
10377
10389
|
].forEach((We) => We(se, ee)), se.isCompiled = !0;
|
10378
|
-
let
|
10379
|
-
return typeof se.keywords == "object" && se.keywords.$pattern && (se.keywords = Object.assign({}, se.keywords),
|
10390
|
+
let Ke = null;
|
10391
|
+
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 = Jt(se.keywords, S.case_insensitive)), de.keywordPatternRe = N(Ke, !0), ee && (se.begin || (se.begin = /\B|\b/), de.beginRe = N(de.begin), !se.end && !se.endsWithParent && (se.end = /\B|\b/), se.end && (de.endRe = N(de.end)), de.terminatorEnd = d(de.end) || "", se.endsWithParent && ee.terminatorEnd && (de.terminatorEnd += (se.end ? "|" : "") + ee.terminatorEnd)), se.illegal && (de.illegalRe = N(
|
10380
10392
|
/** @type {RegExp | string} */
|
10381
10393
|
se.illegal
|
10382
10394
|
)), se.contains || (se.contains = []), se.contains = [].concat(...se.contains.map(function(We) {
|
@@ -10396,13 +10408,13 @@ function Fm() {
|
|
10396
10408
|
S
|
10397
10409
|
);
|
10398
10410
|
}
|
10399
|
-
function
|
10400
|
-
return S ? S.endsWithParent ||
|
10411
|
+
function gt(S) {
|
10412
|
+
return S ? S.endsWithParent || gt(S.starts) : !1;
|
10401
10413
|
}
|
10402
10414
|
function Kt(S) {
|
10403
10415
|
return S.variants && !S.cachedVariants && (S.cachedVariants = S.variants.map(function(N) {
|
10404
10416
|
return s(S, { variants: null }, N);
|
10405
|
-
})), S.cachedVariants ? S.cachedVariants :
|
10417
|
+
})), S.cachedVariants ? S.cachedVariants : gt(S) ? s(S, { starts: S.starts ? s(S.starts) : null }) : Object.isFrozen(S) ? s(S) : S;
|
10406
10418
|
}
|
10407
10419
|
var Ya = "11.11.1";
|
10408
10420
|
class Xa extends Error {
|
@@ -10429,36 +10441,36 @@ function Fm() {
|
|
10429
10441
|
function de(F) {
|
10430
10442
|
return ee.noHighlightRe.test(F);
|
10431
10443
|
}
|
10432
|
-
function
|
10433
|
-
let
|
10434
|
-
|
10435
|
-
const Se = ee.languageDetectRe.exec(
|
10444
|
+
function Ke(F) {
|
10445
|
+
let re = F.className + " ";
|
10446
|
+
re += F.parentNode ? F.parentNode.className : "";
|
10447
|
+
const Se = ee.languageDetectRe.exec(re);
|
10436
10448
|
if (Se) {
|
10437
10449
|
const Ie = $t(Se[1]);
|
10438
10450
|
return Ie || (Nn(Le.replace("{}", Se[1])), Nn("Falling back to no-highlight mode for this block.", F)), Ie ? Se[1] : "no-highlight";
|
10439
10451
|
}
|
10440
|
-
return
|
10452
|
+
return re.split(/\s+/).find((Ie) => de(Ie) || $t(Ie));
|
10441
10453
|
}
|
10442
|
-
function We(F,
|
10454
|
+
function We(F, re, Se) {
|
10443
10455
|
let Ie = "", Qe = "";
|
10444
|
-
typeof
|
10445
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie =
|
10446
|
-
const
|
10456
|
+
typeof re == "object" ? (Ie = F, Se = re.ignoreIllegals, Qe = re.language) : (z("10.7.0", "highlight(lang, code, ...args) has been deprecated."), z("10.7.0", `Please use highlight(code, options) instead.
|
10457
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = re), Se === void 0 && (Se = !0);
|
10458
|
+
const xt = {
|
10447
10459
|
code: Ie,
|
10448
10460
|
language: Qe
|
10449
10461
|
};
|
10450
|
-
zn("before:highlight",
|
10451
|
-
const qt =
|
10452
|
-
return qt.code =
|
10462
|
+
zn("before:highlight", xt);
|
10463
|
+
const qt = xt.result ? xt.result : Sn(xt.language, xt.code, Se);
|
10464
|
+
return qt.code = xt.code, zn("after:highlight", qt), qt;
|
10453
10465
|
}
|
10454
|
-
function Sn(F,
|
10466
|
+
function Sn(F, re, Se, Ie) {
|
10455
10467
|
const Qe = /* @__PURE__ */ Object.create(null);
|
10456
|
-
function
|
10468
|
+
function xt(K, ae) {
|
10457
10469
|
return K.keywords[ae];
|
10458
10470
|
}
|
10459
10471
|
function qt() {
|
10460
10472
|
if (!ve.keywords) {
|
10461
|
-
|
10473
|
+
Ye.addText(Ve);
|
10462
10474
|
return;
|
10463
10475
|
}
|
10464
10476
|
let K = 0;
|
@@ -10466,40 +10478,40 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10466
10478
|
let ae = ve.keywordPatternRe.exec(Ve), ye = "";
|
10467
10479
|
for (; ae; ) {
|
10468
10480
|
ye += Ve.substring(K, ae.index);
|
10469
|
-
const Ee =
|
10470
|
-
if (
|
10471
|
-
const [
|
10472
|
-
if (
|
10481
|
+
const Ee = zt.case_insensitive ? ae[0].toLowerCase() : ae[0], at = xt(ve, Ee);
|
10482
|
+
if (at) {
|
10483
|
+
const [Wt, fl] = at;
|
10484
|
+
if (Ye.addText(ye), ye = "", Qe[Ee] = (Qe[Ee] || 0) + 1, Qe[Ee] <= Za && (Fn += fl), Wt.startsWith("_"))
|
10473
10485
|
ye += ae[0];
|
10474
10486
|
else {
|
10475
|
-
const hl =
|
10476
|
-
|
10487
|
+
const hl = zt.classNameAliases[Wt] || Wt;
|
10488
|
+
Pt(ae[0], hl);
|
10477
10489
|
}
|
10478
10490
|
} else
|
10479
10491
|
ye += ae[0];
|
10480
10492
|
K = ve.keywordPatternRe.lastIndex, ae = ve.keywordPatternRe.exec(Ve);
|
10481
10493
|
}
|
10482
|
-
ye += Ve.substring(K),
|
10494
|
+
ye += Ve.substring(K), Ye.addText(ye);
|
10483
10495
|
}
|
10484
10496
|
function Un() {
|
10485
10497
|
if (Ve === "") return;
|
10486
10498
|
let K = null;
|
10487
10499
|
if (typeof ve.subLanguage == "string") {
|
10488
10500
|
if (!N[ve.subLanguage]) {
|
10489
|
-
|
10501
|
+
Ye.addText(Ve);
|
10490
10502
|
return;
|
10491
10503
|
}
|
10492
10504
|
K = Sn(ve.subLanguage, Ve, !0, So[ve.subLanguage]), So[ve.subLanguage] = /** @type {CompiledMode} */
|
10493
10505
|
K._top;
|
10494
10506
|
} else
|
10495
10507
|
K = _s(Ve, ve.subLanguage.length ? ve.subLanguage : null);
|
10496
|
-
ve.relevance > 0 && (Fn += K.relevance),
|
10508
|
+
ve.relevance > 0 && (Fn += K.relevance), Ye.__addSublanguage(K._emitter, K.language);
|
10497
10509
|
}
|
10498
|
-
function
|
10510
|
+
function ft() {
|
10499
10511
|
ve.subLanguage != null ? Un() : qt(), Ve = "";
|
10500
10512
|
}
|
10501
|
-
function
|
10502
|
-
K !== "" && (
|
10513
|
+
function Pt(K, ae) {
|
10514
|
+
K !== "" && (Ye.startScope(ae), Ye.addText(K), Ye.endScope());
|
10503
10515
|
}
|
10504
10516
|
function yo(K, ae) {
|
10505
10517
|
let ye = 1;
|
@@ -10509,19 +10521,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10509
10521
|
ye++;
|
10510
10522
|
continue;
|
10511
10523
|
}
|
10512
|
-
const
|
10513
|
-
|
10524
|
+
const at = zt.classNameAliases[K[ye]] || K[ye], Wt = ae[ye];
|
10525
|
+
at ? Pt(Wt, at) : (Ve = Wt, qt(), Ve = ""), ye++;
|
10514
10526
|
}
|
10515
10527
|
}
|
10516
10528
|
function wo(K, ae) {
|
10517
|
-
return K.scope && typeof K.scope == "string" &&
|
10529
|
+
return K.scope && typeof K.scope == "string" && Ye.openNode(zt.classNameAliases[K.scope] || K.scope), K.beginScope && (K.beginScope._wrap ? (Pt(Ve, zt.classNameAliases[K.beginScope._wrap] || K.beginScope._wrap), Ve = "") : K.beginScope._multi && (yo(K.beginScope, ae), Ve = "")), ve = Object.create(K, { parent: { value: ve } }), ve;
|
10518
10530
|
}
|
10519
10531
|
function ko(K, ae, ye) {
|
10520
10532
|
let Ee = E(K.endRe, ye);
|
10521
10533
|
if (Ee) {
|
10522
10534
|
if (K["on:end"]) {
|
10523
|
-
const
|
10524
|
-
K["on:end"](ae,
|
10535
|
+
const at = new t(K);
|
10536
|
+
K["on:end"](ae, at), at.isMatchIgnored && (Ee = !1);
|
10525
10537
|
}
|
10526
10538
|
if (Ee) {
|
10527
10539
|
for (; K.endsParent && K.parent; )
|
@@ -10536,36 +10548,36 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10536
10548
|
return ve.matcher.regexIndex === 0 ? (Ve += K[0], 1) : (Es = !0, 0);
|
10537
10549
|
}
|
10538
10550
|
function pl(K) {
|
10539
|
-
const ae = K[0], ye = K.rule, Ee = new t(ye),
|
10540
|
-
for (const
|
10541
|
-
if (
|
10551
|
+
const ae = K[0], ye = K.rule, Ee = new t(ye), at = [ye.__beforeBegin, ye["on:begin"]];
|
10552
|
+
for (const Wt of at)
|
10553
|
+
if (Wt && (Wt(K, Ee), Ee.isMatchIgnored))
|
10542
10554
|
return dl(ae);
|
10543
|
-
return ye.skip ? Ve += ae : (ye.excludeBegin && (Ve += ae),
|
10555
|
+
return ye.skip ? Ve += ae : (ye.excludeBegin && (Ve += ae), ft(), !ye.returnBegin && !ye.excludeBegin && (Ve = ae)), wo(ye, K), ye.returnBegin ? 0 : ae.length;
|
10544
10556
|
}
|
10545
10557
|
function ml(K) {
|
10546
|
-
const ae = K[0], ye =
|
10558
|
+
const ae = K[0], ye = re.substring(K.index), Ee = ko(ve, K, ye);
|
10547
10559
|
if (!Ee)
|
10548
10560
|
return vo;
|
10549
|
-
const
|
10550
|
-
ve.endScope && ve.endScope._wrap ? (
|
10561
|
+
const at = ve;
|
10562
|
+
ve.endScope && ve.endScope._wrap ? (ft(), Pt(ae, ve.endScope._wrap)) : ve.endScope && ve.endScope._multi ? (ft(), yo(ve.endScope, K)) : at.skip ? Ve += ae : (at.returnEnd || at.excludeEnd || (Ve += ae), ft(), at.excludeEnd && (Ve = ae));
|
10551
10563
|
do
|
10552
|
-
ve.scope &&
|
10564
|
+
ve.scope && Ye.closeNode(), !ve.skip && !ve.subLanguage && (Fn += ve.relevance), ve = ve.parent;
|
10553
10565
|
while (ve !== Ee.parent);
|
10554
|
-
return Ee.starts && wo(Ee.starts, K),
|
10566
|
+
return Ee.starts && wo(Ee.starts, K), at.returnEnd ? 0 : ae.length;
|
10555
10567
|
}
|
10556
10568
|
function vl() {
|
10557
10569
|
const K = [];
|
10558
|
-
for (let ae = ve; ae !==
|
10570
|
+
for (let ae = ve; ae !== zt; ae = ae.parent)
|
10559
10571
|
ae.scope && K.unshift(ae.scope);
|
10560
|
-
K.forEach((ae) =>
|
10572
|
+
K.forEach((ae) => Ye.openNode(ae));
|
10561
10573
|
}
|
10562
10574
|
let Ln = {};
|
10563
10575
|
function _o(K, ae) {
|
10564
10576
|
const ye = ae && ae[0];
|
10565
10577
|
if (Ve += K, ye == null)
|
10566
|
-
return
|
10578
|
+
return ft(), 0;
|
10567
10579
|
if (Ln.type === "begin" && ae.type === "end" && Ln.index === ae.index && ye === "") {
|
10568
|
-
if (Ve +=
|
10580
|
+
if (Ve += re.slice(ae.index, ae.index + 1), !Ue) {
|
10569
10581
|
const Ee = new Error(`0 width match regex (${F})`);
|
10570
10582
|
throw Ee.languageName = F, Ee.badRule = Ln.rule, Ee;
|
10571
10583
|
}
|
@@ -10588,99 +10600,99 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10588
10600
|
throw new Error("potential infinite loop, way more iterations than matches");
|
10589
10601
|
return Ve += ye, ye.length;
|
10590
10602
|
}
|
10591
|
-
const
|
10592
|
-
if (!
|
10593
|
-
throw
|
10594
|
-
const gl = _n(
|
10603
|
+
const zt = $t(F);
|
10604
|
+
if (!zt)
|
10605
|
+
throw Nt(Le.replace("{}", F)), new Error('Unknown language: "' + F + '"');
|
10606
|
+
const gl = _n(zt);
|
10595
10607
|
let As = "", ve = Ie || gl;
|
10596
|
-
const So = {},
|
10608
|
+
const So = {}, Ye = new ee.__emitter(ee);
|
10597
10609
|
vl();
|
10598
10610
|
let Ve = "", Fn = 0, ln = 0, Cs = 0, Es = !1;
|
10599
10611
|
try {
|
10600
|
-
if (
|
10601
|
-
|
10612
|
+
if (zt.__emitTokens)
|
10613
|
+
zt.__emitTokens(re, Ye);
|
10602
10614
|
else {
|
10603
10615
|
for (ve.matcher.considerAll(); ; ) {
|
10604
10616
|
Cs++, Es ? Es = !1 : ve.matcher.considerAll(), ve.matcher.lastIndex = ln;
|
10605
|
-
const K = ve.matcher.exec(
|
10617
|
+
const K = ve.matcher.exec(re);
|
10606
10618
|
if (!K) break;
|
10607
|
-
const ae =
|
10619
|
+
const ae = re.substring(ln, K.index), ye = _o(ae, K);
|
10608
10620
|
ln = K.index + ye;
|
10609
10621
|
}
|
10610
|
-
_o(
|
10622
|
+
_o(re.substring(ln));
|
10611
10623
|
}
|
10612
|
-
return
|
10624
|
+
return Ye.finalize(), As = Ye.toHTML(), {
|
10613
10625
|
language: F,
|
10614
10626
|
value: As,
|
10615
10627
|
relevance: Fn,
|
10616
10628
|
illegal: !1,
|
10617
|
-
_emitter:
|
10629
|
+
_emitter: Ye,
|
10618
10630
|
_top: ve
|
10619
10631
|
};
|
10620
10632
|
} catch (K) {
|
10621
10633
|
if (K.message && K.message.includes("Illegal"))
|
10622
10634
|
return {
|
10623
10635
|
language: F,
|
10624
|
-
value: ws(
|
10636
|
+
value: ws(re),
|
10625
10637
|
illegal: !0,
|
10626
10638
|
relevance: 0,
|
10627
10639
|
_illegalBy: {
|
10628
10640
|
message: K.message,
|
10629
10641
|
index: ln,
|
10630
|
-
context:
|
10642
|
+
context: re.slice(ln - 100, ln + 100),
|
10631
10643
|
mode: K.mode,
|
10632
10644
|
resultSoFar: As
|
10633
10645
|
},
|
10634
|
-
_emitter:
|
10646
|
+
_emitter: Ye
|
10635
10647
|
};
|
10636
10648
|
if (Ue)
|
10637
10649
|
return {
|
10638
10650
|
language: F,
|
10639
|
-
value: ws(
|
10651
|
+
value: ws(re),
|
10640
10652
|
illegal: !1,
|
10641
10653
|
relevance: 0,
|
10642
10654
|
errorRaised: K,
|
10643
|
-
_emitter:
|
10655
|
+
_emitter: Ye,
|
10644
10656
|
_top: ve
|
10645
10657
|
};
|
10646
10658
|
throw K;
|
10647
10659
|
}
|
10648
10660
|
}
|
10649
10661
|
function ks(F) {
|
10650
|
-
const
|
10662
|
+
const re = {
|
10651
10663
|
value: ws(F),
|
10652
10664
|
illegal: !1,
|
10653
10665
|
relevance: 0,
|
10654
10666
|
_top: se,
|
10655
10667
|
_emitter: new ee.__emitter(ee)
|
10656
10668
|
};
|
10657
|
-
return
|
10669
|
+
return re._emitter.addText(F), re;
|
10658
10670
|
}
|
10659
|
-
function _s(F,
|
10660
|
-
|
10661
|
-
const Se = ks(F), Ie =
|
10662
|
-
(
|
10671
|
+
function _s(F, re) {
|
10672
|
+
re = re || ee.languages || Object.keys(N);
|
10673
|
+
const Se = ks(F), Ie = re.filter($t).filter(bo).map(
|
10674
|
+
(ft) => Sn(ft, F, !1)
|
10663
10675
|
);
|
10664
10676
|
Ie.unshift(Se);
|
10665
|
-
const Qe = Ie.sort((
|
10666
|
-
if (
|
10667
|
-
if (
|
10668
|
-
if ($t(
|
10677
|
+
const Qe = Ie.sort((ft, Pt) => {
|
10678
|
+
if (ft.relevance !== Pt.relevance) return Pt.relevance - ft.relevance;
|
10679
|
+
if (ft.language && Pt.language) {
|
10680
|
+
if ($t(ft.language).supersetOf === Pt.language)
|
10669
10681
|
return 1;
|
10670
|
-
if ($t(
|
10682
|
+
if ($t(Pt.language).supersetOf === ft.language)
|
10671
10683
|
return -1;
|
10672
10684
|
}
|
10673
10685
|
return 0;
|
10674
|
-
}), [
|
10686
|
+
}), [xt, qt] = Qe, Un = xt;
|
10675
10687
|
return Un.secondBest = qt, Un;
|
10676
10688
|
}
|
10677
|
-
function el(F,
|
10678
|
-
const Ie =
|
10689
|
+
function el(F, re, Se) {
|
10690
|
+
const Ie = re && Q[re] || Se;
|
10679
10691
|
F.classList.add("hljs"), F.classList.add(`language-${Ie}`);
|
10680
10692
|
}
|
10681
10693
|
function Ss(F) {
|
10682
|
-
let
|
10683
|
-
const Se =
|
10694
|
+
let re = null;
|
10695
|
+
const Se = Ke(F);
|
10684
10696
|
if (de(Se)) return;
|
10685
10697
|
if (zn(
|
10686
10698
|
"before:highlightElement",
|
@@ -10694,8 +10706,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10694
10706
|
"One of your code blocks includes unescaped HTML.",
|
10695
10707
|
F.innerHTML
|
10696
10708
|
);
|
10697
|
-
|
10698
|
-
const Ie =
|
10709
|
+
re = F;
|
10710
|
+
const Ie = re.textContent, Qe = Se ? We(Ie, { language: Se, ignoreIllegals: !0 }) : _s(Ie);
|
10699
10711
|
F.innerHTML = Qe.value, F.dataset.highlighted = "yes", el(F, Se, Qe.language), F.result = {
|
10700
10712
|
language: Qe.language,
|
10701
10713
|
// TODO: remove with version 11.0
|
@@ -10710,10 +10722,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10710
10722
|
ee = mo(ee, F);
|
10711
10723
|
}
|
10712
10724
|
const nl = () => {
|
10713
|
-
Pn(),
|
10725
|
+
Pn(), z("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
10714
10726
|
};
|
10715
10727
|
function sl() {
|
10716
|
-
Pn(),
|
10728
|
+
Pn(), z("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
10717
10729
|
}
|
10718
10730
|
let fo = !1;
|
10719
10731
|
function Pn() {
|
@@ -10726,23 +10738,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10726
10738
|
}
|
10727
10739
|
document.querySelectorAll(ee.cssSelector).forEach(Ss);
|
10728
10740
|
}
|
10729
|
-
function ol(F,
|
10741
|
+
function ol(F, re) {
|
10730
10742
|
let Se = null;
|
10731
10743
|
try {
|
10732
|
-
Se =
|
10744
|
+
Se = re(S);
|
10733
10745
|
} catch (Ie) {
|
10734
|
-
if (
|
10735
|
-
|
10746
|
+
if (Nt("Language definition for '{}' could not be registered.".replace("{}", F)), Ue)
|
10747
|
+
Nt(Ie);
|
10736
10748
|
else
|
10737
10749
|
throw Ie;
|
10738
10750
|
Se = se;
|
10739
10751
|
}
|
10740
|
-
Se.name || (Se.name = F), N[F] = Se, Se.rawDefinition =
|
10752
|
+
Se.name || (Se.name = F), N[F] = Se, Se.rawDefinition = re.bind(null, S), Se.aliases && ho(Se.aliases, { languageName: F });
|
10741
10753
|
}
|
10742
10754
|
function al(F) {
|
10743
10755
|
delete N[F];
|
10744
|
-
for (const
|
10745
|
-
Q[
|
10756
|
+
for (const re of Object.keys(Q))
|
10757
|
+
Q[re] === F && delete Q[re];
|
10746
10758
|
}
|
10747
10759
|
function ll() {
|
10748
10760
|
return Object.keys(N);
|
@@ -10750,23 +10762,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10750
10762
|
function $t(F) {
|
10751
10763
|
return F = (F || "").toLowerCase(), N[F] || N[Q[F]];
|
10752
10764
|
}
|
10753
|
-
function ho(F, { languageName:
|
10765
|
+
function ho(F, { languageName: re }) {
|
10754
10766
|
typeof F == "string" && (F = [F]), F.forEach((Se) => {
|
10755
|
-
Q[Se.toLowerCase()] =
|
10767
|
+
Q[Se.toLowerCase()] = re;
|
10756
10768
|
});
|
10757
10769
|
}
|
10758
10770
|
function bo(F) {
|
10759
|
-
const
|
10760
|
-
return
|
10771
|
+
const re = $t(F);
|
10772
|
+
return re && !re.disableAutodetect;
|
10761
10773
|
}
|
10762
10774
|
function il(F) {
|
10763
|
-
F["before:highlightBlock"] && !F["before:highlightElement"] && (F["before:highlightElement"] = (
|
10775
|
+
F["before:highlightBlock"] && !F["before:highlightElement"] && (F["before:highlightElement"] = (re) => {
|
10764
10776
|
F["before:highlightBlock"](
|
10765
|
-
Object.assign({ block:
|
10777
|
+
Object.assign({ block: re.el }, re)
|
10766
10778
|
);
|
10767
|
-
}), F["after:highlightBlock"] && !F["after:highlightElement"] && (F["after:highlightElement"] = (
|
10779
|
+
}), F["after:highlightBlock"] && !F["after:highlightElement"] && (F["after:highlightElement"] = (re) => {
|
10768
10780
|
F["after:highlightBlock"](
|
10769
|
-
Object.assign({ block:
|
10781
|
+
Object.assign({ block: re.el }, re)
|
10770
10782
|
);
|
10771
10783
|
});
|
10772
10784
|
}
|
@@ -10774,17 +10786,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10774
10786
|
il(F), me.push(F);
|
10775
10787
|
}
|
10776
10788
|
function cl(F) {
|
10777
|
-
const
|
10778
|
-
|
10789
|
+
const re = me.indexOf(F);
|
10790
|
+
re !== -1 && me.splice(re, 1);
|
10779
10791
|
}
|
10780
|
-
function zn(F,
|
10792
|
+
function zn(F, re) {
|
10781
10793
|
const Se = F;
|
10782
10794
|
me.forEach(function(Ie) {
|
10783
|
-
Ie[Se] && Ie[Se](
|
10795
|
+
Ie[Se] && Ie[Se](re);
|
10784
10796
|
});
|
10785
10797
|
}
|
10786
10798
|
function ul(F) {
|
10787
|
-
return
|
10799
|
+
return z("10.7.0", "highlightBlock will be removed entirely in v12.0"), z("10.7.0", "Please use highlightElement now."), Ss(F);
|
10788
10800
|
}
|
10789
10801
|
Object.assign(S, {
|
10790
10802
|
highlight: We,
|
@@ -10816,9 +10828,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Qe = F, Ie = ie), Se
|
|
10816
10828
|
optional: h,
|
10817
10829
|
anyNumberOfTimes: f
|
10818
10830
|
};
|
10819
|
-
for (const F in
|
10820
|
-
typeof
|
10821
|
-
return Object.assign(S,
|
10831
|
+
for (const F in _t)
|
10832
|
+
typeof _t[F] == "object" && r(_t[F]);
|
10833
|
+
return Object.assign(S, _t), S;
|
10822
10834
|
}, mn = go({});
|
10823
10835
|
return mn.newInstance = () => go({}), Os = mn, mn.HighlightJS = mn, mn.default = mn, Os;
|
10824
10836
|
}
|
@@ -11214,13 +11226,13 @@ function $m(r) {
|
|
11214
11226
|
return;
|
11215
11227
|
}
|
11216
11228
|
ze === ">" && (e(q, { after: _e }) || ke.ignoreMatch());
|
11217
|
-
let
|
11218
|
-
const
|
11219
|
-
if (
|
11229
|
+
let Et;
|
11230
|
+
const kt = q.input.substring(_e);
|
11231
|
+
if (Et = kt.match(/^\s*=/)) {
|
11220
11232
|
ke.ignoreMatch();
|
11221
11233
|
return;
|
11222
11234
|
}
|
11223
|
-
if ((
|
11235
|
+
if ((Et = kt.match(/^\s+extends\s+/)) && Et.index === 0) {
|
11224
11236
|
ke.ignoreMatch();
|
11225
11237
|
return;
|
11226
11238
|
}
|
@@ -11481,7 +11493,7 @@ function $m(r) {
|
|
11481
11493
|
function Z(q) {
|
11482
11494
|
return t.concat("(?!", q.join("|"), ")");
|
11483
11495
|
}
|
11484
|
-
const
|
11496
|
+
const U = {
|
11485
11497
|
match: t.concat(
|
11486
11498
|
/\b/,
|
11487
11499
|
Z([
|
@@ -11684,7 +11696,7 @@ function $m(r) {
|
|
11684
11696
|
className: { 1: "title.function" },
|
11685
11697
|
contains: [O]
|
11686
11698
|
},
|
11687
|
-
|
11699
|
+
U,
|
11688
11700
|
G,
|
11689
11701
|
R,
|
11690
11702
|
P,
|
@@ -12631,7 +12643,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12631
12643
|
});
|
12632
12644
|
const o = C(), l = C("");
|
12633
12645
|
ne(() => e.content, async () => {
|
12634
|
-
l.value = await To(e.content || ""), await
|
12646
|
+
l.value = await To(e.content || ""), await dt(), o.value?.querySelectorAll("pre code").forEach((c) => {
|
12635
12647
|
Wn.highlightElement(c);
|
12636
12648
|
});
|
12637
12649
|
}, { immediate: !0 });
|
@@ -12698,7 +12710,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12698
12710
|
]), f = x(() => ({
|
12699
12711
|
"is-user": e.type === "user",
|
12700
12712
|
"is-ai": e.type === "ai"
|
12701
|
-
})), h = x(() => e.data.reasoning ? `已经深度思考 (用时 ${Math.ceil(e.data.thinking / 1e3)} 秒)` : v.value ? "展开" : "收起"), _ = (R) => R.type === "json" && R.json ? R.dataType ? o[R.dataType] || o.other : R.json.includes("/sketch/") ? o.sketch : R.json.includes("/figma/") ? o.figma : R.json.includes("/group/") || R.json.includes("/frame/") || R.json.includes("/mastergo/") ? o.mastergo : o.other : R.image ? R.image : "", y = (R = "") => {
|
12713
|
+
})), h = x(() => e.data.reasoning ? `已经深度思考 (用时 ${Math.ceil(e.data.thinking / 1e3)} 秒)` : v.value ? "展开" : "收起"), _ = (R) => R.type === "json" && R.json ? R.dataType ? o[R.dataType] || o.other : R.json.includes("/sketch/") ? o.sketch : R.json.includes("/figma/") ? o.figma : R.json.includes("/group/") || R.json.includes("/frame/") || R.json.includes("/component/") || R.json.includes("/mastergo/") ? o.mastergo : o.other : R.image ? R.image : "", y = (R = "") => {
|
12702
12714
|
const j = R.split("/");
|
12703
12715
|
return j.length > 6 ? j.slice(6).join("/") : R;
|
12704
12716
|
}, I = (R) => {
|
@@ -12749,7 +12761,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12749
12761
|
}, {
|
12750
12762
|
default: b(() => [
|
12751
12763
|
$(oe(h.value) + " ", 1),
|
12752
|
-
p(n(
|
12764
|
+
p(n(mt), { icon: g.value }, null, 8, ["icon"])
|
12753
12765
|
]),
|
12754
12766
|
_: 1
|
12755
12767
|
})),
|
@@ -12862,7 +12874,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12862
12874
|
])
|
12863
12875
|
], 64));
|
12864
12876
|
}
|
12865
|
-
}), bv = /* @__PURE__ */
|
12877
|
+
}), bv = /* @__PURE__ */ wt(hv, [["__scopeId", "data-v-a0d63a10"]]), yv = { class: "v-ai-widget-image-input" }, wv = {
|
12866
12878
|
key: 0,
|
12867
12879
|
class: "v-ai-widget-image-input__preview",
|
12868
12880
|
"element-loading-text": "正在分析..."
|
@@ -12881,7 +12893,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12881
12893
|
ne(
|
12882
12894
|
() => o.state.autoApply,
|
12883
12895
|
(d) => {
|
12884
|
-
|
12896
|
+
yt.success({
|
12885
12897
|
message: d ? "已开启自动应用到页面功能" : "已经关闭自动应用到页面功能"
|
12886
12898
|
});
|
12887
12899
|
}
|
@@ -12904,7 +12916,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12904
12916
|
"http-request": v
|
12905
12917
|
}, {
|
12906
12918
|
default: b(() => [
|
12907
|
-
p(n(
|
12919
|
+
p(n(mt), {
|
12908
12920
|
icon: n(Va),
|
12909
12921
|
size: 60,
|
12910
12922
|
color: "var(--el-text-color-secondary)"
|
@@ -12922,7 +12934,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12922
12934
|
_: 1,
|
12923
12935
|
__: [2, 3]
|
12924
12936
|
}, 512),
|
12925
|
-
l.value ?
|
12937
|
+
l.value ? Ct((u(), B("div", wv, [
|
12926
12938
|
p(n(Dn), {
|
12927
12939
|
src: l.value,
|
12928
12940
|
fit: "cover"
|
@@ -12987,12 +12999,12 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
12987
12999
|
frame: Gn
|
12988
13000
|
};
|
12989
13001
|
return a.value && A[a.value.toLowerCase()] || In;
|
12990
|
-
}), m = C(), f =
|
12991
|
-
i.value = A, A ? (await
|
13002
|
+
}), m = C(), f = bt(null), h = async (A) => {
|
13003
|
+
i.value = A, A ? (await dt(), c.value?.focus()) : (v.value = "", g.value = null);
|
12992
13004
|
}, _ = async (A) => {
|
12993
13005
|
if (A.status === "ready" && A.raw) {
|
12994
13006
|
const T = await nu(A.raw);
|
12995
|
-
T && T.type ? (a.value = T.type, l.value = A.raw.name, f.value = T) : (await
|
13007
|
+
T && T.type ? (a.value = T.type, l.value = A.raw.name, f.value = T) : (await ut(
|
12996
13008
|
"无法识别文件, 只支持Sketch/Figma/MasterGo插件导出数据文件",
|
12997
13009
|
{
|
12998
13010
|
type: "warning"
|
@@ -13005,7 +13017,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13005
13017
|
ne(
|
13006
13018
|
() => o.state.autoApply,
|
13007
13019
|
(A) => {
|
13008
|
-
|
13020
|
+
yt.success({
|
13009
13021
|
message: A ? "已开启自动应用到页面功能" : "已经关闭自动应用到页面功能"
|
13010
13022
|
});
|
13011
13023
|
}
|
@@ -13014,7 +13026,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13014
13026
|
A.file && s("send", A.file, o.state.autoApply, f.value);
|
13015
13027
|
}, k = async () => {
|
13016
13028
|
const A = v.value.trim();
|
13017
|
-
A || (await
|
13029
|
+
A || (await ut("请输入元数据", {
|
13018
13030
|
type: "warning"
|
13019
13031
|
}), c.value?.focus());
|
13020
13032
|
try {
|
@@ -13024,7 +13036,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13024
13036
|
});
|
13025
13037
|
a.value = T.type || "mastergo", l.value = j.name, f.value = T, g.value = j;
|
13026
13038
|
} catch {
|
13027
|
-
await
|
13039
|
+
await ut("数据格式错误", {
|
13028
13040
|
type: "warning"
|
13029
13041
|
});
|
13030
13042
|
}
|
@@ -13081,7 +13093,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13081
13093
|
"http-request": I
|
13082
13094
|
}, {
|
13083
13095
|
default: b(() => [
|
13084
|
-
p(n(
|
13096
|
+
p(n(mt), {
|
13085
13097
|
icon: n(Va),
|
13086
13098
|
size: 60,
|
13087
13099
|
color: "var(--el-text-color-secondary)"
|
@@ -13097,7 +13109,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13097
13109
|
}),
|
13098
13110
|
p(n(ce), {
|
13099
13111
|
size: "default",
|
13100
|
-
onClick: T[2] || (T[2] =
|
13112
|
+
onClick: T[2] || (T[2] = it(() => h(!0), ["stop"]))
|
13101
13113
|
}, {
|
13102
13114
|
default: b(() => T[8] || (T[8] = [
|
13103
13115
|
$(" 粘贴数据 ")
|
@@ -13110,7 +13122,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13110
13122
|
type: "primary",
|
13111
13123
|
href: "https://vtj.pro/guide/meta.html",
|
13112
13124
|
target: "_blank",
|
13113
|
-
onClick: T[3] || (T[3] =
|
13125
|
+
onClick: T[3] || (T[3] = it(() => {
|
13114
13126
|
}, ["stop"]))
|
13115
13127
|
}, {
|
13116
13128
|
default: b(() => T[9] || (T[9] = [
|
@@ -13123,7 +13135,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13123
13135
|
_: 1,
|
13124
13136
|
__: [10, 11]
|
13125
13137
|
}, 512)),
|
13126
|
-
l.value ?
|
13138
|
+
l.value ? Ct((u(), B("div", Ev, [
|
13127
13139
|
p(n(Dn), {
|
13128
13140
|
src: d.value,
|
13129
13141
|
fit: "cover"
|
@@ -13238,7 +13250,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13238
13250
|
onSend: m
|
13239
13251
|
}, null, 8, ["loading"])) : D("", !0),
|
13240
13252
|
a.value.length ? (u(), B(Y, { key: 3 }, [
|
13241
|
-
p(n(
|
13253
|
+
p(n(pt), { "content-position": "left" }, {
|
13242
13254
|
default: b(() => h[1] || (h[1] = [
|
13243
13255
|
$("热门需求")
|
13244
13256
|
])),
|
@@ -13246,7 +13258,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13246
13258
|
__: [1]
|
13247
13259
|
}),
|
13248
13260
|
V("div", null, [
|
13249
|
-
(u(!0), B(Y, null,
|
13261
|
+
(u(!0), B(Y, null, ie(a.value, (_, y) => (u(), w(n($e), {
|
13250
13262
|
index: y + 1,
|
13251
13263
|
title: _.title,
|
13252
13264
|
"model-value": _,
|
@@ -13273,7 +13285,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13273
13285
|
])
|
13274
13286
|
], 64));
|
13275
13287
|
}
|
13276
|
-
}), Ov = /* @__PURE__ */
|
13288
|
+
}), Ov = /* @__PURE__ */ wt(Bv, [["__scopeId", "data-v-6c1a0add"]]), Lo = /* @__PURE__ */ M({
|
13277
13289
|
__name: "Editor",
|
13278
13290
|
props: {
|
13279
13291
|
lang: { default: "typescript" },
|
@@ -13318,7 +13330,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13318
13330
|
}), a.onDidBlurEditorText(c);
|
13319
13331
|
};
|
13320
13332
|
return un(() => {
|
13321
|
-
|
13333
|
+
dt(v);
|
13322
13334
|
}), Qs(() => {
|
13323
13335
|
a && a.dispose();
|
13324
13336
|
}), ne(
|
@@ -13330,7 +13342,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13330
13342
|
class: he(["v-code-editor", { "is-border": s.border }]),
|
13331
13343
|
ref_key: "container",
|
13332
13344
|
ref: l,
|
13333
|
-
onKeyup: m[0] || (m[0] =
|
13345
|
+
onKeyup: m[0] || (m[0] = Rt(it(() => {
|
13334
13346
|
}, ["stop"]), ["enter"])),
|
13335
13347
|
style: gn({ height: s.height })
|
13336
13348
|
}, null, 38));
|
@@ -13351,7 +13363,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13351
13363
|
const d = await e.updateChatDsl(g).catch((m) => (Array.isArray(m) ? xe(m.join(";")) : xe(m?.message || "代码错误"), null));
|
13352
13364
|
d && a.value.getEditor().setValue(JSON.stringify(d, null, 2));
|
13353
13365
|
};
|
13354
|
-
return (v, g) => (u(), w(n(
|
13366
|
+
return (v, g) => (u(), w(n(Dt), {
|
13355
13367
|
title: "AI生成内容",
|
13356
13368
|
maximizable: "",
|
13357
13369
|
submit: "应用到页面",
|
@@ -13396,7 +13408,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13396
13408
|
_: 1
|
13397
13409
|
}));
|
13398
13410
|
}
|
13399
|
-
}), Nv = /* @__PURE__ */
|
13411
|
+
}), Nv = /* @__PURE__ */ wt(Mv, [["__scopeId", "data-v-3af93469"]]), Pv = {
|
13400
13412
|
key: 0,
|
13401
13413
|
class: "v-ai-widget__mask is-limit"
|
13402
13414
|
}, zv = {
|
@@ -13434,7 +13446,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13434
13446
|
])) : D("", !0)
|
13435
13447
|
], 64));
|
13436
13448
|
}
|
13437
|
-
}), Jv = /* @__PURE__ */
|
13449
|
+
}), Jv = /* @__PURE__ */ wt(Fv, [["__scopeId", "data-v-f0a3b533"]]), Wv = {
|
13438
13450
|
key: 0,
|
13439
13451
|
class: "v-ai-widget__mask is-limit"
|
13440
13452
|
}, Hv = {
|
@@ -13462,7 +13474,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13462
13474
|
}
|
13463
13475
|
);
|
13464
13476
|
const { copy: a } = co({}), i = () => {
|
13465
|
-
a(l.value),
|
13477
|
+
a(l.value), yt.success({
|
13466
13478
|
message: "已经复制到粘贴板"
|
13467
13479
|
});
|
13468
13480
|
}, c = () => {
|
@@ -13471,12 +13483,12 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13471
13483
|
const m = await t.createOrder();
|
13472
13484
|
m?.success && (s.value = !0, o.value = m.data);
|
13473
13485
|
}, g = async () => {
|
13474
|
-
((await t.getOrder(o.value?.id))?.data).status === "Completed" ? (await
|
13486
|
+
((await t.getOrder(o.value?.id))?.data).status === "Completed" ? (await ut("订单已经支付成功,你权限已经开通!").catch(() => null), location.reload()) : await ut("您的订单状态还没更新,支付后请与客服联系!", {
|
13475
13487
|
type: "success",
|
13476
13488
|
confirmButtonText: "再等等"
|
13477
13489
|
}).catch(() => null);
|
13478
13490
|
}, d = async () => {
|
13479
|
-
await
|
13491
|
+
await Qt("您确定取消该订单?", {
|
13480
13492
|
confirmButtonText: "确认取消",
|
13481
13493
|
cancelButtonText: "再想想"
|
13482
13494
|
}).catch(() => !1) && await t.cancelOrder(o.value?.id) && (s.value = !1);
|
@@ -13523,7 +13535,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13523
13535
|
_: 1,
|
13524
13536
|
__: [3]
|
13525
13537
|
}),
|
13526
|
-
p(n(
|
13538
|
+
p(n(pt), null, {
|
13527
13539
|
default: b(() => [
|
13528
13540
|
p(n(jl), { type: "info" }, {
|
13529
13541
|
default: b(() => f[4] || (f[4] = [
|
@@ -13669,7 +13681,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13669
13681
|
}, 8, ["modelValue"])
|
13670
13682
|
], 64));
|
13671
13683
|
}
|
13672
|
-
}), ng = /* @__PURE__ */
|
13684
|
+
}), ng = /* @__PURE__ */ wt(tg, [["__scopeId", "data-v-26154d8a"]]), sg = { class: "v-ai-widget__input" }, og = /* @__PURE__ */ M({
|
13673
13685
|
name: "AIWidget",
|
13674
13686
|
__name: "index",
|
13675
13687
|
setup(r) {
|
@@ -13702,7 +13714,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13702
13714
|
isHideCode: X,
|
13703
13715
|
onFix: G,
|
13704
13716
|
promptText: Z,
|
13705
|
-
fillPromptInput:
|
13717
|
+
fillPromptInput: U,
|
13706
13718
|
settings: ue,
|
13707
13719
|
inputDisabled: P,
|
13708
13720
|
createOrder: L,
|
@@ -13711,9 +13723,9 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13711
13723
|
updateChatDsl: ke,
|
13712
13724
|
getImage: _e,
|
13713
13725
|
onPostImageTopic: ze,
|
13714
|
-
onPostJsonTopic:
|
13715
|
-
onCancelChat:
|
13716
|
-
} = Eu(),
|
13726
|
+
onPostJsonTopic: Et,
|
13727
|
+
onCancelChat: kt
|
13728
|
+
} = Eu(), qe = C(!0), et = C(!1), Ot = x(() => !t.current.value), tt = x(() => X.value ? {
|
13717
13729
|
icon: ac,
|
13718
13730
|
title: "显示代码块",
|
13719
13731
|
type: "warning"
|
@@ -13721,36 +13733,36 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13721
13733
|
icon: Ia,
|
13722
13734
|
title: "隐藏代码块",
|
13723
13735
|
type: "default"
|
13724
|
-
}),
|
13736
|
+
}), Ge = x(() => !qe.value || Ot.value ? "hidden" : "auto");
|
13725
13737
|
un(async () => {
|
13726
|
-
|
13738
|
+
qe.value = await e();
|
13727
13739
|
});
|
13728
|
-
const
|
13729
|
-
if (
|
13740
|
+
const ct = () => {
|
13741
|
+
if (!qe.value) {
|
13730
13742
|
De(
|
13731
13743
|
"使用AI助手需登录,您还没登录或登录已失效,请重新登录!",
|
13732
13744
|
"warning"
|
13733
13745
|
);
|
13734
13746
|
return;
|
13735
13747
|
}
|
13736
|
-
if (
|
13748
|
+
if (Ot.value) {
|
13737
13749
|
De(
|
13738
13750
|
"当前设计视图无任何文件,请新建或打开文件后再使用AI助",
|
13739
13751
|
"warning"
|
13740
13752
|
);
|
13741
13753
|
return;
|
13742
13754
|
}
|
13743
|
-
|
13744
|
-
},
|
13755
|
+
et.value = !et.value;
|
13756
|
+
}, _t = () => {
|
13745
13757
|
if (j.value) {
|
13746
13758
|
De("当前有对话未结束,不能开启新对话", "warning");
|
13747
13759
|
return;
|
13748
13760
|
}
|
13749
|
-
s.value = !0,
|
13750
|
-
},
|
13751
|
-
|
13761
|
+
s.value = !0, et.value = !1;
|
13762
|
+
}, Mt = (vt) => {
|
13763
|
+
et.value = !1, s.value = !1, c.value = vt, d(vt.id);
|
13752
13764
|
};
|
13753
|
-
return (
|
13765
|
+
return (vt, lt) => (u(), w(n(be), {
|
13754
13766
|
class: "v-ai-widget__wrapper",
|
13755
13767
|
direction: "column",
|
13756
13768
|
fit: ""
|
@@ -13761,15 +13773,15 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13761
13773
|
title: "AI助手",
|
13762
13774
|
ref_key: "panelRef",
|
13763
13775
|
ref: I,
|
13764
|
-
body: { overflow:
|
13776
|
+
body: { overflow: Ge.value }
|
13765
13777
|
}, Ho({
|
13766
13778
|
actions: b(() => [
|
13767
13779
|
p(n(Be), He({
|
13768
13780
|
mode: "icon",
|
13769
13781
|
size: "small",
|
13770
13782
|
disabled: n(s)
|
13771
|
-
},
|
13772
|
-
p(n(
|
13783
|
+
}, tt.value, { onClick: n(W) }), null, 16, ["disabled", "onClick"]),
|
13784
|
+
p(n(pt), { direction: "vertical" }),
|
13773
13785
|
p(n(Be), {
|
13774
13786
|
mode: "icon",
|
13775
13787
|
size: "small",
|
@@ -13790,7 +13802,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13790
13802
|
disabled: n(s),
|
13791
13803
|
onClick: n(T)
|
13792
13804
|
}, null, 8, ["icon", "disabled", "onClick"]),
|
13793
|
-
p(n(
|
13805
|
+
p(n(pt), { direction: "vertical" }),
|
13794
13806
|
p(n(Be), {
|
13795
13807
|
mode: "icon",
|
13796
13808
|
size: "small",
|
@@ -13811,29 +13823,29 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13811
13823
|
disabled: n(s),
|
13812
13824
|
onClick: n(O)
|
13813
13825
|
}, null, 8, ["icon", "disabled", "onClick"]),
|
13814
|
-
p(n(
|
13826
|
+
p(n(pt), { direction: "vertical" }),
|
13815
13827
|
p(n(Be), {
|
13816
13828
|
mode: "icon",
|
13817
13829
|
size: "large",
|
13818
13830
|
icon: n(rc),
|
13819
13831
|
background: "hover",
|
13820
13832
|
title: "对话历史",
|
13821
|
-
onClick:
|
13833
|
+
onClick: ct
|
13822
13834
|
}, null, 8, ["icon"])
|
13823
13835
|
]),
|
13824
13836
|
default: b(() => [
|
13825
|
-
|
13826
|
-
|
13827
|
-
|
13837
|
+
qe.value ? D("", !0) : (u(), w(bv, { key: 0 })),
|
13838
|
+
qe.value && Ot.value ? (u(), w(Ov, { key: 1 })) : D("", !0),
|
13839
|
+
Ot.value || n(s) ? (u(), w(jv, {
|
13828
13840
|
key: 2,
|
13829
13841
|
models: n(l),
|
13830
13842
|
loading: n(o),
|
13831
13843
|
"model-value": n(Z),
|
13832
13844
|
disabled: n(P),
|
13833
|
-
fillPromptInput: n(
|
13845
|
+
fillPromptInput: n(U),
|
13834
13846
|
onSend: n(a),
|
13835
13847
|
onImageSend: n(ze),
|
13836
|
-
onJsonSend: n(
|
13848
|
+
onJsonSend: n(Et)
|
13837
13849
|
}, null, 8, ["models", "loading", "model-value", "disabled", "fillPromptInput", "onSend", "onImageSend", "onJsonSend"])) : D("", !0),
|
13838
13850
|
n(s) ? D("", !0) : (u(), B("div", {
|
13839
13851
|
key: 3,
|
@@ -13841,7 +13853,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13841
13853
|
ref: y,
|
13842
13854
|
class: "v-ai-widget__bubble-list"
|
13843
13855
|
}, [
|
13844
|
-
(u(!0), B(Y, null,
|
13856
|
+
(u(!0), B(Y, null, ie(n(i), (nt) => (u(), B(Y, {
|
13845
13857
|
key: nt.id
|
13846
13858
|
}, [
|
13847
13859
|
p(Uo, {
|
@@ -13852,11 +13864,11 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13852
13864
|
type: "ai",
|
13853
13865
|
data: nt,
|
13854
13866
|
code: !n(X),
|
13855
|
-
onView: (
|
13856
|
-
onRefresh: (
|
13857
|
-
onApply: (
|
13858
|
-
onFix: (
|
13859
|
-
onCancel: (
|
13867
|
+
onView: (Gt) => n(f)(nt),
|
13868
|
+
onRefresh: (Gt) => n(h)(nt),
|
13869
|
+
onApply: (Gt) => n(_)(nt, !0),
|
13870
|
+
onFix: (Gt) => n(G)(nt),
|
13871
|
+
onCancel: (Gt) => n(kt)(nt)
|
13860
13872
|
}, null, 8, ["data", "code", "onView", "onRefresh", "onApply", "onFix", "onCancel"])
|
13861
13873
|
], 64))), 128)),
|
13862
13874
|
n(i).length ? D("", !0) : (u(), w(n(Pe), { key: 0 }))
|
@@ -13864,7 +13876,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13864
13876
|
n(k) ? (u(), w(Nv, {
|
13865
13877
|
key: 4,
|
13866
13878
|
modelValue: n(E),
|
13867
|
-
"onUpdate:modelValue":
|
13879
|
+
"onUpdate:modelValue": lt[0] || (lt[0] = (nt) => Kn(E) ? E.value = nt : null),
|
13868
13880
|
chat: n(k),
|
13869
13881
|
"update-chat-dsl": n(ke),
|
13870
13882
|
onApply: n(_)
|
@@ -13883,9 +13895,9 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13883
13895
|
type: "primary",
|
13884
13896
|
size: "small",
|
13885
13897
|
icon: n(xa),
|
13886
|
-
onClick:
|
13898
|
+
onClick: _t
|
13887
13899
|
}, {
|
13888
|
-
default: b(() =>
|
13900
|
+
default: b(() => lt[2] || (lt[2] = [
|
13889
13901
|
$(" 开启新对话 ")
|
13890
13902
|
])),
|
13891
13903
|
_: 1,
|
@@ -13901,7 +13913,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13901
13913
|
"lock-model": "",
|
13902
13914
|
onSend: n(v)
|
13903
13915
|
}, null, 8, ["models", "loading", "model", "model-value", "disabled", "onSend"])) : D("", !0),
|
13904
|
-
|
13916
|
+
lt[3] || (lt[3] = V("div", { class: "footer" }, "内容由 AI 生成,请仔细甄别", -1))
|
13905
13917
|
])
|
13906
13918
|
]),
|
13907
13919
|
key: "0"
|
@@ -13916,8 +13928,8 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13916
13928
|
"with-header": !1,
|
13917
13929
|
"modal-class": "v-ai-widget__drawer-modal",
|
13918
13930
|
"append-to-body": !1,
|
13919
|
-
modelValue:
|
13920
|
-
"onUpdate:modelValue":
|
13931
|
+
modelValue: et.value,
|
13932
|
+
"onUpdate:modelValue": lt[1] || (lt[1] = (nt) => et.value = nt)
|
13921
13933
|
}, {
|
13922
13934
|
default: b(() => [
|
13923
13935
|
p(n(ge), {
|
@@ -13931,15 +13943,15 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
13931
13943
|
icon: n(cc),
|
13932
13944
|
background: "hover",
|
13933
13945
|
title: "对话历史",
|
13934
|
-
onClick:
|
13946
|
+
onClick: ct
|
13935
13947
|
}, null, 8, ["icon"])
|
13936
13948
|
]),
|
13937
13949
|
default: b(() => [
|
13938
13950
|
p(Mm, {
|
13939
13951
|
current: n(c),
|
13940
13952
|
topics: n(g),
|
13941
|
-
onNew:
|
13942
|
-
onLoad:
|
13953
|
+
onNew: _t,
|
13954
|
+
onLoad: Mt,
|
13943
13955
|
onRemove: n(m)
|
13944
13956
|
}, null, 8, ["current", "topics", "onRemove"])
|
13945
13957
|
]),
|
@@ -14203,7 +14215,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14203
14215
|
region: "Settings",
|
14204
14216
|
component: Ae.Scripts,
|
14205
14217
|
type: "tab",
|
14206
|
-
group:
|
14218
|
+
group: It.Block,
|
14207
14219
|
label: "设置"
|
14208
14220
|
},
|
14209
14221
|
{
|
@@ -14211,7 +14223,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14211
14223
|
region: "Settings",
|
14212
14224
|
component: Ae.Css,
|
14213
14225
|
type: "tab",
|
14214
|
-
group:
|
14226
|
+
group: It.Block,
|
14215
14227
|
label: "CSS"
|
14216
14228
|
},
|
14217
14229
|
{
|
@@ -14219,7 +14231,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14219
14231
|
region: "Settings",
|
14220
14232
|
component: Ae.DataSources,
|
14221
14233
|
type: "tab",
|
14222
|
-
group:
|
14234
|
+
group: It.Block,
|
14223
14235
|
label: "数据源"
|
14224
14236
|
},
|
14225
14237
|
{
|
@@ -14227,7 +14239,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14227
14239
|
region: "Settings",
|
14228
14240
|
component: Ae.Defined,
|
14229
14241
|
type: "tab",
|
14230
|
-
group:
|
14242
|
+
group: It.Block,
|
14231
14243
|
label: "定义"
|
14232
14244
|
},
|
14233
14245
|
{
|
@@ -14235,7 +14247,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14235
14247
|
region: "Settings",
|
14236
14248
|
component: Ae.Properties,
|
14237
14249
|
type: "tab",
|
14238
|
-
group:
|
14250
|
+
group: It.Node,
|
14239
14251
|
label: "属性"
|
14240
14252
|
},
|
14241
14253
|
{
|
@@ -14243,7 +14255,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14243
14255
|
region: "Settings",
|
14244
14256
|
component: Ae.Style,
|
14245
14257
|
type: "tab",
|
14246
|
-
group:
|
14258
|
+
group: It.Node,
|
14247
14259
|
label: "样式"
|
14248
14260
|
},
|
14249
14261
|
{
|
@@ -14251,7 +14263,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14251
14263
|
region: "Settings",
|
14252
14264
|
component: Ae.Events,
|
14253
14265
|
type: "tab",
|
14254
|
-
group:
|
14266
|
+
group: It.Node,
|
14255
14267
|
label: "事件"
|
14256
14268
|
},
|
14257
14269
|
{
|
@@ -14259,7 +14271,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
14259
14271
|
region: "Settings",
|
14260
14272
|
component: Ae.Directives,
|
14261
14273
|
type: "tab",
|
14262
|
-
group:
|
14274
|
+
group: It.Node,
|
14263
14275
|
label: "指令"
|
14264
14276
|
},
|
14265
14277
|
{
|
@@ -15012,7 +15024,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15012
15024
|
const e = (c = "") => ({
|
15013
15025
|
type: "JSExpression",
|
15014
15026
|
value: cn(c) ? c.value : c
|
15015
|
-
}), s = r, o = t, l = (c) =>
|
15027
|
+
}), s = r, o = t, l = (c) => Xe(c, s.context, !0), a = C(e(s.modelValue).value);
|
15016
15028
|
ne(
|
15017
15029
|
() => s.modelValue,
|
15018
15030
|
(c) => {
|
@@ -15054,7 +15066,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15054
15066
|
const t = r;
|
15055
15067
|
return (e, s) => (u(), w(n(ea), He({ clearable: "" }, e.$attrs), {
|
15056
15068
|
default: b(() => [
|
15057
|
-
(u(!0), B(Y, null,
|
15069
|
+
(u(!0), B(Y, null, ie(t.options, (o) => (u(), w(n(ta), He({
|
15058
15070
|
key: o.label
|
15059
15071
|
}, { ref_for: !0 }, o), null, 16))), 128))
|
15060
15072
|
]),
|
@@ -15097,13 +15109,13 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15097
15109
|
size: "small"
|
15098
15110
|
}, e.$attrs), {
|
15099
15111
|
default: b(() => [
|
15100
|
-
(u(!0), B(Y, null,
|
15112
|
+
(u(!0), B(Y, null, ie(t.options, (o) => (u(), w(n(Cn), {
|
15101
15113
|
label: o.label,
|
15102
15114
|
value: o.value,
|
15103
15115
|
title: o.label
|
15104
15116
|
}, {
|
15105
15117
|
default: b(() => [
|
15106
|
-
o.svg ? (u(), w(n(
|
15118
|
+
o.svg ? (u(), w(n(mt), {
|
15107
15119
|
key: 0,
|
15108
15120
|
src: o.svg
|
15109
15121
|
}, null, 8, ["src"])) : (u(), B(Y, { key: 1 }, [
|
@@ -15132,7 +15144,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15132
15144
|
class: "v-tag-setter",
|
15133
15145
|
size: "small"
|
15134
15146
|
}, l.$attrs), [
|
15135
|
-
(u(!0), B(Y, null,
|
15147
|
+
(u(!0), B(Y, null, ie(e.options, (i) => (u(), B("span", {
|
15136
15148
|
label: i.value,
|
15137
15149
|
title: i.label,
|
15138
15150
|
class: he({
|
@@ -15140,7 +15152,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15140
15152
|
}),
|
15141
15153
|
onClick: (c) => o(i)
|
15142
15154
|
}, [
|
15143
|
-
i.svg ? (u(), w(n(
|
15155
|
+
i.svg ? (u(), w(n(mt), {
|
15144
15156
|
key: 0,
|
15145
15157
|
src: i.svg,
|
15146
15158
|
size: 16
|
@@ -15204,7 +15216,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15204
15216
|
c && (o.value = c.endsWith("px"), a.value = c);
|
15205
15217
|
},
|
15206
15218
|
{ immediate: !0 }
|
15207
|
-
), (c, v) =>
|
15219
|
+
), (c, v) => Ct((u(), w(n(aa), He({
|
15208
15220
|
clearable: "",
|
15209
15221
|
unit: l.value,
|
15210
15222
|
"with-unit": !!l.value,
|
@@ -15226,7 +15238,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15226
15238
|
setup(r, { emit: t }) {
|
15227
15239
|
const e = r, s = t, o = C([]), l = x(() => o.value.length < e.limit), a = (c) => c.type.includes("image") ? (la(c).then((v) => {
|
15228
15240
|
o.value = [{ name: c.name, url: v }];
|
15229
|
-
}), !1) : (
|
15241
|
+
}), !1) : (yt.error("只能上传图片"), !1), i = () => {
|
15230
15242
|
o.value = [];
|
15231
15243
|
};
|
15232
15244
|
return ne(
|
@@ -15253,7 +15265,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15253
15265
|
}, c.$attrs), {
|
15254
15266
|
default: b(() => [
|
15255
15267
|
V("span", Sg, [
|
15256
|
-
p(n(
|
15268
|
+
p(n(mt), { icon: n(bc) }, null, 8, ["icon"])
|
15257
15269
|
])
|
15258
15270
|
]),
|
15259
15271
|
_: 1
|
@@ -15280,7 +15292,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15280
15292
|
s("change", o.value.join(" ").trim());
|
15281
15293
|
};
|
15282
15294
|
return (a, i) => (u(), B("div", Cg, [
|
15283
|
-
(u(!0), B(Y, null,
|
15295
|
+
(u(!0), B(Y, null, ie(e.sections, (c) => (u(), w($a, {
|
15284
15296
|
name: c - 1,
|
15285
15297
|
modelValue: o.value[c - 1],
|
15286
15298
|
"onUpdate:modelValue": (v) => o.value[c - 1] = v,
|
@@ -15315,7 +15327,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15315
15327
|
modelValue: o.value,
|
15316
15328
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c)
|
15317
15329
|
}), null, 16, ["modelValue"]),
|
15318
|
-
p(n(
|
15330
|
+
p(n(mt), {
|
15319
15331
|
onClick: l,
|
15320
15332
|
class: "v-slider-setter__close",
|
15321
15333
|
size: 16,
|
@@ -15621,7 +15633,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15621
15633
|
]),
|
15622
15634
|
_: 1
|
15623
15635
|
}, 8, ["size", "model-value", "suffix-icon"]),
|
15624
|
-
o.value ? (u(), w(n(
|
15636
|
+
o.value ? (u(), w(n(Dt), {
|
15625
15637
|
key: 0,
|
15626
15638
|
title: "图标选择器",
|
15627
15639
|
width: "1000px",
|
@@ -15660,7 +15672,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15660
15672
|
}, null, 8, ["size", "prefix-icon", "modelValue"]),
|
15661
15673
|
V("div", Tg, [
|
15662
15674
|
V("div", jg, [
|
15663
|
-
(u(!0), B(Y, null,
|
15675
|
+
(u(!0), B(Y, null, ie(c.value, (_) => (u(), B("i", {
|
15664
15676
|
onClick: (y) => v(_),
|
15665
15677
|
class: he([
|
15666
15678
|
l.value === _ ? "is-active" : "",
|
@@ -15681,7 +15693,7 @@ const av = ["innerHTML"], lv = /* @__PURE__ */ M({
|
|
15681
15693
|
}, 8, ["modelValue"])) : D("", !0)
|
15682
15694
|
]));
|
15683
15695
|
}
|
15684
|
-
}), Og = /* @__PURE__ */
|
15696
|
+
}), Og = /* @__PURE__ */ wt(Bg, [["__scopeId", "data-v-b0e9c57b"]]), Re = {
|
15685
15697
|
StringSetter: dg,
|
15686
15698
|
BooleanSetter: pg,
|
15687
15699
|
ExpressionSetter: gg,
|
@@ -15882,7 +15894,7 @@ class Pg {
|
|
15882
15894
|
set(t, e) {
|
15883
15895
|
const s = this.widgets[t];
|
15884
15896
|
if (!s) {
|
15885
|
-
|
15897
|
+
Ht.warn(`widget '${t}' is not found`);
|
15886
15898
|
return;
|
15887
15899
|
}
|
15888
15900
|
eo(s, e), e.component && (s.component = e.component);
|
@@ -16023,7 +16035,7 @@ class Lg {
|
|
16023
16035
|
set(t, e) {
|
16024
16036
|
const s = this.setters[t];
|
16025
16037
|
if (!s) {
|
16026
|
-
|
16038
|
+
Ht.warn(`setter '${t}' is not found`);
|
16027
16039
|
return;
|
16028
16040
|
}
|
16029
16041
|
eo(s, e), e.component && (s.component = e.component);
|
@@ -16124,12 +16136,12 @@ class Wg {
|
|
16124
16136
|
constructor(t, e, s, o) {
|
16125
16137
|
te(this, "proxied", {});
|
16126
16138
|
te(this, "document", null);
|
16127
|
-
te(this, "hover",
|
16128
|
-
te(this, "dropping",
|
16139
|
+
te(this, "hover", bt(null));
|
16140
|
+
te(this, "dropping", bt(null));
|
16129
16141
|
te(this, "selected", C(null));
|
16130
16142
|
te(this, "dragging", null);
|
16131
16143
|
te(this, "draggingNode", null);
|
16132
|
-
te(this, "lines",
|
16144
|
+
te(this, "lines", bt([]));
|
16133
16145
|
this.engine = t, this.contentWindow = e, this.dependencies = s, this.devtools = o, this.document = this.contentWindow.document, this.bindEvents(e, this.document);
|
16134
16146
|
}
|
16135
16147
|
bind(t, e) {
|
@@ -16386,7 +16398,7 @@ class Wg {
|
|
16386
16398
|
this.draggingNode = t;
|
16387
16399
|
}
|
16388
16400
|
async setHover(t) {
|
16389
|
-
if (await
|
16401
|
+
if (await dt(), t) {
|
16390
16402
|
const e = this.getElmenetByModel(t);
|
16391
16403
|
if (!e) return;
|
16392
16404
|
const s = e.getBoundingClientRect(), o = Ne(t) ? [] : this.findPathByNode(t);
|
@@ -16401,7 +16413,7 @@ class Wg {
|
|
16401
16413
|
this.hover.value = null;
|
16402
16414
|
}
|
16403
16415
|
async setSelected(t) {
|
16404
|
-
if (await
|
16416
|
+
if (await dt(), t) {
|
16405
16417
|
const e = this.getElmenetByModel(t) || this.document?.createElement("span");
|
16406
16418
|
if (!e) return;
|
16407
16419
|
const s = e.getBoundingClientRect(), o = Ne(t) ? [] : this.findPathByNode(t);
|
@@ -16416,7 +16428,7 @@ class Wg {
|
|
16416
16428
|
this.selected.value = null;
|
16417
16429
|
}
|
16418
16430
|
async setDropping(t, e = "inner") {
|
16419
|
-
if (await
|
16431
|
+
if (await dt(), t) {
|
16420
16432
|
const s = this.getElmenetByModel(t);
|
16421
16433
|
if (!s) return;
|
16422
16434
|
const o = s.getBoundingClientRect(), l = Ne(t) ? [] : this.findPathByNode(t);
|
@@ -16711,7 +16723,7 @@ class Kg extends ua {
|
|
16711
16723
|
super();
|
16712
16724
|
te(this, "contentWindow", null);
|
16713
16725
|
te(this, "renderer", null);
|
16714
|
-
te(this, "designer",
|
16726
|
+
te(this, "designer", bt(null));
|
16715
16727
|
te(this, "engine");
|
16716
16728
|
te(this, "materialPath");
|
16717
16729
|
te(this, "rendered", C(Symbol()));
|
@@ -16754,6 +16766,7 @@ class Kg extends ua {
|
|
16754
16766
|
}
|
16755
16767
|
#app.is-page {
|
16756
16768
|
padding: 10px;
|
16769
|
+
box-sizing: border-box;
|
16757
16770
|
}
|
16758
16771
|
#app.is-page.is-pure {
|
16759
16772
|
background-color: var(--el-fill-color-light, #f5f7fa);
|
@@ -16774,7 +16787,7 @@ class Kg extends ua {
|
|
16774
16787
|
setup(e, s) {
|
16775
16788
|
const o = e.contentWindow;
|
16776
16789
|
if (!o) {
|
16777
|
-
|
16790
|
+
Ht.warn("Simulator contentWindow is null");
|
16778
16791
|
return;
|
16779
16792
|
}
|
16780
16793
|
o.__simulator__ = this;
|
@@ -16994,7 +17007,7 @@ class Lf {
|
|
16994
17007
|
}
|
16995
17008
|
class qg {
|
16996
17009
|
constructor() {
|
16997
|
-
te(this, "__state",
|
17010
|
+
te(this, "__state", Vt({
|
16998
17011
|
outlineEnabled: !0,
|
16999
17012
|
activeEvent: !0,
|
17000
17013
|
autoApply: !0,
|
@@ -17113,14 +17126,14 @@ class Ff extends ua {
|
|
17113
17126
|
engine: this,
|
17114
17127
|
materialPath: v,
|
17115
17128
|
enhance: this.getEnhanceConfig(I)
|
17116
|
-
}), this.access = f || new Ai({ alert:
|
17129
|
+
}), this.access = f || new Ai({ alert: ut, ...Ci }), this.remote = h, this.report = new Qg(this.remote, this.access, this.service), this.checkVersion = _, this.bindEvents(), this.init(l).then(this.render.bind(this)), Qs(this.dispose.bind(this));
|
17117
17130
|
}
|
17118
17131
|
/**
|
17119
17132
|
* 初始化引擎
|
17120
17133
|
* @param project 项目Schema
|
17121
17134
|
*/
|
17122
17135
|
async init(e) {
|
17123
|
-
const s = await this.service.init(e, !0).catch((o) => (
|
17136
|
+
const s = await this.service.init(e, !0).catch((o) => (Ht.warn("VTJEngine service init fail.", o), null));
|
17124
17137
|
if (s) {
|
17125
17138
|
const o = s.platform || "web";
|
17126
17139
|
o === "uniapp" && hn.set("UniConfig", {
|
@@ -17153,7 +17166,7 @@ class Ff extends ua {
|
|
17153
17166
|
checkLocked(e) {
|
17154
17167
|
const s = this.project.value?.locked, o = !!s, l = this.access?.getData();
|
17155
17168
|
if (o && l?.name !== s)
|
17156
|
-
return e ||
|
17169
|
+
return e || ut(`项目已被[ ${s} ]锁定,无法更新`), !0;
|
17157
17170
|
}
|
17158
17171
|
/**
|
17159
17172
|
* 渲染设计器界面
|
@@ -17164,7 +17177,7 @@ class Ff extends ua {
|
|
17164
17177
|
const s = Ko(Yg);
|
17165
17178
|
this.options.install && s.use(this.options.install, this), s.provide(qa, Cl(this)), s.mount(e), this.app = s;
|
17166
17179
|
} else
|
17167
|
-
|
17180
|
+
Ht.warn("VTJEngine constructor param [ container ] is undefined");
|
17168
17181
|
}
|
17169
17182
|
/**
|
17170
17183
|
* 绑定所有事件监听器
|
@@ -17177,7 +17190,7 @@ class Ff extends ua {
|
|
17177
17190
|
* @param e 项目模型事件
|
17178
17191
|
*/
|
17179
17192
|
async activeFile(e) {
|
17180
|
-
await
|
17193
|
+
await dt();
|
17181
17194
|
const s = e.model, o = e.model.currentFile;
|
17182
17195
|
if (o) {
|
17183
17196
|
if (s.isPageFile(o) && o.raw)
|
@@ -17198,7 +17211,7 @@ class Ff extends ua {
|
|
17198
17211
|
*/
|
17199
17212
|
async changeFile(e) {
|
17200
17213
|
if (this.checkLocked()) return;
|
17201
|
-
await
|
17214
|
+
await dt();
|
17202
17215
|
const s = e.toDsl();
|
17203
17216
|
this.service.saveFile(s, this.project.value?.toDsl()), this.updateCurrent(e), this.history.value?.add(s), Yt(this.history);
|
17204
17217
|
}
|
@@ -17206,7 +17219,7 @@ class Ff extends ua {
|
|
17206
17219
|
this.saveCurrentFile(), this.current.value && (this.history.value?.add(this.current.value.toDsl()), Yt(this.history));
|
17207
17220
|
}
|
17208
17221
|
async updateCurrent(e, s = !0) {
|
17209
|
-
this.current.value = e, await
|
17222
|
+
this.current.value = e, await dt(), this.context.value = this.simulator.renderer?.context || null, this.isEmptyCurrent.value = this.current.value?.nodes.length === 0, this.changed.value = Symbol(), s && Yt(this.context);
|
17210
17223
|
}
|
17211
17224
|
/**
|
17212
17225
|
* 保存项目
|
@@ -17255,7 +17268,7 @@ class Ff extends ua {
|
|
17255
17268
|
* 保存物料资源
|
17256
17269
|
*/
|
17257
17270
|
async saveMaterials() {
|
17258
|
-
await
|
17271
|
+
await dt(), this.simulator.ready(() => {
|
17259
17272
|
const e = this.project.value;
|
17260
17273
|
if (e) {
|
17261
17274
|
const s = this.assets.componentMap;
|
@@ -17394,7 +17407,7 @@ class Ff extends ua {
|
|
17394
17407
|
}
|
17395
17408
|
function Me() {
|
17396
17409
|
const r = Hs(qa, null);
|
17397
|
-
return r ||
|
17410
|
+
return r || Ht.error("VTJEngine is not exist"), r;
|
17398
17411
|
}
|
17399
17412
|
const Xt = M({
|
17400
17413
|
name: "RegionWrapper",
|
@@ -17500,7 +17513,7 @@ const Xt = M({
|
|
17500
17513
|
getWidget(r) {
|
17501
17514
|
const t = hn.get(r);
|
17502
17515
|
if (!t) {
|
17503
|
-
|
17516
|
+
Ht.warn(`widget [ ${r} ] is not exsit`);
|
17504
17517
|
return;
|
17505
17518
|
}
|
17506
17519
|
return this.getWidgets(t.region).find((s) => s.widget.name === r);
|
@@ -17716,7 +17729,7 @@ const Xt = M({
|
|
17716
17729
|
}, 8, ["height"]),
|
17717
17730
|
p(n(Ao), { class: "v-skeleton__wrapper" }, {
|
17718
17731
|
default: b(() => [
|
17719
|
-
a.value ? D("", !0) :
|
17732
|
+
a.value ? D("", !0) : Ct((u(), w(n(Co), {
|
17720
17733
|
key: 0,
|
17721
17734
|
width: e.leftWidth,
|
17722
17735
|
class: he(["v-skeleton__left", {
|
@@ -17743,7 +17756,7 @@ const Xt = M({
|
|
17743
17756
|
region: "Preview",
|
17744
17757
|
preview: a.value
|
17745
17758
|
}, null, 8, ["preview"])) : D("", !0),
|
17746
|
-
|
17759
|
+
Ct(p(n(Xt), {
|
17747
17760
|
ref_key: "workspace",
|
17748
17761
|
ref: y,
|
17749
17762
|
region: "Workspace"
|
@@ -17753,7 +17766,7 @@ const Xt = M({
|
|
17753
17766
|
]),
|
17754
17767
|
_: 1
|
17755
17768
|
}),
|
17756
|
-
a.value ? D("", !0) :
|
17769
|
+
a.value ? D("", !0) : Ct((u(), w(n(Co), {
|
17757
17770
|
key: 1,
|
17758
17771
|
width: e.rightWidth,
|
17759
17772
|
class: "v-skeleton__right"
|
@@ -17843,8 +17856,8 @@ const Xt = M({
|
|
17843
17856
|
o.value = !0, l.value = cn(i.value) ? i.value.value : "";
|
17844
17857
|
}, h = () => {
|
17845
17858
|
o.value = !1, l.value = "";
|
17846
|
-
}, _ = async (I) =>
|
17847
|
-
await
|
17859
|
+
}, _ = async (I) => Xe(I, e.context, !0) ? (v[a.value.name] = i.value, i.value = I, s("change", I), !0) : !1, y = async () => {
|
17860
|
+
await Qt("确定要解除绑定吗?") && (h(), i.value = void 0, s("change", void 0));
|
17848
17861
|
};
|
17849
17862
|
return (I, k) => (u(), w(n(fn), {
|
17850
17863
|
class: "v-setter",
|
@@ -17912,7 +17925,7 @@ const Xt = M({
|
|
17912
17925
|
dropdown: b(() => [
|
17913
17926
|
p(n(Xo), null, {
|
17914
17927
|
default: b(() => [
|
17915
|
-
(u(!0), B(Y, null,
|
17928
|
+
(u(!0), B(Y, null, ie(e.setters, (E) => (u(), w(n(Hn), {
|
17916
17929
|
command: E,
|
17917
17930
|
key: E.name
|
17918
17931
|
}, {
|
@@ -17978,7 +17991,7 @@ const Xt = M({
|
|
17978
17991
|
widgets: s,
|
17979
17992
|
widgetsRef: o
|
17980
17993
|
}), (l, a) => (u(), B("div", cf, [
|
17981
|
-
(u(!0), B(Y, null,
|
17994
|
+
(u(!0), B(Y, null, ie(n(s), (i) => (u(), w(n(an), {
|
17982
17995
|
ref_for: !0,
|
17983
17996
|
ref_key: "widgetsRef",
|
17984
17997
|
ref: o,
|
@@ -18000,7 +18013,7 @@ const Xt = M({
|
|
18000
18013
|
widgets: s,
|
18001
18014
|
widgetsRef: o
|
18002
18015
|
}), (l, a) => (u(), B("div", df, [
|
18003
|
-
(u(!0), B(Y, null,
|
18016
|
+
(u(!0), B(Y, null, ie(n(s), (i) => (u(), w(n(an), {
|
18004
18017
|
ref_for: !0,
|
18005
18018
|
ref_key: "widgetsRef",
|
18006
18019
|
ref: o,
|
@@ -18023,7 +18036,7 @@ const Xt = M({
|
|
18023
18036
|
widgets: s,
|
18024
18037
|
widgetsRef: o
|
18025
18038
|
}), (l, a) => (u(), B("div", mf, [
|
18026
|
-
(u(!0), B(Y, null,
|
18039
|
+
(u(!0), B(Y, null, ie(n(s), (i) => (u(), w(n(an), {
|
18027
18040
|
ref_for: !0,
|
18028
18041
|
ref_key: "widgetsRef",
|
18029
18042
|
ref: o,
|
@@ -18064,7 +18077,7 @@ const Xt = M({
|
|
18064
18077
|
}), (y, I) => (u(), B("div", gf, [
|
18065
18078
|
V("div", ff, [
|
18066
18079
|
V("div", hf, [
|
18067
|
-
(u(!0), B(Y, null,
|
18080
|
+
(u(!0), B(Y, null, ie(c.value, (k) => (u(), w(n(No), {
|
18068
18081
|
key: `icon-${k.name}`,
|
18069
18082
|
icon: k.icon,
|
18070
18083
|
label: k.label,
|
@@ -18074,7 +18087,7 @@ const Xt = M({
|
|
18074
18087
|
}, null, 8, ["icon", "label", "active", "open", "onClick"]))), 128))
|
18075
18088
|
]),
|
18076
18089
|
V("div", bf, [
|
18077
|
-
(u(!0), B(Y, null,
|
18090
|
+
(u(!0), B(Y, null, ie(v.value, (k) => (u(), w(n(No), {
|
18078
18091
|
key: `icon-${k.name}`,
|
18079
18092
|
icon: k.icon,
|
18080
18093
|
label: k.label,
|
@@ -18083,7 +18096,7 @@ const Xt = M({
|
|
18083
18096
|
])
|
18084
18097
|
]),
|
18085
18098
|
V("div", yf, [
|
18086
|
-
(u(!0), B(Y, null,
|
18099
|
+
(u(!0), B(Y, null, ie(c.value, (k) => (u(), w($o, {
|
18087
18100
|
key: k.name
|
18088
18101
|
}, [
|
18089
18102
|
d.value?.name === k.name ? (u(), w(n(an), {
|
@@ -18105,7 +18118,7 @@ const Xt = M({
|
|
18105
18118
|
region: {}
|
18106
18119
|
},
|
18107
18120
|
setup(r, { expose: t }) {
|
18108
|
-
const e = r, { widgets: s, widgetsRef: o } = sn(e.region), l = C(Symbol()), a =
|
18121
|
+
const e = r, { widgets: s, widgetsRef: o } = sn(e.region), l = C(Symbol()), a = Vt(
|
18109
18122
|
s.value.map((k) => ({
|
18110
18123
|
name: k.name,
|
18111
18124
|
command: k.name,
|
@@ -18162,7 +18175,7 @@ const Xt = M({
|
|
18162
18175
|
onActionClick: _
|
18163
18176
|
}, {
|
18164
18177
|
default: b(() => [
|
18165
|
-
(u(!0), B(Y, null,
|
18178
|
+
(u(!0), B(Y, null, ie(n(s), (A) => (u(), B(Y, {
|
18166
18179
|
key: A.name
|
18167
18180
|
}, [
|
18168
18181
|
v.value === A.name ? (u(), w(n(an), {
|
@@ -18185,8 +18198,8 @@ const Xt = M({
|
|
18185
18198
|
region: {}
|
18186
18199
|
},
|
18187
18200
|
setup(r, { expose: t }) {
|
18188
|
-
const e = r, s = Me(), { current: o } =
|
18189
|
-
() => a.value ?
|
18201
|
+
const e = r, s = Me(), { current: o } = Ze(), { selected: l, isSelectBlock: a } = Bt(), i = x(
|
18202
|
+
() => a.value ? It.Block : It.Node
|
18190
18203
|
), { widgets: c, widgetsRef: v } = sn(e.region, i), g = C(), d = C(!1), m = x(() => c.value.map((y) => ({
|
18191
18204
|
name: y.name,
|
18192
18205
|
label: y.label,
|
@@ -18279,7 +18292,7 @@ const Xt = M({
|
|
18279
18292
|
onActionClick: _
|
18280
18293
|
}, {
|
18281
18294
|
default: b(() => [
|
18282
|
-
(u(!0), B(Y, null,
|
18295
|
+
(u(!0), B(Y, null, ie(n(c), (k) => (u(), B(Y, {
|
18283
18296
|
key: k.name
|
18284
18297
|
}, [
|
18285
18298
|
g.value === k.name ? (u(), w(n(an), {
|
@@ -18323,7 +18336,7 @@ const Xt = M({
|
|
18323
18336
|
widgets: s,
|
18324
18337
|
widgetsRef: o
|
18325
18338
|
}), (l, a) => (u(), B("div", Sf, [
|
18326
|
-
(u(!0), B(Y, null,
|
18339
|
+
(u(!0), B(Y, null, ie(n(s), (i) => (u(), w(n(an), {
|
18327
18340
|
ref_for: !0,
|
18328
18341
|
ref_key: "widgetsRef",
|
18329
18342
|
ref: o,
|
@@ -18339,7 +18352,7 @@ const Xt = M({
|
|
18339
18352
|
region: {}
|
18340
18353
|
},
|
18341
18354
|
setup(r, { expose: t }) {
|
18342
|
-
const e = r, { widgets: s, widgetsRef: o } = sn(e.region), l =
|
18355
|
+
const e = r, { widgets: s, widgetsRef: o } = sn(e.region), l = Vt(
|
18343
18356
|
s.value.map((c) => ({
|
18344
18357
|
name: c.name,
|
18345
18358
|
command: c.name,
|
@@ -18359,7 +18372,7 @@ const Xt = M({
|
|
18359
18372
|
"onUpdate:modelValue": v[0] || (v[0] = (g) => i.value = g)
|
18360
18373
|
}, {
|
18361
18374
|
default: b(() => [
|
18362
|
-
(u(!0), B(Y, null,
|
18375
|
+
(u(!0), B(Y, null, ie(n(s), (g) => (u(), w($o, {
|
18363
18376
|
key: g.name
|
18364
18377
|
}, [
|
18365
18378
|
i.value === g.name ? (u(), w(n(an), {
|
@@ -18401,7 +18414,7 @@ export {
|
|
18401
18414
|
Bc as K,
|
18402
18415
|
Gg as L,
|
18403
18416
|
Rc as M,
|
18404
|
-
|
18417
|
+
Ft as N,
|
18405
18418
|
Jg as O,
|
18406
18419
|
Tc as P,
|
18407
18420
|
Wg as Q,
|
@@ -18410,7 +18423,7 @@ export {
|
|
18410
18423
|
Fg as T,
|
18411
18424
|
Lf as U,
|
18412
18425
|
jc as V,
|
18413
|
-
|
18426
|
+
It as W,
|
18414
18427
|
ag as X,
|
18415
18428
|
lg as Y,
|
18416
18429
|
ug as Z,
|
@@ -18424,12 +18437,12 @@ export {
|
|
18424
18437
|
Xt as a5,
|
18425
18438
|
an as a6,
|
18426
18439
|
pe as a7,
|
18427
|
-
|
18440
|
+
ut as a8,
|
18428
18441
|
xe as a9,
|
18429
|
-
|
18442
|
+
Qt as aa,
|
18430
18443
|
De as ab,
|
18431
18444
|
eu as ac,
|
18432
|
-
|
18445
|
+
Xe as ad,
|
18433
18446
|
tu as ae,
|
18434
18447
|
Ls as af,
|
18435
18448
|
nu as ag,
|
@@ -18445,7 +18458,7 @@ export {
|
|
18445
18458
|
No as k,
|
18446
18459
|
ge as l,
|
18447
18460
|
ms as m,
|
18448
|
-
|
18461
|
+
$e as n,
|
18449
18462
|
ns as o,
|
18450
18463
|
uo as p,
|
18451
18464
|
pd as q,
|