@vtj/designer 0.12.14 → 0.12.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,10 +19,10 @@ import { editor as gc } 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.15
|
23
23
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
24
24
|
*/
|
25
|
-
const Tn = "0.12.
|
25
|
+
const Tn = "0.12.15", fc = {
|
26
26
|
width: 390,
|
27
27
|
height: 844
|
28
28
|
}, hc = {
|
@@ -521,7 +521,7 @@ function sn(r, t) {
|
|
521
521
|
...t
|
522
522
|
});
|
523
523
|
}
|
524
|
-
function
|
524
|
+
function xe(r, t = "提示") {
|
525
525
|
return Ba.warning({
|
526
526
|
title: t,
|
527
527
|
message: r
|
@@ -2383,7 +2383,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2383
2383
|
]));
|
2384
2384
|
}
|
2385
2385
|
}), Ie = vl({
|
2386
|
-
loader: () => import("./Editor-
|
2386
|
+
loader: () => import("./Editor-BVPu_t5X.js"),
|
2387
2387
|
loadingComponent: P({
|
2388
2388
|
render() {
|
2389
2389
|
return Kt("div", "正在拼命加载...");
|
@@ -2429,7 +2429,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2429
2429
|
try {
|
2430
2430
|
g.value.meta = JSON.parse(_);
|
2431
2431
|
} catch {
|
2432
|
-
|
2432
|
+
xe("路由元信息解析出错,必须是JSON格式数据", "运行时错误");
|
2433
2433
|
}
|
2434
2434
|
}
|
2435
2435
|
}), p = C({
|
@@ -2440,7 +2440,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2440
2440
|
try {
|
2441
2441
|
g.value.style = JSON.parse(_);
|
2442
2442
|
} catch {
|
2443
|
-
|
2443
|
+
xe("页面窗口表现配置解析出错,必须是JSON格式数据", "运行时错误");
|
2444
2444
|
}
|
2445
2445
|
}
|
2446
2446
|
}), f = [
|
@@ -2448,7 +2448,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
2448
2448
|
{ label: "目录", value: !0 }
|
2449
2449
|
], h = (_) => {
|
2450
2450
|
g.value && (g.value.name = es(_));
|
2451
|
-
}, k = async (_) => e.value?.existPageName(_.name, [_.id]) ? (
|
2451
|
+
}, k = async (_) => e.value?.existPageName(_.name, [_.id]) ? (xe("页面名称已存在,请更换"), !1) : (t.item ? (e.value?.updatePage(_), o.value?.setSelected(null), a.simulator.refresh()) : e.value?.createPage(_, t.parentId), !0), { copy: w } = Za({}), E = (_) => {
|
2452
2452
|
w(_), ft.success({
|
2453
2453
|
message: "已经复制到粘贴板"
|
2454
2454
|
});
|
@@ -3540,7 +3540,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3540
3540
|
const e = r, a = t, o = x(), i = C(() => `${50 * Math.ceil(e.slots.length / 4) + 180}px`), s = (c) => {
|
3541
3541
|
o.value = c;
|
3542
3542
|
}, l = () => {
|
3543
|
-
o.value ? (a("submit", o.value), a("update:modelValue", !1)) :
|
3543
|
+
o.value ? (a("submit", o.value), a("update:modelValue", !1)) : xe("请选择插槽");
|
3544
3544
|
};
|
3545
3545
|
return (c, m) => (u(), y(n(St), Me({
|
3546
3546
|
class: "v-slots-picker",
|
@@ -3649,7 +3649,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3649
3649
|
if (A.dir) {
|
3650
3650
|
const D = t.value?.getPage(A.id);
|
3651
3651
|
if (D && D.children?.length) {
|
3652
|
-
|
3652
|
+
xe("请先删除子页面");
|
3653
3653
|
return;
|
3654
3654
|
}
|
3655
3655
|
}
|
@@ -3755,12 +3755,12 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3755
3755
|
});
|
3756
3756
|
const f = () => {
|
3757
3757
|
if (!v.value || Array.isArray(v.value) && v.value.length === 0)
|
3758
|
-
return
|
3758
|
+
return xe("请选择文件"), !1;
|
3759
3759
|
const _ = (e.attachment?.accept || "").toLowerCase().split(",");
|
3760
3760
|
return _.length > 0 ? [].concat(v.value).every((D) => {
|
3761
3761
|
const O = D.name || D.url.split("?")[0], $ = O.substring(O.lastIndexOf(".")).toLowerCase();
|
3762
3762
|
return _.includes($);
|
3763
|
-
}) ? !0 : (
|
3763
|
+
}) ? !0 : (xe(`只支持 ${_.join(",")} 文件`), !1) : !0;
|
3764
3764
|
}, h = () => {
|
3765
3765
|
f() && (a("change", p.value), a("update:modelValue", p.value), l.value = !1);
|
3766
3766
|
}, k = () => {
|
@@ -3877,11 +3877,11 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
3877
3877
|
if (!L.existBlockName(M.name, [M.id]))
|
3878
3878
|
L.updateBlock(M);
|
3879
3879
|
else
|
3880
|
-
return
|
3880
|
+
return xe(`名称【${M.name}】已经存在,请更换名称`), !1;
|
3881
3881
|
else if (!L.existBlockName(M.name))
|
3882
3882
|
L.createBlock(M);
|
3883
3883
|
else
|
3884
|
-
return
|
3884
|
+
return xe(`名称【${M.name}】已经存在,请更换名称`), !1;
|
3885
3885
|
return !0;
|
3886
3886
|
}, D = () => {
|
3887
3887
|
p.value = E(), h.value = !0;
|
@@ -4636,7 +4636,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
4636
4636
|
}, f = async (k) => t.project?.existApiName(
|
4637
4637
|
s.value.name,
|
4638
4638
|
t.model ? [s.value.id] : []
|
4639
|
-
) ? (
|
4639
|
+
) ? (xe(`API名称 [ ${s.value.name} ] 已存在`), !1) : s.value.headers && !Ke(s.value.headers, window) || s.value.mockTemplate && !Ke(s.value.mockTemplate, window) ? !1 : (t.project?.setApi(s.value), o.value?.close(), !0), h = () => {
|
4640
4640
|
if (s.value.mockTemplate) {
|
4641
4641
|
const k = Vn(
|
4642
4642
|
s.value.mockTemplate,
|
@@ -5303,7 +5303,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5303
5303
|
}), o = (s) => t.current?.removeState(s.name), i = async (s, l) => {
|
5304
5304
|
const { name: c, value: m } = s;
|
5305
5305
|
if (!l && t.current?.state[c])
|
5306
|
-
return
|
5306
|
+
return xe(`名称 ${c} 已存在,请更换!`), !1;
|
5307
5307
|
const g = {
|
5308
5308
|
type: "JSExpression",
|
5309
5309
|
value: m
|
@@ -5335,7 +5335,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5335
5335
|
}), o = (s) => t.current?.removeFunction("computed", s.name), i = async (s, l) => {
|
5336
5336
|
const { name: c, value: m } = s;
|
5337
5337
|
if (!l && t.current?.computed[c])
|
5338
|
-
return
|
5338
|
+
return xe(`名称 ${c} 已存在,请更换!`), !1;
|
5339
5339
|
const g = {
|
5340
5340
|
type: "JSFunction",
|
5341
5341
|
value: m
|
@@ -5367,7 +5367,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5367
5367
|
}), o = (s) => t.current?.removeFunction("methods", s.name), i = async (s, l) => {
|
5368
5368
|
const { name: c, value: m } = s;
|
5369
5369
|
if (!l && t.current?.methods[c])
|
5370
|
-
return
|
5370
|
+
return xe(`名称 ${c} 已存在,请更换!`), !1;
|
5371
5371
|
const g = {
|
5372
5372
|
type: "JSFunction",
|
5373
5373
|
value: m
|
@@ -5405,7 +5405,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5405
5405
|
}), s = (c) => e.current?.removeFunction("lifeCycles", c.name), l = async (c, m) => {
|
5406
5406
|
const { name: g, value: v } = c;
|
5407
5407
|
if (!m && e.current?.lifeCycles[g])
|
5408
|
-
return
|
5408
|
+
return xe(`名称 ${g} 已存在,请更换!`), !1;
|
5409
5409
|
const p = {
|
5410
5410
|
type: "JSFunction",
|
5411
5411
|
value: v
|
@@ -5654,7 +5654,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
5654
5654
|
};
|
5655
5655
|
}, k = async (E) => {
|
5656
5656
|
const _ = Object.keys(o.value?.props || {});
|
5657
|
-
return !v(E.name) && !_.includes(E.name) ? (m(E.name), !0) : (
|
5657
|
+
return !v(E.name) && !_.includes(E.name) ? (m(E.name), !0) : (xe("已存在该属性名称"), !1);
|
5658
5658
|
}, w = async (E) => {
|
5659
5659
|
await zt("确定删除?") && g(E);
|
5660
5660
|
};
|
@@ -6765,7 +6765,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6765
6765
|
const { transform: D, test: O, name: $ } = T;
|
6766
6766
|
if (!t.current) return !1;
|
6767
6767
|
if (!t.item && t.current.dataSources[$])
|
6768
|
-
return
|
6768
|
+
return xe(`名称【${$}】已经存在,请更换名称`), !1;
|
6769
6769
|
if (D?.value) {
|
6770
6770
|
if (!Ke(D, t.context, !0))
|
6771
6771
|
return !1;
|
@@ -6780,11 +6780,11 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
6780
6780
|
}, A = async () => {
|
6781
6781
|
if (!t.context) return;
|
6782
6782
|
if (h(c.value) && !c.value.ref) {
|
6783
|
-
|
6783
|
+
xe("请先选择API");
|
6784
6784
|
return;
|
6785
6785
|
}
|
6786
6786
|
if (!c.value.test?.value) {
|
6787
|
-
|
6787
|
+
xe("请先填写测试用例");
|
6788
6788
|
return;
|
6789
6789
|
}
|
6790
6790
|
if (!Ke(c.value.test, t.context, !0))
|
@@ -7220,7 +7220,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7220
7220
|
const m = Oa(JSON.parse(c));
|
7221
7221
|
a.value?.setProp("style", m);
|
7222
7222
|
} catch {
|
7223
|
-
|
7223
|
+
xe("JSON格式错误");
|
7224
7224
|
}
|
7225
7225
|
}, l = () => {
|
7226
7226
|
const m = (e.value?.getEditor()).getValue();
|
@@ -7276,7 +7276,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
7276
7276
|
}, g = (f) => {
|
7277
7277
|
c.value = f === "auto" ? void 0 : "px";
|
7278
7278
|
}, v = () => {
|
7279
|
-
l.value ? (o("update:modelValue", l.value), o("submit", a.name, l.value), o("close")) :
|
7279
|
+
l.value ? (o("update:modelValue", l.value), o("submit", a.name, l.value), o("close")) : xe("请输入有效值", "提示");
|
7280
7280
|
}, p = () => {
|
7281
7281
|
l.value = void 0, o("update:modelValue", l.value), o("submit", a.name, void 0), o("close");
|
7282
7282
|
};
|
@@ -8688,7 +8688,7 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8688
8688
|
const m = JSON.parse(l);
|
8689
8689
|
t.value?.update(m), je("保存成功");
|
8690
8690
|
} catch (m) {
|
8691
|
-
|
8691
|
+
xe(m?.message);
|
8692
8692
|
}
|
8693
8693
|
};
|
8694
8694
|
return (s, l) => (u(), y(n(ge), {
|
@@ -8728,8 +8728,8 @@ const mu = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
8728
8728
|
id: p,
|
8729
8729
|
name: f,
|
8730
8730
|
source: m
|
8731
|
-
}).catch((k) => (
|
8732
|
-
h && (t.value?.update(h), je("保存成功"));
|
8731
|
+
}).catch((k) => (xe(k?.message), null));
|
8732
|
+
h && (Array.isArray(h) ? xe(h.join(","), "提示") : (t.value?.update(h), je("保存成功")));
|
8733
8733
|
}
|
8734
8734
|
}
|
8735
8735
|
};
|
@@ -10330,38 +10330,38 @@ function Vm() {
|
|
10330
10330
|
le += z.parentNode ? z.parentNode.className : "";
|
10331
10331
|
const _e = X.languageDetectRe.exec(le);
|
10332
10332
|
if (_e) {
|
10333
|
-
const
|
10334
|
-
return
|
10333
|
+
const Ce = Wt(_e[1]);
|
10334
|
+
return Ce || (Fe(Ne.replace("{}", _e[1])), Fe("Falling back to no-highlight mode for this block.", z)), Ce ? _e[1] : "no-highlight";
|
10335
10335
|
}
|
10336
|
-
return le.split(/\s+/).find((
|
10336
|
+
return le.split(/\s+/).find((Ce) => ie(Ce) || Wt(Ce));
|
10337
10337
|
}
|
10338
10338
|
function Be(z, le, _e) {
|
10339
|
-
let
|
10340
|
-
typeof le == "object" ? (
|
10341
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), We = z,
|
10339
|
+
let Ce = "", We = "";
|
10340
|
+
typeof le == "object" ? (Ce = z, _e = le.ignoreIllegals, We = le.language) : (we("10.7.0", "highlight(lang, code, ...args) has been deprecated."), we("10.7.0", `Please use highlight(code, options) instead.
|
10341
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), We = z, Ce = le), _e === void 0 && (_e = !0);
|
10342
10342
|
const yt = {
|
10343
|
-
code:
|
10343
|
+
code: Ce,
|
10344
10344
|
language: We
|
10345
10345
|
};
|
10346
10346
|
Dn("before:highlight", yt);
|
10347
10347
|
const Jt = yt.result ? yt.result : kn(yt.language, yt.code, _e);
|
10348
10348
|
return Jt.code = yt.code, Dn("after:highlight", Jt), Jt;
|
10349
10349
|
}
|
10350
|
-
function kn(z, le, _e,
|
10350
|
+
function kn(z, le, _e, Ce) {
|
10351
10351
|
const We = /* @__PURE__ */ Object.create(null);
|
10352
10352
|
function yt(G, ae) {
|
10353
10353
|
return G.keywords[ae];
|
10354
10354
|
}
|
10355
10355
|
function Jt() {
|
10356
10356
|
if (!de.keywords) {
|
10357
|
-
qe.addText(
|
10357
|
+
qe.addText(Ee);
|
10358
10358
|
return;
|
10359
10359
|
}
|
10360
10360
|
let G = 0;
|
10361
10361
|
de.keywordPatternRe.lastIndex = 0;
|
10362
|
-
let ae = de.keywordPatternRe.exec(
|
10362
|
+
let ae = de.keywordPatternRe.exec(Ee), be = "";
|
10363
10363
|
for (; ae; ) {
|
10364
|
-
be +=
|
10364
|
+
be += Ee.substring(G, ae.index);
|
10365
10365
|
const Se = Vt.case_insensitive ? ae[0].toLowerCase() : ae[0], Ze = yt(de, Se);
|
10366
10366
|
if (Ze) {
|
10367
10367
|
const [Nt, il] = Ze;
|
@@ -10373,26 +10373,26 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10373
10373
|
}
|
10374
10374
|
} else
|
10375
10375
|
be += ae[0];
|
10376
|
-
G = de.keywordPatternRe.lastIndex, ae = de.keywordPatternRe.exec(
|
10376
|
+
G = de.keywordPatternRe.lastIndex, ae = de.keywordPatternRe.exec(Ee);
|
10377
10377
|
}
|
10378
|
-
be +=
|
10378
|
+
be += Ee.substring(G), qe.addText(be);
|
10379
10379
|
}
|
10380
10380
|
function $n() {
|
10381
|
-
if (
|
10381
|
+
if (Ee === "") return;
|
10382
10382
|
let G = null;
|
10383
10383
|
if (typeof de.subLanguage == "string") {
|
10384
10384
|
if (!B[de.subLanguage]) {
|
10385
|
-
qe.addText(
|
10385
|
+
qe.addText(Ee);
|
10386
10386
|
return;
|
10387
10387
|
}
|
10388
|
-
G = kn(de.subLanguage,
|
10388
|
+
G = kn(de.subLanguage, Ee, !0, vo[de.subLanguage]), vo[de.subLanguage] = /** @type {CompiledMode} */
|
10389
10389
|
G._top;
|
10390
10390
|
} else
|
10391
|
-
G = ga(
|
10391
|
+
G = ga(Ee, de.subLanguage.length ? de.subLanguage : null);
|
10392
10392
|
de.relevance > 0 && (Pn += G.relevance), qe.__addSublanguage(G._emitter, G.language);
|
10393
10393
|
}
|
10394
10394
|
function ot() {
|
10395
|
-
de.subLanguage != null ? $n() : Jt(),
|
10395
|
+
de.subLanguage != null ? $n() : Jt(), Ee = "";
|
10396
10396
|
}
|
10397
10397
|
function At(G, ae) {
|
10398
10398
|
G !== "" && (qe.startScope(ae), qe.addText(G), qe.endScope());
|
@@ -10406,11 +10406,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10406
10406
|
continue;
|
10407
10407
|
}
|
10408
10408
|
const Ze = Vt.classNameAliases[G[be]] || G[be], Nt = ae[be];
|
10409
|
-
Ze ? At(Nt, Ze) : (
|
10409
|
+
Ze ? At(Nt, Ze) : (Ee = Nt, Jt(), Ee = ""), be++;
|
10410
10410
|
}
|
10411
10411
|
}
|
10412
10412
|
function uo(G, ae) {
|
10413
|
-
return G.scope && typeof G.scope == "string" && qe.openNode(Vt.classNameAliases[G.scope] || G.scope), G.beginScope && (G.beginScope._wrap ? (At(
|
10413
|
+
return G.scope && typeof G.scope == "string" && qe.openNode(Vt.classNameAliases[G.scope] || G.scope), G.beginScope && (G.beginScope._wrap ? (At(Ee, Vt.classNameAliases[G.beginScope._wrap] || G.beginScope._wrap), Ee = "") : G.beginScope._multi && (co(G.beginScope, ae), Ee = "")), de = Object.create(G, { parent: { value: de } }), de;
|
10414
10414
|
}
|
10415
10415
|
function po(G, ae, be) {
|
10416
10416
|
let Se = A(G.endRe, be);
|
@@ -10429,21 +10429,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10429
10429
|
return po(G.parent, ae, be);
|
10430
10430
|
}
|
10431
10431
|
function nl(G) {
|
10432
|
-
return de.matcher.regexIndex === 0 ? (
|
10432
|
+
return de.matcher.regexIndex === 0 ? (Ee += G[0], 1) : (ya = !0, 0);
|
10433
10433
|
}
|
10434
10434
|
function al(G) {
|
10435
10435
|
const ae = G[0], be = G.rule, Se = new t(be), Ze = [be.__beforeBegin, be["on:begin"]];
|
10436
10436
|
for (const Nt of Ze)
|
10437
10437
|
if (Nt && (Nt(G, Se), Se.isMatchIgnored))
|
10438
10438
|
return nl(ae);
|
10439
|
-
return be.skip ?
|
10439
|
+
return be.skip ? Ee += ae : (be.excludeBegin && (Ee += ae), ot(), !be.returnBegin && !be.excludeBegin && (Ee = ae)), uo(be, G), be.returnBegin ? 0 : ae.length;
|
10440
10440
|
}
|
10441
10441
|
function ol(G) {
|
10442
10442
|
const ae = G[0], be = le.substring(G.index), Se = po(de, G, be);
|
10443
10443
|
if (!Se)
|
10444
10444
|
return oo;
|
10445
10445
|
const Ze = de;
|
10446
|
-
de.endScope && de.endScope._wrap ? (ot(), At(ae, de.endScope._wrap)) : de.endScope && de.endScope._multi ? (ot(), co(de.endScope, G)) : Ze.skip ?
|
10446
|
+
de.endScope && de.endScope._wrap ? (ot(), At(ae, de.endScope._wrap)) : de.endScope && de.endScope._multi ? (ot(), co(de.endScope, G)) : Ze.skip ? Ee += ae : (Ze.returnEnd || Ze.excludeEnd || (Ee += ae), ot(), Ze.excludeEnd && (Ee = ae));
|
10447
10447
|
do
|
10448
10448
|
de.scope && qe.closeNode(), !de.skip && !de.subLanguage && (Pn += de.relevance), de = de.parent;
|
10449
10449
|
while (de !== Se.parent);
|
@@ -10458,10 +10458,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10458
10458
|
let Nn = {};
|
10459
10459
|
function mo(G, ae) {
|
10460
10460
|
const be = ae && ae[0];
|
10461
|
-
if (
|
10461
|
+
if (Ee += G, be == null)
|
10462
10462
|
return ot(), 0;
|
10463
10463
|
if (Nn.type === "begin" && ae.type === "end" && Nn.index === ae.index && be === "") {
|
10464
|
-
if (
|
10464
|
+
if (Ee += le.slice(ae.index, ae.index + 1), !$e) {
|
10465
10465
|
const Se = new Error(`0 width match regex (${z})`);
|
10466
10466
|
throw Se.languageName = z, Se.badRule = Nn.rule, Se;
|
10467
10467
|
}
|
@@ -10478,20 +10478,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10478
10478
|
return Se;
|
10479
10479
|
}
|
10480
10480
|
if (ae.type === "illegal" && be === "")
|
10481
|
-
return
|
10481
|
+
return Ee += `
|
10482
10482
|
`, 1;
|
10483
10483
|
if (ba > 1e5 && ba > ae.index * 3)
|
10484
10484
|
throw new Error("potential infinite loop, way more iterations than matches");
|
10485
|
-
return
|
10485
|
+
return Ee += be, be.length;
|
10486
10486
|
}
|
10487
10487
|
const Vt = Wt(z);
|
10488
10488
|
if (!Vt)
|
10489
10489
|
throw ye(Ne.replace("{}", z)), new Error('Unknown language: "' + z + '"');
|
10490
10490
|
const ll = zs(Vt);
|
10491
|
-
let ha = "", de =
|
10491
|
+
let ha = "", de = Ce || ll;
|
10492
10492
|
const vo = {}, qe = new X.__emitter(X);
|
10493
10493
|
sl();
|
10494
|
-
let
|
10494
|
+
let Ee = "", Pn = 0, an = 0, ba = 0, ya = !1;
|
10495
10495
|
try {
|
10496
10496
|
if (Vt.__emitTokens)
|
10497
10497
|
Vt.__emitTokens(le, qe);
|
@@ -10554,11 +10554,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10554
10554
|
}
|
10555
10555
|
function ga(z, le) {
|
10556
10556
|
le = le || X.languages || Object.keys(B);
|
10557
|
-
const _e = va(z),
|
10557
|
+
const _e = va(z), Ce = le.filter(Wt).filter(ro).map(
|
10558
10558
|
(ot) => kn(ot, z, !1)
|
10559
10559
|
);
|
10560
|
-
|
10561
|
-
const We =
|
10560
|
+
Ce.unshift(_e);
|
10561
|
+
const We = Ce.sort((ot, At) => {
|
10562
10562
|
if (ot.relevance !== At.relevance) return At.relevance - ot.relevance;
|
10563
10563
|
if (ot.language && At.language) {
|
10564
10564
|
if (Wt(ot.language).supersetOf === At.language)
|
@@ -10571,8 +10571,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10571
10571
|
return $n.secondBest = Jt, $n;
|
10572
10572
|
}
|
10573
10573
|
function Js(z, le, _e) {
|
10574
|
-
const
|
10575
|
-
z.classList.add("hljs"), z.classList.add(`language-${
|
10574
|
+
const Ce = le && H[le] || _e;
|
10575
|
+
z.classList.add("hljs"), z.classList.add(`language-${Ce}`);
|
10576
10576
|
}
|
10577
10577
|
function fa(z) {
|
10578
10578
|
let le = null;
|
@@ -10591,7 +10591,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10591
10591
|
z.innerHTML
|
10592
10592
|
);
|
10593
10593
|
le = z;
|
10594
|
-
const
|
10594
|
+
const Ce = le.textContent, We = _e ? Be(Ce, { language: _e, ignoreIllegals: !0 }) : ga(Ce);
|
10595
10595
|
z.innerHTML = We.value, z.dataset.highlighted = "yes", Js(z, _e, We.language), z.result = {
|
10596
10596
|
language: We.language,
|
10597
10597
|
// TODO: remove with version 11.0
|
@@ -10600,7 +10600,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10600
10600
|
}, We.secondBest && (z.secondBest = {
|
10601
10601
|
language: We.secondBest.language,
|
10602
10602
|
relevance: We.secondBest.relevance
|
10603
|
-
}), Dn("after:highlightElement", { el: z, result: We, text:
|
10603
|
+
}), Dn("after:highlightElement", { el: z, result: We, text: Ce });
|
10604
10604
|
}
|
10605
10605
|
function Hs(z) {
|
10606
10606
|
X = ao(X, z);
|
@@ -10626,11 +10626,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10626
10626
|
let _e = null;
|
10627
10627
|
try {
|
10628
10628
|
_e = le(S);
|
10629
|
-
} catch (
|
10629
|
+
} catch (Ce) {
|
10630
10630
|
if (ye("Language definition for '{}' could not be registered.".replace("{}", z)), $e)
|
10631
|
-
ye(
|
10631
|
+
ye(Ce);
|
10632
10632
|
else
|
10633
|
-
throw
|
10633
|
+
throw Ce;
|
10634
10634
|
_e = ee;
|
10635
10635
|
}
|
10636
10636
|
_e.name || (_e.name = z), B[z] = _e, _e.rawDefinition = le.bind(null, S), _e.aliases && io(_e.aliases, { languageName: z });
|
@@ -10675,8 +10675,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), We = z, xe = le), _e
|
|
10675
10675
|
}
|
10676
10676
|
function Dn(z, le) {
|
10677
10677
|
const _e = z;
|
10678
|
-
re.forEach(function(
|
10679
|
-
|
10678
|
+
re.forEach(function(Ce) {
|
10679
|
+
Ce[_e] && Ce[_e](le);
|
10680
10680
|
});
|
10681
10681
|
}
|
10682
10682
|
function tl(z) {
|
@@ -12796,7 +12796,7 @@ const Jm = ["innerHTML"], Hm = /* @__PURE__ */ P({
|
|
12796
12796
|
o.value ? It((u(), j("div", sv, [
|
12797
12797
|
d(n(Qn), {
|
12798
12798
|
src: o.value,
|
12799
|
-
fit: "
|
12799
|
+
fit: "cover"
|
12800
12800
|
}, null, 8, ["src"]),
|
12801
12801
|
d(n(pe), {
|
12802
12802
|
class: "v-ai-widget-image-input__remove",
|
@@ -13002,7 +13002,7 @@ const Jm = ["innerHTML"], Hm = /* @__PURE__ */ P({
|
|
13002
13002
|
}, c = async () => {
|
13003
13003
|
const g = i.value.getEditor().getValue();
|
13004
13004
|
if (!g) return;
|
13005
|
-
const v = await e.updateChatDsl(g).catch((p) => (Array.isArray(p) ?
|
13005
|
+
const v = await e.updateChatDsl(g).catch((p) => (Array.isArray(p) ? xe(p.join(",")) : xe(p?.message || "代码错误"), null));
|
13006
13006
|
v && s.value.getEditor().setValue(JSON.stringify(v, null, 2));
|
13007
13007
|
};
|
13008
13008
|
return (m, g) => (u(), y(n(St), {
|
@@ -16208,7 +16208,7 @@ class kg {
|
|
16208
16208
|
try {
|
16209
16209
|
this.app = g === "uniapp" ? this.createUniApp(g, e, c) : this.createApp(g, e, c);
|
16210
16210
|
} catch (v) {
|
16211
|
-
|
16211
|
+
xe(v.message || "未知错误", "运行时错误"), console.error(v), this.report.error(v, {
|
16212
16212
|
project: this.project?.toDsl(),
|
16213
16213
|
file: t.toDsl()
|
16214
16214
|
});
|
@@ -17031,7 +17031,7 @@ const Gt = P({
|
|
17031
17031
|
setup(r, { expose: t }) {
|
17032
17032
|
const e = r, { engine: a, loginBySign: o, isLogined: i } = Zt(), s = x(!1), l = x(parseInt(e.leftWidth)), c = x(parseInt(e.rightWidth)), m = () => {
|
17033
17033
|
a.checkVersion && Cs(($) => {
|
17034
|
-
|
17034
|
+
xe(
|
17035
17035
|
`VTJ 发布了版本 ${$},您可以通过重新安装依赖更新到最新版本`,
|
17036
17036
|
"版本更新"
|
17037
17037
|
);
|
@@ -17811,7 +17811,7 @@ export {
|
|
17811
17811
|
en as a5,
|
17812
17812
|
ce as a6,
|
17813
17813
|
sn as a7,
|
17814
|
-
|
17814
|
+
xe as a8,
|
17815
17815
|
zt as a9,
|
17816
17816
|
je as aa,
|
17817
17817
|
zc as ab,
|
package/dist/index.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { f as e, A as E, H as r, p as t, o as i, O as n, Q as S, E as _, j as o, F as I, z as p, k as T, n as l, K as O, M as V, a as R, x as g, N as d, e as A, T as M, P as D, l as P, R as L, g as N, B as u, a4 as b, J as c, D as B, S as W, i as m, a6 as Y, I as w, h as x, a3 as y, t as C, m as G, V as K, v as U, b as f, d as k, c as F, y as H, q as v, u as X, W as Z, a5 as z, a7 as J, X as h, Y as j, $ as q, U as Q, a9 as $, L as aa, Z as sa, a1 as ea, C as Ea, ac as ra, ad as ta, aa as ia, ae as na, a8 as Sa, ab as _a, r as oa, a2 as Ia, s as pa, G as Ta, a0 as la, w as Oa } from "./index-
|
1
|
+
import { f as e, A as E, H as r, p as t, o as i, O as n, Q as S, E as _, j as o, F as I, z as p, k as T, n as l, K as O, M as V, a as R, x as g, N as d, e as A, T as M, P as D, l as P, R as L, g as N, B as u, a4 as b, J as c, D as B, S as W, i as m, a6 as Y, I as w, h as x, a3 as y, t as C, m as G, V as K, v as U, b as f, d as k, c as F, y as H, q as v, u as X, W as Z, a5 as z, a7 as J, X as h, Y as j, $ as q, U as Q, a9 as $, L as aa, Z as sa, a1 as ea, C as Ea, ac as ra, ad as ta, aa as ia, ae as na, a8 as Sa, ab as _a, r as oa, a2 as Ia, s as pa, G as Ta, a0 as la, w as Oa } from "./index-Nx1FnOcL.js";
|
2
2
|
export {
|
3
3
|
e as ACCESS,
|
4
4
|
E as API_METHOD_TYPES,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/designer",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.12.
|
4
|
+
"version": "0.12.15",
|
5
5
|
"type": "module",
|
6
6
|
"keywords": [
|
7
7
|
"低代码引擎",
|
@@ -26,12 +26,12 @@
|
|
26
26
|
"marked": "~15.0.8",
|
27
27
|
"mockjs": "~1.1.0",
|
28
28
|
"monaco-editor": "~0.52.0",
|
29
|
-
"@vtj/
|
30
|
-
"@vtj/
|
31
|
-
"@vtj/
|
32
|
-
"@vtj/
|
33
|
-
"@vtj/utils": "~0.12.
|
34
|
-
"@vtj/
|
29
|
+
"@vtj/icons": "~0.12.15",
|
30
|
+
"@vtj/core": "~0.12.15",
|
31
|
+
"@vtj/renderer": "~0.12.15",
|
32
|
+
"@vtj/ui": "~0.12.15",
|
33
|
+
"@vtj/utils": "~0.12.15",
|
34
|
+
"@vtj/uni": "~0.12.15"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@types/mockjs": "~1.0.10",
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/designer
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.12.
|
5
|
+
* @version 0.12.14
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.12.
|
8
|
+
export declare const version = "0.12.14";
|
package/dist/Editor-C1v1YuKd.js
DELETED