@vtj/renderer 0.16.36 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.mjs +357 -353
- package/package.json +5 -5
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7,10 +7,10 @@ import { useRoute as Oe } from "vue-router";
|
|
|
7
7
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
8
8
|
* @name @vtj/renderer
|
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
10
|
-
* @version 0.
|
|
10
|
+
* @version 0.17.1
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const H = "0.
|
|
13
|
+
const H = "0.17.1";
|
|
14
14
|
var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
|
|
15
15
|
const Re = [
|
|
16
16
|
"$el",
|
|
@@ -163,22 +163,22 @@ function mt(n, e = !1) {
|
|
|
163
163
|
return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
|
|
164
164
|
}
|
|
165
165
|
function gt(n, e, t = !1) {
|
|
166
|
-
const s = n.filter((p) => !!p.enabled), r = [], i = [], o = [],
|
|
166
|
+
const s = n.filter((p) => !!p.enabled), r = [], i = [], o = [], c = [], f = {}, a = {}, l = [], u = {};
|
|
167
167
|
return s.forEach(
|
|
168
|
-
({ urls: p, assetsUrl: d, library:
|
|
168
|
+
({ urls: p, assetsUrl: d, library: h, assetsLibrary: m, localeLibrary: g }) => {
|
|
169
169
|
p?.forEach((v) => {
|
|
170
170
|
X(v) && r.push(mt(v, t)), Q(v) && i.push(v);
|
|
171
|
-
}),
|
|
171
|
+
}), h && (c.push(h), f[h] = q(p || [], e), g && (a[h] = g)), d && o.push(d), m && l.push(m), h && m && (u[m] = h);
|
|
172
172
|
}
|
|
173
173
|
), {
|
|
174
174
|
scripts: q(r, e),
|
|
175
175
|
css: q(i, e),
|
|
176
176
|
materials: q(o, e),
|
|
177
|
-
libraryExports:
|
|
177
|
+
libraryExports: c,
|
|
178
178
|
materialExports: Ze(l),
|
|
179
|
-
materialMapLibrary:
|
|
180
|
-
libraryMap:
|
|
181
|
-
libraryLocaleMap:
|
|
179
|
+
materialMapLibrary: u,
|
|
180
|
+
libraryMap: f,
|
|
181
|
+
libraryLocaleMap: a
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
function _t(n, e) {
|
|
@@ -193,37 +193,37 @@ function vt(n = []) {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
function yt(n, e) {
|
|
196
|
-
const t = (
|
|
196
|
+
const t = (a) => {
|
|
197
197
|
const l = [];
|
|
198
|
-
let
|
|
199
|
-
for (;
|
|
200
|
-
if (/\s/.test(
|
|
201
|
-
|
|
198
|
+
let u = 0;
|
|
199
|
+
for (; u < a.length; ) {
|
|
200
|
+
if (/\s/.test(a[u])) {
|
|
201
|
+
u++;
|
|
202
202
|
continue;
|
|
203
203
|
}
|
|
204
|
-
if (
|
|
205
|
-
const v =
|
|
204
|
+
if (a.substring(u, u + 2) === "/*") {
|
|
205
|
+
const v = a.indexOf("*/", u + 2);
|
|
206
206
|
if (v !== -1) {
|
|
207
|
-
|
|
207
|
+
u = v + 2;
|
|
208
208
|
continue;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
if (
|
|
212
|
-
const v =
|
|
213
|
-
for (;
|
|
214
|
-
|
|
215
|
-
const w =
|
|
216
|
-
if (
|
|
211
|
+
if (a[u] === "@") {
|
|
212
|
+
const v = u;
|
|
213
|
+
for (; u < a.length && a[u] !== "{" && a[u] !== ";"; )
|
|
214
|
+
u++;
|
|
215
|
+
const w = a.substring(v, u).trim(), b = w.includes("@keyframes");
|
|
216
|
+
if (a[u] === ";")
|
|
217
217
|
l.push({
|
|
218
218
|
type: "simple-at-rule",
|
|
219
|
-
content:
|
|
220
|
-
}),
|
|
221
|
-
else if (
|
|
222
|
-
const _ =
|
|
219
|
+
content: a.substring(v, u + 1)
|
|
220
|
+
}), u++;
|
|
221
|
+
else if (a[u] === "{") {
|
|
222
|
+
const _ = u + 1;
|
|
223
223
|
let C = 1;
|
|
224
|
-
for (
|
|
225
|
-
|
|
226
|
-
const Y =
|
|
224
|
+
for (u++; u < a.length && C > 0; )
|
|
225
|
+
a[u] === "{" ? C++ : a[u] === "}" && C--, u++;
|
|
226
|
+
const Y = a.substring(v, u), Z = a.substring(_, u - 1);
|
|
227
227
|
l.push({
|
|
228
228
|
type: b ? "keyframes" : "at-rule",
|
|
229
229
|
rule: w,
|
|
@@ -233,20 +233,20 @@ function yt(n, e) {
|
|
|
233
233
|
}
|
|
234
234
|
continue;
|
|
235
235
|
}
|
|
236
|
-
const p =
|
|
237
|
-
for (;
|
|
238
|
-
|
|
239
|
-
if (
|
|
240
|
-
const d =
|
|
236
|
+
const p = u;
|
|
237
|
+
for (; u < a.length && a[u] !== "{"; )
|
|
238
|
+
u++;
|
|
239
|
+
if (u >= a.length) break;
|
|
240
|
+
const d = a.substring(p, u).trim();
|
|
241
241
|
if (!d) {
|
|
242
|
-
|
|
242
|
+
u++;
|
|
243
243
|
continue;
|
|
244
244
|
}
|
|
245
|
-
const
|
|
246
|
-
let
|
|
247
|
-
for (
|
|
248
|
-
|
|
249
|
-
const g =
|
|
245
|
+
const h = u + 1;
|
|
246
|
+
let m = 1;
|
|
247
|
+
for (u++; u < a.length && m > 0; )
|
|
248
|
+
a[u] === "{" ? m++ : a[u] === "}" && m--, u++;
|
|
249
|
+
const g = a.substring(h, u - 1);
|
|
250
250
|
l.push({
|
|
251
251
|
type: "rule",
|
|
252
252
|
selector: d,
|
|
@@ -254,23 +254,23 @@ function yt(n, e) {
|
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
return l;
|
|
257
|
-
}, s = (
|
|
258
|
-
const l =
|
|
257
|
+
}, s = (a) => {
|
|
258
|
+
const l = a.trim();
|
|
259
259
|
return /^(from|to|\d+(\.\d+)?%)$/.test(l);
|
|
260
|
-
}, r = (
|
|
261
|
-
const d =
|
|
262
|
-
return d ? `${d}[${e}] ${
|
|
263
|
-
}), i = (
|
|
264
|
-
const l =
|
|
260
|
+
}, r = (a) => a.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (l, u, p) => {
|
|
261
|
+
const d = u.trim(), h = p.trim();
|
|
262
|
+
return d ? `${d}[${e}] ${h}` : h;
|
|
263
|
+
}), i = (a) => {
|
|
264
|
+
const l = a.trim();
|
|
265
265
|
if (!l || l.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l) || s(l))
|
|
266
266
|
return l;
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
const [, p, d = ""] =
|
|
270
|
-
return
|
|
267
|
+
const u = l.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
|
|
268
|
+
if (u) {
|
|
269
|
+
const [, p, d = ""] = u, h = p.trim();
|
|
270
|
+
return h ? `${h}[${e}]${d}` : l;
|
|
271
271
|
}
|
|
272
272
|
return `${l}[${e}]`;
|
|
273
|
-
}, o = (
|
|
273
|
+
}, o = (a) => r(a).split(",").map((u) => i(u)).filter((u) => u.trim()).join(", "), c = (a) => a.map((l) => {
|
|
274
274
|
switch (l.type) {
|
|
275
275
|
case "simple-at-rule":
|
|
276
276
|
return l.content;
|
|
@@ -278,7 +278,7 @@ function yt(n, e) {
|
|
|
278
278
|
return l.content;
|
|
279
279
|
case "at-rule":
|
|
280
280
|
try {
|
|
281
|
-
const p = t(l.inner), d =
|
|
281
|
+
const p = t(l.inner), d = c(p);
|
|
282
282
|
return `${l.rule} { ${d} }`;
|
|
283
283
|
} catch {
|
|
284
284
|
return l.content;
|
|
@@ -286,23 +286,23 @@ function yt(n, e) {
|
|
|
286
286
|
case "rule":
|
|
287
287
|
if (!l.selector || !l.content)
|
|
288
288
|
return "";
|
|
289
|
-
const
|
|
290
|
-
return
|
|
289
|
+
const u = o(l.selector);
|
|
290
|
+
return u.trim() ? `${u} { ${l.content} }` : "";
|
|
291
291
|
default:
|
|
292
292
|
return "";
|
|
293
293
|
}
|
|
294
|
-
}).filter((l) => l.trim()).join(" "),
|
|
294
|
+
}).filter((l) => l.trim()).join(" "), f = (a) => a.replace(/\s*{\s*/g, " { ").replace(/\s*}\s*/g, " } ").replace(/\s*;\s*/g, "; ").replace(/\s*,\s*/g, ", ").replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s*}\s*}/g, " } }").trim();
|
|
295
295
|
try {
|
|
296
|
-
const
|
|
297
|
-
`), l = t(
|
|
298
|
-
return u
|
|
299
|
-
} catch (
|
|
300
|
-
return console.error("CSS scoping failed:",
|
|
296
|
+
const a = n.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
|
|
297
|
+
`), l = t(a), u = c(l);
|
|
298
|
+
return f(u);
|
|
299
|
+
} catch (a) {
|
|
300
|
+
return console.error("CSS scoping failed:", a), console.error("Input CSS:", n), n.replace(/\/\*[\s\S]*?\*\//g, "").replace(
|
|
301
301
|
/(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
|
|
302
302
|
(l) => l
|
|
303
303
|
).replace(/([^{}@]+)(?=\s*{)/g, (l) => {
|
|
304
|
-
const
|
|
305
|
-
return !
|
|
304
|
+
const u = l.trim();
|
|
305
|
+
return !u || u.startsWith("@") || u.includes(`[${e}]`) || s(u) ? l : `${u}[${e}]`;
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
}
|
|
@@ -316,16 +316,16 @@ function St(n, e, t) {
|
|
|
316
316
|
function $t(n, e) {
|
|
317
317
|
let t = !1, s = !1, r = !1, i = "";
|
|
318
318
|
for (let o = 0; o < e.length; o++) {
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
323
|
-
const
|
|
324
|
-
i += p, o +=
|
|
319
|
+
const c = e[o];
|
|
320
|
+
if (c === "'" && !s && !r ? t = !t : c === '"' && !t && !r ? s = !s : e.substr(o, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : c === ")" && r && (r = !1), !t && !s && !r) {
|
|
321
|
+
const f = e.substr(o).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
|
|
322
|
+
if (f) {
|
|
323
|
+
const a = f[1], l = parseFloat(a), p = `${St(n, l).toFixed(6).replace(/\.?0+$/, "")}px`;
|
|
324
|
+
i += p, o += f[0].length - 1;
|
|
325
325
|
continue;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
i +=
|
|
328
|
+
i += c;
|
|
329
329
|
}
|
|
330
330
|
return i;
|
|
331
331
|
}
|
|
@@ -333,18 +333,18 @@ function Te(n) {
|
|
|
333
333
|
return I(n) ? n : JSON.stringify(n);
|
|
334
334
|
}
|
|
335
335
|
function ge(n, e, t, s = !1) {
|
|
336
|
-
const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, o = n.__uniConfig ? $t(n, t) : t,
|
|
337
|
-
if (r.prototype.replaceSync && !
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
const l = n.document,
|
|
336
|
+
const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, o = n.__uniConfig ? $t(n, t) : t, c = s ? yt(o, i) : o, f = !!n.__uniConfig;
|
|
337
|
+
if (r.prototype.replaceSync && !f) {
|
|
338
|
+
const a = new r();
|
|
339
|
+
a.id = e, a.replaceSync(c);
|
|
340
|
+
const l = n.document, u = l.adoptedStyleSheets, p = Array.from(u).filter(
|
|
341
341
|
(d) => d.id !== e
|
|
342
342
|
);
|
|
343
|
-
l.adoptedStyleSheets = [...p,
|
|
343
|
+
l.adoptedStyleSheets = [...p, a];
|
|
344
344
|
} else {
|
|
345
|
-
const
|
|
346
|
-
let l =
|
|
347
|
-
l ? l.innerHTML =
|
|
345
|
+
const a = n.document;
|
|
346
|
+
let l = a.getElementById(e);
|
|
347
|
+
l ? l.innerHTML = c : (l = a.createElement("style"), l.id = e, l.innerHTML = c, a.head.appendChild(l));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
function ks(n) {
|
|
@@ -378,14 +378,14 @@ function xe(n, e = window) {
|
|
|
378
378
|
async function De(n, e, t = window) {
|
|
379
379
|
const s = t.document, r = t.document.head;
|
|
380
380
|
let i = t[e];
|
|
381
|
-
return i ? i.default || i : new Promise((o,
|
|
382
|
-
for (const
|
|
383
|
-
const
|
|
384
|
-
|
|
385
|
-
i = t[e], i ? o(i.default || i) :
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
}, r.appendChild(
|
|
381
|
+
return i ? i.default || i : new Promise((o, c) => {
|
|
382
|
+
for (const f of n) {
|
|
383
|
+
const a = s.createElement("script");
|
|
384
|
+
a.src = f, a.onload = () => {
|
|
385
|
+
i = t[e], i ? o(i.default || i) : c(null);
|
|
386
|
+
}, a.onerror = (l) => {
|
|
387
|
+
c(l);
|
|
388
|
+
}, r.appendChild(a);
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
}
|
|
@@ -429,24 +429,24 @@ function It(n) {
|
|
|
429
429
|
} catch {
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function L(n, e, t = !1, s = !1, r = !1) {
|
|
433
433
|
try {
|
|
434
434
|
const i = ['"use strict";', "var __self = arguments[0];"];
|
|
435
435
|
i.push("return ");
|
|
436
436
|
let o = (n.value || "").trim();
|
|
437
|
-
r || (o = o.replace(/this(\W|$)/g, (
|
|
437
|
+
r || (o = o.replace(/this(\W|$)/g, (f, a) => `__self${a}`)), o = i.join(`
|
|
438
438
|
`) + o;
|
|
439
|
-
const
|
|
439
|
+
const c = r ? `
|
|
440
440
|
${o}
|
|
441
441
|
` : `with(${t ? "{}" : "$scope || {}"}) { ${o} }`;
|
|
442
|
-
return new Function("$scope",
|
|
442
|
+
return new Function("$scope", c)(e);
|
|
443
443
|
} catch (i) {
|
|
444
444
|
if (M.error("parseExpression.error", i, n, e?.__self ?? e), It(i), s)
|
|
445
445
|
throw i;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
function R(n, e, t = !1, s = !1, r = !1) {
|
|
449
|
-
const i =
|
|
449
|
+
const i = L(n, e, t, s, r);
|
|
450
450
|
if (typeof i != "function" && (M.error(
|
|
451
451
|
"parseFunction.error",
|
|
452
452
|
"not a function",
|
|
@@ -465,7 +465,7 @@ function $(n) {
|
|
|
465
465
|
function Ft(n) {
|
|
466
466
|
return E(n) || $(n);
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ls(n) {
|
|
469
469
|
return Ft(n) ? n.value : JSON.stringify(n);
|
|
470
470
|
}
|
|
471
471
|
const Ot = {
|
|
@@ -641,7 +641,7 @@ class _e {
|
|
|
641
641
|
function Mt() {
|
|
642
642
|
return Ie(He, null);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Bs(n = {}) {
|
|
645
645
|
const {
|
|
646
646
|
notify: e,
|
|
647
647
|
loading: t,
|
|
@@ -649,9 +649,9 @@ function Ls(n = {}) {
|
|
|
649
649
|
Startup: r,
|
|
650
650
|
access: i,
|
|
651
651
|
useTitle: o,
|
|
652
|
-
alert:
|
|
652
|
+
alert: c
|
|
653
653
|
} = n;
|
|
654
|
-
let
|
|
654
|
+
let f = null;
|
|
655
655
|
return {
|
|
656
656
|
request: Pe({
|
|
657
657
|
settings: {
|
|
@@ -665,10 +665,10 @@ function Ls(n = {}) {
|
|
|
665
665
|
e && e(l || "未知错误");
|
|
666
666
|
},
|
|
667
667
|
showLoading: () => {
|
|
668
|
-
|
|
668
|
+
f && f.close(), t && (f = t());
|
|
669
669
|
},
|
|
670
670
|
hideLoading: () => {
|
|
671
|
-
|
|
671
|
+
f && (f.close(), f = null);
|
|
672
672
|
},
|
|
673
673
|
...s
|
|
674
674
|
}
|
|
@@ -677,9 +677,9 @@ function Ls(n = {}) {
|
|
|
677
677
|
notify: e,
|
|
678
678
|
loading: t,
|
|
679
679
|
useTitle: o,
|
|
680
|
-
alert:
|
|
680
|
+
alert: c,
|
|
681
681
|
startupComponent: r,
|
|
682
|
-
access: i ? new _e({ alert:
|
|
682
|
+
access: i ? new _e({ alert: c, ...i }) : void 0
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
function qs(n = {}) {
|
|
@@ -693,7 +693,7 @@ function Tt(n, e) {
|
|
|
693
693
|
query: r
|
|
694
694
|
});
|
|
695
695
|
{
|
|
696
|
-
const r = n.headers ?
|
|
696
|
+
const r = n.headers ? L(n.headers, {}, !0) : void 0, i = {
|
|
697
697
|
url: n.url,
|
|
698
698
|
method: n.method,
|
|
699
699
|
settings: {
|
|
@@ -701,7 +701,7 @@ function Tt(n, e) {
|
|
|
701
701
|
headers: r
|
|
702
702
|
}
|
|
703
703
|
};
|
|
704
|
-
return (o,
|
|
704
|
+
return (o, c) => (delete i.data, s.send(et(i, c || {}, { data: o })));
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
function xt(n, e) {
|
|
@@ -745,28 +745,32 @@ function kt(n, e = window) {
|
|
|
745
745
|
}
|
|
746
746
|
function Nt(n, e) {
|
|
747
747
|
if (!e.mock) return;
|
|
748
|
-
const { url: t, mockTemplate: s } = e;
|
|
748
|
+
const { url: t, mockTemplate: s, method: r = "get" } = e;
|
|
749
749
|
if (t && s)
|
|
750
750
|
try {
|
|
751
|
-
const
|
|
752
|
-
n.mock(
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
751
|
+
const i = ae(t) ? new URL(t).pathname : t, o = tt(`(.*)${i}(.*)`), c = st(i, { decode: decodeURIComponent }), f = L(s, {}, !0);
|
|
752
|
+
n.mock(
|
|
753
|
+
o,
|
|
754
|
+
r.toLowerCase(),
|
|
755
|
+
(a) => {
|
|
756
|
+
const l = O.parse(a.url) || {}, u = a.body instanceof FormData ? nt(a.body) : a.body, p = ae(a.url) ? new URL(a.url).pathname : a.url.split("?")[0], d = c(p)?.params;
|
|
757
|
+
Object.assign(a, { data: u, params: d, query: l });
|
|
758
|
+
try {
|
|
759
|
+
return n.mock(f(a));
|
|
760
|
+
} catch (h) {
|
|
761
|
+
return console.warn("[mockApi]", o, a, h), null;
|
|
762
|
+
}
|
|
759
763
|
}
|
|
760
|
-
|
|
761
|
-
} catch (
|
|
762
|
-
console.warn("mockApi",
|
|
764
|
+
);
|
|
765
|
+
} catch (i) {
|
|
766
|
+
console.warn("mockApi", i);
|
|
763
767
|
}
|
|
764
768
|
}
|
|
765
769
|
function ke(n = window) {
|
|
766
770
|
const e = N(n);
|
|
767
771
|
e && (e._mocked = {});
|
|
768
772
|
}
|
|
769
|
-
class
|
|
773
|
+
class Lt {
|
|
770
774
|
__id = null;
|
|
771
775
|
__mode;
|
|
772
776
|
__instance = null;
|
|
@@ -837,9 +841,9 @@ class Bt {
|
|
|
837
841
|
if (e)
|
|
838
842
|
if (this.__mode === y.Runtime) {
|
|
839
843
|
const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
|
|
840
|
-
return
|
|
844
|
+
return L({ type: s, value: r }, this);
|
|
841
845
|
} else
|
|
842
|
-
return
|
|
846
|
+
return L(e, this);
|
|
843
847
|
}
|
|
844
848
|
__ref(e = null, t) {
|
|
845
849
|
if (this.__mode === y.VNode)
|
|
@@ -880,69 +884,69 @@ function fe(n) {
|
|
|
880
884
|
libs: r = {},
|
|
881
885
|
apis: i = {},
|
|
882
886
|
loader: o
|
|
883
|
-
} = n,
|
|
887
|
+
} = n, c = e.computed(() => n.dsl), f = {
|
|
884
888
|
$components: s,
|
|
885
889
|
$libs: r,
|
|
886
890
|
$apis: i
|
|
887
|
-
},
|
|
891
|
+
}, a = new Lt({
|
|
888
892
|
mode: t,
|
|
889
|
-
dsl:
|
|
890
|
-
attrs:
|
|
893
|
+
dsl: c.value,
|
|
894
|
+
attrs: f
|
|
891
895
|
}), l = e.defineComponent({
|
|
892
|
-
name:
|
|
893
|
-
__scopeId:
|
|
896
|
+
name: c.value.name,
|
|
897
|
+
__scopeId: c.value.id ? `data-v-${c.value.id}` : void 0,
|
|
894
898
|
props: {
|
|
895
|
-
...qt(
|
|
899
|
+
...qt(c.value.props ?? [], a)
|
|
896
900
|
},
|
|
897
|
-
async setup(
|
|
898
|
-
|
|
901
|
+
async setup(u = {}) {
|
|
902
|
+
a.$props = u, a.props = u, c.value.id && ge(
|
|
899
903
|
n.window || window,
|
|
900
|
-
|
|
901
|
-
|
|
904
|
+
c.value.id,
|
|
905
|
+
c.value.css || "",
|
|
902
906
|
!0
|
|
903
|
-
),
|
|
904
|
-
const p = Jt(e,
|
|
905
|
-
for (const [v, w] of Object.entries(
|
|
906
|
-
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
907
|
+
), a.state = Ut(e, c.value.state ?? {}, a);
|
|
908
|
+
const p = Jt(e, c.value.computed ?? {}, a), d = Kt(c.value.methods ?? {}, a), h = zt(e, c.value.inject, a);
|
|
909
|
+
for (const [v, w] of Object.entries(h || {}))
|
|
910
|
+
h[v] = e.inject(v, w);
|
|
911
|
+
const m = Gt(
|
|
912
|
+
c.value.dataSources || {},
|
|
913
|
+
a
|
|
910
914
|
), g = {
|
|
911
|
-
...
|
|
915
|
+
...h,
|
|
912
916
|
...p,
|
|
913
917
|
...d,
|
|
914
|
-
...
|
|
918
|
+
...m
|
|
915
919
|
};
|
|
916
|
-
return
|
|
917
|
-
vtj:
|
|
918
|
-
state:
|
|
919
|
-
...
|
|
920
|
+
return a.setup(g, e), Vt(e, c.value.watch ?? [], a), {
|
|
921
|
+
vtj: a,
|
|
922
|
+
state: a.state,
|
|
923
|
+
...u,
|
|
920
924
|
...p,
|
|
921
925
|
...d
|
|
922
926
|
};
|
|
923
927
|
},
|
|
924
|
-
emits:
|
|
925
|
-
expose: ["vtj", ...
|
|
928
|
+
emits: Bt(c.value.emits),
|
|
929
|
+
expose: ["vtj", ...c.value.expose || []],
|
|
926
930
|
render() {
|
|
927
|
-
if (!
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
930
|
-
return T(
|
|
931
|
+
if (!c.value.nodes) return null;
|
|
932
|
+
const u = c.value.nodes || [];
|
|
933
|
+
if (u.length === 1)
|
|
934
|
+
return T(u[0], a, e, o, u);
|
|
931
935
|
{
|
|
932
|
-
const p =
|
|
933
|
-
(d) => T(d,
|
|
936
|
+
const p = u.map(
|
|
937
|
+
(d) => T(d, a, e, o, u)
|
|
934
938
|
);
|
|
935
939
|
return e.createVNode("div", {}, p);
|
|
936
940
|
}
|
|
937
941
|
},
|
|
938
|
-
...Wt(
|
|
942
|
+
...Wt(c.value.lifeCycles ?? {}, a)
|
|
939
943
|
});
|
|
940
944
|
return {
|
|
941
945
|
renderer: e.markRaw(l),
|
|
942
|
-
context:
|
|
946
|
+
context: a
|
|
943
947
|
};
|
|
944
948
|
}
|
|
945
|
-
function
|
|
949
|
+
function Bt(n = []) {
|
|
946
950
|
return n.map((e) => I(e) ? e : e.name);
|
|
947
951
|
}
|
|
948
952
|
function qt(n = [], e) {
|
|
@@ -991,8 +995,8 @@ function zt(n, e = [], t) {
|
|
|
991
995
|
(s, r) => {
|
|
992
996
|
const { name: i, from: o } = r || {};
|
|
993
997
|
r.default;
|
|
994
|
-
const
|
|
995
|
-
return s[i] = n.inject(
|
|
998
|
+
const c = E(o) ? t.__parseExpression(o) || i : o ?? i, f = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
|
|
999
|
+
return s[i] = n.inject(c, f), s;
|
|
996
1000
|
},
|
|
997
1001
|
{}
|
|
998
1002
|
);
|
|
@@ -1005,9 +1009,9 @@ function Gt(n, e) {
|
|
|
1005
1009
|
t[s] = kt(r);
|
|
1006
1010
|
else if (r.ref) {
|
|
1007
1011
|
const i = e.$apis[r.ref], o = $(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
|
|
1008
|
-
t[s] = async (...
|
|
1009
|
-
const
|
|
1010
|
-
return o ? o(
|
|
1012
|
+
t[s] = async (...c) => {
|
|
1013
|
+
const f = await i.apply(e, c);
|
|
1014
|
+
return o ? o(f) : f;
|
|
1011
1015
|
};
|
|
1012
1016
|
}
|
|
1013
1017
|
return t;
|
|
@@ -1083,54 +1087,54 @@ class Qt {
|
|
|
1083
1087
|
const x = new Qt(), Ne = new it();
|
|
1084
1088
|
let re = [], F = {}, D = {};
|
|
1085
1089
|
const Xt = (n, e) => e;
|
|
1086
|
-
async function
|
|
1087
|
-
const { urls: t = [], library: s } = n, r = t.filter((
|
|
1090
|
+
async function Le(n, e = window) {
|
|
1091
|
+
const { urls: t = [], library: s } = n, r = t.filter((c) => X(c));
|
|
1088
1092
|
if (r.length === 0 || !s) return null;
|
|
1089
|
-
const i = t.filter((
|
|
1093
|
+
const i = t.filter((c) => Q(c));
|
|
1090
1094
|
return i.length && xe(i, e), await De(r, s, e).catch(
|
|
1091
|
-
(
|
|
1095
|
+
(c) => (console.warn("loadScriptUrl error", r, s, c), null)
|
|
1092
1096
|
);
|
|
1093
1097
|
}
|
|
1094
1098
|
function pe(n) {
|
|
1095
1099
|
const { getDsl: e, getDslByUrl: t, options: s } = n;
|
|
1096
1100
|
return s.window && (re.forEach((r) => {
|
|
1097
1101
|
delete s.window[r];
|
|
1098
|
-
}), re = []), (r, i, o,
|
|
1102
|
+
}), re = []), (r, i, o, c = W) => {
|
|
1099
1103
|
if (!o || typeof o == "string") return i;
|
|
1100
|
-
let
|
|
1104
|
+
let f = "";
|
|
1101
1105
|
if (o.type === "Schema" && o.id)
|
|
1102
|
-
return
|
|
1103
|
-
const
|
|
1106
|
+
return f = o.id + "_" + r, D[f] || (D[f] = c.defineAsyncComponent(async () => {
|
|
1107
|
+
const a = F[o.id] || await Ne.add(
|
|
1104
1108
|
o.id,
|
|
1105
1109
|
() => e(o.id)
|
|
1106
1110
|
);
|
|
1107
|
-
return
|
|
1108
|
-
Vue:
|
|
1111
|
+
return a && (a.name = i, F[o.id] = a), a ? fe({
|
|
1112
|
+
Vue: c,
|
|
1109
1113
|
mode: y.Runtime,
|
|
1110
1114
|
...s,
|
|
1111
|
-
dsl: Ee(
|
|
1115
|
+
dsl: Ee(a),
|
|
1112
1116
|
loader: pe(n)
|
|
1113
1117
|
}).renderer : null;
|
|
1114
1118
|
}));
|
|
1115
1119
|
if (o.type === "UrlSchema" && o.url)
|
|
1116
|
-
return
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1120
|
+
return f = o.url + "_" + r, D[f] || (D[f] = c.defineAsyncComponent(async () => {
|
|
1121
|
+
const a = F[o.url] || await t(o.url);
|
|
1122
|
+
return a && (a.name = i, F[o.url] = a), a ? fe({
|
|
1119
1123
|
...s,
|
|
1120
|
-
Vue:
|
|
1121
|
-
dsl: Ee(
|
|
1124
|
+
Vue: c,
|
|
1125
|
+
dsl: Ee(a),
|
|
1122
1126
|
mode: y.Runtime,
|
|
1123
1127
|
loader: pe(n)
|
|
1124
1128
|
}).renderer : null;
|
|
1125
1129
|
}));
|
|
1126
1130
|
if (o.type === "Plugin") {
|
|
1127
|
-
let
|
|
1128
|
-
return
|
|
1131
|
+
let a = o.library ? F[o.library] : null;
|
|
1132
|
+
return a || (o.library && re.push(o.library), a = F[o.library || Symbol()] = c.defineAsyncComponent(
|
|
1129
1133
|
async () => {
|
|
1130
|
-
const l = await
|
|
1134
|
+
const l = await Le(o, s.window);
|
|
1131
1135
|
return l || (console.warn("getPlugin result is null", o), null);
|
|
1132
1136
|
}
|
|
1133
|
-
),
|
|
1137
|
+
), a);
|
|
1134
1138
|
}
|
|
1135
1139
|
return i;
|
|
1136
1140
|
};
|
|
@@ -1140,8 +1144,8 @@ function Us() {
|
|
|
1140
1144
|
}
|
|
1141
1145
|
function T(n, e, t = W, s = Xt, r = [], i = !1, o = 0) {
|
|
1142
1146
|
if (!n || !n.name || n.invisible) return null;
|
|
1143
|
-
const
|
|
1144
|
-
if (!i && (
|
|
1147
|
+
const c = t.getCurrentInstance()?.appContext, { id: f = null, directives: a = [] } = n, { vIf: l, vElseIf: u, vElse: p, vFor: d, vShow: h, vModels: m, vBind: g, vHtml: v, others: w } = Be(a);
|
|
1148
|
+
if (!i && (u || p))
|
|
1145
1149
|
return null;
|
|
1146
1150
|
if (l && !Zt(l, e))
|
|
1147
1151
|
return is(n, e, t, s, r);
|
|
@@ -1151,8 +1155,8 @@ function T(n, e, t = W, s = Xt, r = [], i = !1, o = 0) {
|
|
|
1151
1155
|
return es(_, n.props?.is);
|
|
1152
1156
|
if (n.name === "slot") return n.name;
|
|
1153
1157
|
const j = s(`${n.id}_${C}`, n.name, n.from, t);
|
|
1154
|
-
return I(j) ? jt(j) || Rt(j) ? j : Y[j] ??
|
|
1155
|
-
})(), A = ts(
|
|
1158
|
+
return I(j) ? jt(j) || Rt(j) ? j : Y[j] ?? c?.app?.component(j) ?? j : j;
|
|
1159
|
+
})(), A = ts(f, n.props ?? {}, _), Ge = rs(
|
|
1156
1160
|
t,
|
|
1157
1161
|
n.id,
|
|
1158
1162
|
n.events ?? {},
|
|
@@ -1160,10 +1164,10 @@ function T(n, e, t = W, s = Xt, r = [], i = !1, o = 0) {
|
|
|
1160
1164
|
);
|
|
1161
1165
|
if (n.name === "slot")
|
|
1162
1166
|
return os(t, n, A, _, s);
|
|
1163
|
-
g && Object.assign(A, _.__parseExpression(g.value)),
|
|
1167
|
+
g && Object.assign(A, _.__parseExpression(g.value)), h && (A.style = Object.assign(
|
|
1164
1168
|
A.style ?? {},
|
|
1165
|
-
cs(
|
|
1166
|
-
)), v && Object.assign(A, ls(v, _)),
|
|
1169
|
+
cs(h, _)
|
|
1170
|
+
)), v && Object.assign(A, ls(v, _)), m.forEach((j) => {
|
|
1167
1171
|
Me.includes(n.name) ? Object.assign(A, us(j, _)) : Object.assign(A, fs(t, j, _));
|
|
1168
1172
|
});
|
|
1169
1173
|
const Ve = ps(
|
|
@@ -1172,20 +1176,20 @@ function T(n, e, t = W, s = Xt, r = [], i = !1, o = 0) {
|
|
|
1172
1176
|
_,
|
|
1173
1177
|
s,
|
|
1174
1178
|
n
|
|
1175
|
-
), ye = _?.__id ? `data-v-${_.__id}` : void 0, We = ye ? { [ye]: "" } : {}, Qe = _.__mode === y.Design ? { "data-vtj":
|
|
1176
|
-
key:
|
|
1179
|
+
), ye = _?.__id ? `data-v-${_.__id}` : void 0, We = ye ? { [ye]: "" } : {}, Qe = _.__mode === y.Design ? { "data-vtj": f } : {}, B = `${f}_${C}`, ee = {
|
|
1180
|
+
key: B,
|
|
1177
1181
|
...We,
|
|
1178
1182
|
...Qe,
|
|
1179
1183
|
...A,
|
|
1180
1184
|
...Ge
|
|
1181
1185
|
};
|
|
1182
|
-
x.isEqual(ee, x.getNode(
|
|
1186
|
+
x.isEqual(ee, x.getNode(B)) || x.setNode(B, ee);
|
|
1183
1187
|
let te = t.createVNode(
|
|
1184
1188
|
Z,
|
|
1185
|
-
x.getNode(
|
|
1189
|
+
x.getNode(B) || ee || {},
|
|
1186
1190
|
Ve
|
|
1187
1191
|
);
|
|
1188
|
-
const we =
|
|
1192
|
+
const we = c ? Yt(c, w, _) : [];
|
|
1189
1193
|
return we.length && (te = t.withDirectives(te, we)), te;
|
|
1190
1194
|
};
|
|
1191
1195
|
return d ? ms(d, b, e) : b(e, o);
|
|
@@ -1199,12 +1203,12 @@ function Yt(n, e, t) {
|
|
|
1199
1203
|
return r.value && o.push(t.__parseExpression(r.value)), r.arg && o.push(r.arg), r.modifiers && o.push(r.modifiers), o;
|
|
1200
1204
|
}).filter((r) => !!r);
|
|
1201
1205
|
}
|
|
1202
|
-
function
|
|
1206
|
+
function Be(n = []) {
|
|
1203
1207
|
const e = n.find((l) => P(l.name) === "vIf"), t = n.find(
|
|
1204
1208
|
(l) => P(l.name) === "vElseIf"
|
|
1205
|
-
), s = n.find((l) => P(l.name) === "vElse"), r = n.find((l) => P(l.name) === "vFor"), i = n.find((l) => P(l.name) === "vShow"), o = n.find((l) => P(l.name) === "vBind"),
|
|
1209
|
+
), s = n.find((l) => P(l.name) === "vElse"), r = n.find((l) => P(l.name) === "vFor"), i = n.find((l) => P(l.name) === "vShow"), o = n.find((l) => P(l.name) === "vBind"), c = n.find((l) => P(l.name) === "vHtml"), f = n.filter(
|
|
1206
1210
|
(l) => P(l.name) === "vModel"
|
|
1207
|
-
),
|
|
1211
|
+
), a = n.filter(
|
|
1208
1212
|
(l) => !ft.includes(P(l.name))
|
|
1209
1213
|
);
|
|
1210
1214
|
return {
|
|
@@ -1213,10 +1217,10 @@ function Le(n = []) {
|
|
|
1213
1217
|
vElse: s,
|
|
1214
1218
|
vFor: r,
|
|
1215
1219
|
vShow: i,
|
|
1216
|
-
vModels:
|
|
1220
|
+
vModels: f,
|
|
1217
1221
|
vBind: o,
|
|
1218
|
-
others:
|
|
1219
|
-
vHtml:
|
|
1222
|
+
others: a,
|
|
1223
|
+
vHtml: c
|
|
1220
1224
|
};
|
|
1221
1225
|
}
|
|
1222
1226
|
function Zt(n, e) {
|
|
@@ -1263,12 +1267,12 @@ function rs(n, e, t, s) {
|
|
|
1263
1267
|
passive: "OnceCapture"
|
|
1264
1268
|
};
|
|
1265
1269
|
return Object.keys(t || {}).reduce(
|
|
1266
|
-
(
|
|
1267
|
-
const
|
|
1268
|
-
return d && (
|
|
1270
|
+
(c, f) => {
|
|
1271
|
+
const a = t[f], l = qe(a.modifiers), u = l.find((h) => r.includes(h)), p = "on" + ot(f) + (u && i[u] || ""), d = a.handler ? s.__parseFunction(ns(a.handler)) : null;
|
|
1272
|
+
return d && (c[p] = n.withModifiers(
|
|
1269
1273
|
l.includes("enter") ? ss(d, "enter") : d,
|
|
1270
1274
|
l
|
|
1271
|
-
)),
|
|
1275
|
+
)), c;
|
|
1272
1276
|
},
|
|
1273
1277
|
{}
|
|
1274
1278
|
);
|
|
@@ -1276,13 +1280,13 @@ function rs(n, e, t, s) {
|
|
|
1276
1280
|
function is(n, e, t, s, r = []) {
|
|
1277
1281
|
let i = r.findIndex((o) => o.id === n.id);
|
|
1278
1282
|
for (let o = ++i; o < r.length; o++) {
|
|
1279
|
-
const { directives:
|
|
1280
|
-
if (
|
|
1281
|
-
if (e.__parseExpression(
|
|
1283
|
+
const { directives: c = [] } = r[o], { vElseIf: f, vElse: a } = Be(c);
|
|
1284
|
+
if (f) {
|
|
1285
|
+
if (e.__parseExpression(f.value))
|
|
1282
1286
|
return T(r[o], e, t, s, r, !0);
|
|
1283
1287
|
continue;
|
|
1284
1288
|
}
|
|
1285
|
-
if (
|
|
1289
|
+
if (a)
|
|
1286
1290
|
return T(r[o], e, t, s, r, !0);
|
|
1287
1291
|
}
|
|
1288
1292
|
return null;
|
|
@@ -1292,11 +1296,11 @@ function qe(n = {}, e = !1) {
|
|
|
1292
1296
|
return e ? t.map((s) => "." + s) : t;
|
|
1293
1297
|
}
|
|
1294
1298
|
function os(n, e, t, s, r) {
|
|
1295
|
-
const { children: i } = e, o = as(e, s),
|
|
1296
|
-
return
|
|
1299
|
+
const { children: i } = e, o = as(e, s), c = s.$slots?.[o.name];
|
|
1300
|
+
return c ? c(t) : i ? I(i) ? n.createTextVNode(i) : E(i) ? n.createTextVNode(
|
|
1297
1301
|
Te(s.__parseExpression(i))
|
|
1298
1302
|
) : Array.isArray(i) ? i.map(
|
|
1299
|
-
(
|
|
1303
|
+
(f, a) => T(f, s, n, r, i, !1, a)
|
|
1300
1304
|
) : null : null;
|
|
1301
1305
|
}
|
|
1302
1306
|
function as(n, e) {
|
|
@@ -1351,26 +1355,26 @@ function ps(n, e, t, s, r) {
|
|
|
1351
1355
|
default: () => Te(t.__parseExpression(e))
|
|
1352
1356
|
};
|
|
1353
1357
|
if (Array.isArray(e) && e.length > 0) {
|
|
1354
|
-
const i = ds(e), o = (
|
|
1355
|
-
[
|
|
1358
|
+
const i = ds(e), o = (c, f) => !c || !r ? {} : r?.id && Object.keys(c).length ? f ? {
|
|
1359
|
+
[f]: c
|
|
1356
1360
|
} : {
|
|
1357
|
-
[`scope_${r.id}`]:
|
|
1358
|
-
} :
|
|
1361
|
+
[`scope_${r.id}`]: c
|
|
1362
|
+
} : f ? { [f]: /* @__PURE__ */ Object.create(null) } : {};
|
|
1359
1363
|
return Object.entries(i).reduce(
|
|
1360
|
-
(
|
|
1361
|
-
const d = l.length ? at(p ?? {}, l) : o(p,
|
|
1362
|
-
return
|
|
1363
|
-
(
|
|
1364
|
-
|
|
1364
|
+
(c, [f, { nodes: a, params: l, scope: u }]) => (c[f] = (p) => {
|
|
1365
|
+
const d = l.length ? at(p ?? {}, l) : o(p, u);
|
|
1366
|
+
return a.map(
|
|
1367
|
+
(h, m) => T(
|
|
1368
|
+
h,
|
|
1365
1369
|
t.__clone(d),
|
|
1366
1370
|
n,
|
|
1367
1371
|
s,
|
|
1368
|
-
|
|
1372
|
+
a,
|
|
1369
1373
|
!1,
|
|
1370
|
-
|
|
1374
|
+
m
|
|
1371
1375
|
)
|
|
1372
1376
|
);
|
|
1373
|
-
},
|
|
1377
|
+
}, c),
|
|
1374
1378
|
{}
|
|
1375
1379
|
);
|
|
1376
1380
|
}
|
|
@@ -1393,8 +1397,8 @@ function hs(n = "default") {
|
|
|
1393
1397
|
}
|
|
1394
1398
|
function ms(n, e, t) {
|
|
1395
1399
|
const { value: s, iterator: r } = n, { item: i = "item", index: o = "index" } = r || {};
|
|
1396
|
-
let
|
|
1397
|
-
return Number.isInteger(
|
|
1400
|
+
let c = t.__parseExpression(s) || [];
|
|
1401
|
+
return Number.isInteger(c) && (c = new Array(c).fill(!0).map((f, a) => a + 1)), Array.isArray(c) ? c.map((f, a) => e(t.__clone({ [i]: f, [o]: a }), a)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
|
|
1398
1402
|
}
|
|
1399
1403
|
const ie = Fe({
|
|
1400
1404
|
name: "VtjPageContainer",
|
|
@@ -1404,8 +1408,8 @@ const ie = Fe({
|
|
|
1404
1408
|
Object.assign(e.meta, s.meta || {}, { cache: s.cache });
|
|
1405
1409
|
const { useTitle: o } = n?.adapter;
|
|
1406
1410
|
if (o) {
|
|
1407
|
-
const
|
|
1408
|
-
o(
|
|
1411
|
+
const c = e.meta.title || s.title || "VTJ.PRO";
|
|
1412
|
+
o(c);
|
|
1409
1413
|
}
|
|
1410
1414
|
}
|
|
1411
1415
|
return {
|
|
@@ -1438,20 +1442,20 @@ const ie = Fe({
|
|
|
1438
1442
|
function V(n, e, t = []) {
|
|
1439
1443
|
const s = [];
|
|
1440
1444
|
for (const r of t) {
|
|
1441
|
-
const { id: i, title: o, icon:
|
|
1445
|
+
const { id: i, title: o, icon: c, children: f, hidden: a, layout: l } = r;
|
|
1442
1446
|
if (l) {
|
|
1443
|
-
const
|
|
1444
|
-
s.push(...
|
|
1447
|
+
const u = V(n, e, f || []);
|
|
1448
|
+
s.push(...u);
|
|
1445
1449
|
} else {
|
|
1446
|
-
const
|
|
1450
|
+
const u = {
|
|
1447
1451
|
id: i,
|
|
1448
1452
|
title: o,
|
|
1449
|
-
icon:
|
|
1450
|
-
hidden:
|
|
1453
|
+
icon: c,
|
|
1454
|
+
hidden: a,
|
|
1451
1455
|
url: `${n}/${e}/${i}`,
|
|
1452
|
-
children:
|
|
1456
|
+
children: f && f.length ? V(n, e, f) : void 0
|
|
1453
1457
|
};
|
|
1454
|
-
s.push(
|
|
1458
|
+
s.push(u);
|
|
1455
1459
|
}
|
|
1456
1460
|
}
|
|
1457
1461
|
return s;
|
|
@@ -1472,49 +1476,49 @@ function Js(n) {
|
|
|
1472
1476
|
menuPathPrefix: e = "",
|
|
1473
1477
|
pageRouteName: t = "page",
|
|
1474
1478
|
disableMenusFilter: s = !1
|
|
1475
|
-
} = n || {}, r = Ke(), i = Oe(), o = Mt(),
|
|
1476
|
-
|
|
1479
|
+
} = n || {}, r = Ke(), i = Oe(), o = Mt(), c = ue(!1), f = ue(!1), a = r.project, l = (d, h) => {
|
|
1480
|
+
c.value = !d?.mask, f.value = h?.pure ?? !!d?.pure;
|
|
1477
1481
|
};
|
|
1478
1482
|
ut(() => {
|
|
1479
|
-
const { name: d, params:
|
|
1483
|
+
const { name: d, params: h, meta: m } = i;
|
|
1480
1484
|
if (d === k) {
|
|
1481
|
-
const g = r.getPage(
|
|
1482
|
-
l(g,
|
|
1485
|
+
const g = r.getPage(h.id);
|
|
1486
|
+
l(g, m);
|
|
1483
1487
|
} else if (d === J) {
|
|
1484
1488
|
const g = r.getHomepage();
|
|
1485
|
-
l(g,
|
|
1489
|
+
l(g, m);
|
|
1486
1490
|
} else {
|
|
1487
|
-
const g =
|
|
1491
|
+
const g = m.__vtj__;
|
|
1488
1492
|
if (g) {
|
|
1489
1493
|
const v = r.getPage(g);
|
|
1490
|
-
l(v,
|
|
1494
|
+
l(v, m);
|
|
1491
1495
|
} else
|
|
1492
|
-
|
|
1496
|
+
c.value = !m.mask, f.value = !!m.pure;
|
|
1493
1497
|
}
|
|
1494
1498
|
});
|
|
1495
|
-
const
|
|
1499
|
+
const u = V(
|
|
1496
1500
|
e,
|
|
1497
1501
|
t,
|
|
1498
|
-
|
|
1499
|
-
), p =
|
|
1502
|
+
a?.pages
|
|
1503
|
+
), p = a?.config;
|
|
1500
1504
|
return {
|
|
1501
|
-
disabled:
|
|
1505
|
+
disabled: c,
|
|
1502
1506
|
logo: p?.logo,
|
|
1503
1507
|
themeSwitchable: p?.themeSwitchable,
|
|
1504
|
-
title: p?.title ||
|
|
1505
|
-
menus: s ?
|
|
1506
|
-
pure:
|
|
1508
|
+
title: p?.title || a?.description || a?.name || "VTJ App",
|
|
1509
|
+
menus: s ? u : Ue(u, o),
|
|
1510
|
+
pure: f
|
|
1507
1511
|
};
|
|
1508
1512
|
}
|
|
1509
1513
|
function oe(n, e) {
|
|
1510
|
-
const { id: t, title: s, meta: r } = n, { name: i = "page", prefix: o = "", component:
|
|
1514
|
+
const { id: t, title: s, meta: r } = n, { name: i = "page", prefix: o = "", component: c, routeMeta: f } = e;
|
|
1511
1515
|
return {
|
|
1512
1516
|
name: t,
|
|
1513
1517
|
path: `${o}${i}/${t}`,
|
|
1514
|
-
component:
|
|
1518
|
+
component: c,
|
|
1515
1519
|
meta: {
|
|
1516
1520
|
title: s,
|
|
1517
|
-
...
|
|
1521
|
+
...f,
|
|
1518
1522
|
...r,
|
|
1519
1523
|
__vtj__: t
|
|
1520
1524
|
}
|
|
@@ -1528,53 +1532,53 @@ function he(n) {
|
|
|
1528
1532
|
component: r,
|
|
1529
1533
|
loader: i,
|
|
1530
1534
|
routeMeta: o,
|
|
1531
|
-
homepage:
|
|
1532
|
-
} = n,
|
|
1533
|
-
for (const
|
|
1534
|
-
const { id: l, title:
|
|
1535
|
+
homepage: c
|
|
1536
|
+
} = n, f = [];
|
|
1537
|
+
for (const a of s) {
|
|
1538
|
+
const { id: l, title: u, dir: p, layout: d, children: h, meta: m } = a;
|
|
1535
1539
|
if (p) {
|
|
1536
1540
|
const g = he({
|
|
1537
1541
|
name: e,
|
|
1538
1542
|
prefix: t,
|
|
1539
1543
|
component: r,
|
|
1540
1544
|
routeMeta: o,
|
|
1541
|
-
homepage:
|
|
1545
|
+
homepage: c,
|
|
1542
1546
|
loader: i,
|
|
1543
|
-
pages:
|
|
1547
|
+
pages: h || []
|
|
1544
1548
|
});
|
|
1545
|
-
|
|
1549
|
+
f.push(...g);
|
|
1546
1550
|
} else if (d) {
|
|
1547
1551
|
const g = he({
|
|
1548
1552
|
name: e,
|
|
1549
1553
|
prefix: t,
|
|
1550
1554
|
component: r,
|
|
1551
1555
|
routeMeta: o,
|
|
1552
|
-
homepage:
|
|
1556
|
+
homepage: c,
|
|
1553
1557
|
loader: i,
|
|
1554
|
-
pages:
|
|
1558
|
+
pages: h || []
|
|
1555
1559
|
}), v = {
|
|
1556
1560
|
name: `layout_${l}`,
|
|
1557
1561
|
path: t,
|
|
1558
1562
|
component: () => i(l),
|
|
1559
1563
|
meta: {
|
|
1560
|
-
title:
|
|
1564
|
+
title: u,
|
|
1561
1565
|
...o,
|
|
1562
|
-
...
|
|
1566
|
+
...m,
|
|
1563
1567
|
__vtj__: l
|
|
1564
1568
|
},
|
|
1565
1569
|
children: g
|
|
1566
1570
|
};
|
|
1567
|
-
|
|
1568
|
-
} else if (
|
|
1569
|
-
const g = oe(
|
|
1570
|
-
g.path = "", g.name = `home_${l}`,
|
|
1571
|
+
f.push(v), f.push(oe(a, n));
|
|
1572
|
+
} else if (f.push(oe(a, n)), c === l) {
|
|
1573
|
+
const g = oe(a, n);
|
|
1574
|
+
g.path = "", g.name = `home_${l}`, f.push(g);
|
|
1571
1575
|
}
|
|
1572
1576
|
}
|
|
1573
|
-
return
|
|
1577
|
+
return f;
|
|
1574
1578
|
}
|
|
1575
1579
|
function _s(n = {}, e) {
|
|
1576
|
-
const { css: t, store: s, enhance: r } = n, { window: i, app: o, library:
|
|
1577
|
-
o.config.globalProperties.$libs =
|
|
1580
|
+
const { css: t, store: s, enhance: r } = n, { window: i, app: o, library: c = {}, adapter: f, mode: a } = e, { Pinia: l } = c;
|
|
1581
|
+
o.config.globalProperties.$libs = c, ge(i, "global-css", t || ""), l && s && vs(s, o, l), ws(o, f, n), !f.access && n.access && ys(n.access, o, a, f), Ss(o, n), r && $s(r, o, c);
|
|
1578
1582
|
}
|
|
1579
1583
|
function vs(n, e, t) {
|
|
1580
1584
|
const s = t.createPinia();
|
|
@@ -1585,12 +1589,12 @@ function vs(n, e, t) {
|
|
|
1585
1589
|
}
|
|
1586
1590
|
function ys(n, e, t, s) {
|
|
1587
1591
|
if ($(n) && n.value) {
|
|
1588
|
-
const r = R(n, {}, !1, !1, !0), { alert: i, request: o } = s,
|
|
1592
|
+
const r = R(n, {}, !1, !1, !0), { alert: i, request: o } = s, c = new _e({
|
|
1589
1593
|
alert: i,
|
|
1590
1594
|
storagePrefix: "__VTJ_APP_",
|
|
1591
1595
|
...r(e)
|
|
1592
|
-
}),
|
|
1593
|
-
|
|
1596
|
+
}), f = e.config.globalProperties.$router;
|
|
1597
|
+
c.connect({ mode: t, router: f, request: o }), e.use(c);
|
|
1594
1598
|
}
|
|
1595
1599
|
}
|
|
1596
1600
|
function ws(n, e, t) {
|
|
@@ -1601,23 +1605,23 @@ function ws(n, e, t) {
|
|
|
1601
1605
|
e.request.setConfig(o(n));
|
|
1602
1606
|
}
|
|
1603
1607
|
if (r && $(r) && r.value) {
|
|
1604
|
-
const o = R(r, {}, !1, !1, !0),
|
|
1605
|
-
|
|
1608
|
+
const o = R(r, {}, !1, !1, !0), c = e.request;
|
|
1609
|
+
c.__unReq && c.__unReq(), c.__unReq = e.request.useRequest((f) => o(f, n));
|
|
1606
1610
|
}
|
|
1607
1611
|
if (i && $(i) && i.value) {
|
|
1608
|
-
const o = R(i, {}, !1, !1, !0),
|
|
1609
|
-
|
|
1612
|
+
const o = R(i, {}, !1, !1, !0), c = e.request;
|
|
1613
|
+
c.__unRes && c.__unRes(), c.__unRes = e.request.useResponse((f) => o(f, n));
|
|
1610
1614
|
}
|
|
1611
1615
|
}
|
|
1612
1616
|
function Ss(n, e) {
|
|
1613
1617
|
const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
|
|
1614
1618
|
if (t && $(t) && t.value) {
|
|
1615
1619
|
const i = R(t, {}, !1, !1, !0);
|
|
1616
|
-
r && r.beforeEach((o,
|
|
1620
|
+
r && r.beforeEach((o, c, f) => i(o, c, f, n));
|
|
1617
1621
|
}
|
|
1618
1622
|
if (s && $(s) && s.value) {
|
|
1619
1623
|
const i = R(s, {}, !1, !1, !0);
|
|
1620
|
-
r && r.afterEach((o,
|
|
1624
|
+
r && r.afterEach((o, c, f) => i(o, c, f, n));
|
|
1621
1625
|
}
|
|
1622
1626
|
}
|
|
1623
1627
|
function $s(n, e, t = {}) {
|
|
@@ -1627,19 +1631,19 @@ function Es(n, e, t) {
|
|
|
1627
1631
|
if (!n || !e || !t) return;
|
|
1628
1632
|
const { VueI18n: s } = e;
|
|
1629
1633
|
if (s) {
|
|
1630
|
-
const { locale: r, fallbackLocale: i, messages: o = [] } = t,
|
|
1631
|
-
for (let
|
|
1632
|
-
const l = Object.keys(
|
|
1633
|
-
for (const
|
|
1634
|
-
|
|
1634
|
+
const { locale: r, fallbackLocale: i, messages: o = [] } = t, c = {};
|
|
1635
|
+
for (let a of o) {
|
|
1636
|
+
const l = Object.keys(a).filter((u) => u !== "key");
|
|
1637
|
+
for (const u of l)
|
|
1638
|
+
c[u] || (c[u] = {}), c[u][a.key] = a[u];
|
|
1635
1639
|
}
|
|
1636
|
-
const
|
|
1640
|
+
const f = s.createI18n({
|
|
1637
1641
|
legacy: !1,
|
|
1638
1642
|
locale: r,
|
|
1639
1643
|
fallbackLocale: i,
|
|
1640
|
-
messages:
|
|
1644
|
+
messages: c
|
|
1641
1645
|
});
|
|
1642
|
-
n.use(
|
|
1646
|
+
n.use(f);
|
|
1643
1647
|
}
|
|
1644
1648
|
}
|
|
1645
1649
|
const Je = Symbol("Provider");
|
|
@@ -1657,17 +1661,17 @@ class js extends Xe {
|
|
|
1657
1661
|
dependencies: r,
|
|
1658
1662
|
materials: i,
|
|
1659
1663
|
project: o = {},
|
|
1660
|
-
adapter:
|
|
1661
|
-
globals:
|
|
1662
|
-
modules:
|
|
1664
|
+
adapter: c = {},
|
|
1665
|
+
globals: f = {},
|
|
1666
|
+
modules: a = {},
|
|
1663
1667
|
router: l = null,
|
|
1664
|
-
materialPath:
|
|
1668
|
+
materialPath: u = "./",
|
|
1665
1669
|
nodeEnv: p = "development"
|
|
1666
1670
|
/* Development */
|
|
1667
1671
|
} = e;
|
|
1668
|
-
this.mode = s, this.modules =
|
|
1669
|
-
const { access: d, request:
|
|
1670
|
-
d && d.connect({ mode: s, router: l, request:
|
|
1672
|
+
this.mode = s, this.modules = a, this.service = t, this.router = l, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, f), Object.assign(this.adapter, c);
|
|
1673
|
+
const { access: d, request: h } = this.adapter;
|
|
1674
|
+
d && d.connect({ mode: s, router: l, request: h }), o && s !== y.Design ? this.load(o) : this.project = o;
|
|
1671
1675
|
}
|
|
1672
1676
|
mode;
|
|
1673
1677
|
// 当前运行模式(设计/源码/预览等)
|
|
@@ -1731,8 +1735,8 @@ class js extends Xe {
|
|
|
1731
1735
|
const { vtjDir: t = ".vtj" } = this.options, s = this.modules[`${t}/projects/${e.id}.json`] || this.modules[`/src/${t}/projects/${e.id}.json`];
|
|
1732
1736
|
if (this.project = s ? await s() : await this.service.init(e), !this.project)
|
|
1733
1737
|
throw new Error("project is null");
|
|
1734
|
-
const { apis: r = [], meta: i = [], env: o = [] } = this.project,
|
|
1735
|
-
|
|
1738
|
+
const { apis: r = [], meta: i = [], env: o = [] } = this.project, c = window;
|
|
1739
|
+
c && (c.CKEDITOR_VERSION = void 0), this.initEnv(o), this.mode === y.Raw ? await this.loadDependencies(c) : await this.loadAssets(c), this.initMock(c), this.apis = Dt(r, i, this.adapter), ke(c), Ht(r, c), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
|
1736
1740
|
}
|
|
1737
1741
|
initMock(e) {
|
|
1738
1742
|
const t = N(e);
|
|
@@ -1751,44 +1755,44 @@ class js extends Xe {
|
|
|
1751
1755
|
library: r,
|
|
1752
1756
|
components: i,
|
|
1753
1757
|
materialPath: o,
|
|
1754
|
-
nodeEnv:
|
|
1755
|
-
libraryLocales:
|
|
1758
|
+
nodeEnv: c,
|
|
1759
|
+
libraryLocales: f
|
|
1756
1760
|
} = this, {
|
|
1757
|
-
libraryExports:
|
|
1761
|
+
libraryExports: a,
|
|
1758
1762
|
libraryMap: l,
|
|
1759
|
-
materials:
|
|
1763
|
+
materials: u,
|
|
1760
1764
|
materialExports: p,
|
|
1761
1765
|
materialMapLibrary: d,
|
|
1762
|
-
libraryLocaleMap:
|
|
1766
|
+
libraryLocaleMap: h
|
|
1763
1767
|
} = gt(
|
|
1764
1768
|
t,
|
|
1765
1769
|
o,
|
|
1766
|
-
|
|
1770
|
+
c === "development"
|
|
1767
1771
|
/* Development */
|
|
1768
1772
|
);
|
|
1769
|
-
Object.assign(this.libraryLocaleMap,
|
|
1770
|
-
for (const
|
|
1771
|
-
const g = s[
|
|
1773
|
+
Object.assign(this.libraryLocaleMap, h);
|
|
1774
|
+
for (const m of a) {
|
|
1775
|
+
const g = s[m], v = e[m];
|
|
1772
1776
|
if (v)
|
|
1773
|
-
r[
|
|
1777
|
+
r[m] = v;
|
|
1774
1778
|
else if (g)
|
|
1775
|
-
e[
|
|
1779
|
+
e[m] = r[m] = await g();
|
|
1776
1780
|
else {
|
|
1777
|
-
const b = l[
|
|
1781
|
+
const b = l[m] || [];
|
|
1778
1782
|
for (const _ of b)
|
|
1779
1783
|
Q(_) && await Et(_, O.append(_, { v: H })), X(_) && await be(O.append(_, { v: H }));
|
|
1780
|
-
r[
|
|
1784
|
+
r[m] = e[m];
|
|
1781
1785
|
}
|
|
1782
|
-
const w = m
|
|
1786
|
+
const w = h[m];
|
|
1783
1787
|
if (w) {
|
|
1784
1788
|
const b = s[w];
|
|
1785
|
-
|
|
1789
|
+
f[w] = b ? await b() : e[w];
|
|
1786
1790
|
}
|
|
1787
1791
|
}
|
|
1788
|
-
if (
|
|
1789
|
-
for (const g of
|
|
1792
|
+
if (c === "development") {
|
|
1793
|
+
for (const g of u)
|
|
1790
1794
|
await be(O.append(g, { v: H }));
|
|
1791
|
-
const
|
|
1795
|
+
const m = this.materials || {};
|
|
1792
1796
|
for (const g of p) {
|
|
1793
1797
|
const v = e[d[g]], w = v?.default || v, b = Ye[g];
|
|
1794
1798
|
if (b)
|
|
@@ -1796,7 +1800,7 @@ class js extends Xe {
|
|
|
1796
1800
|
i[_] = w[_];
|
|
1797
1801
|
});
|
|
1798
1802
|
else {
|
|
1799
|
-
const _ =
|
|
1803
|
+
const _ = m[g] ? (await m[g]()).default : e[g];
|
|
1800
1804
|
_ && w && (_.components || []).forEach((C) => {
|
|
1801
1805
|
i[C.name] = _t(C, w);
|
|
1802
1806
|
});
|
|
@@ -1809,37 +1813,37 @@ class js extends Xe {
|
|
|
1809
1813
|
if (!e) return;
|
|
1810
1814
|
const i = t?.platform === "uniapp" ? "pages" : "page", {
|
|
1811
1815
|
routeAppendTo: o,
|
|
1812
|
-
pageRouteName:
|
|
1813
|
-
routeMeta:
|
|
1814
|
-
} = s,
|
|
1815
|
-
path: `${
|
|
1816
|
+
pageRouteName: c = i,
|
|
1817
|
+
routeMeta: f
|
|
1818
|
+
} = s, a = o ? "" : "/", l = {
|
|
1819
|
+
path: `${a}${c}/:id`,
|
|
1816
1820
|
name: k,
|
|
1817
1821
|
component: ie
|
|
1818
|
-
},
|
|
1819
|
-
path:
|
|
1822
|
+
}, u = this.getHomepage(), p = {
|
|
1823
|
+
path: a,
|
|
1820
1824
|
name: J,
|
|
1821
|
-
component:
|
|
1822
|
-
meta:
|
|
1825
|
+
component: u ? ie : r.startupComponent || gs,
|
|
1826
|
+
meta: f
|
|
1823
1827
|
};
|
|
1824
1828
|
if (e.hasRoute(k) && e.removeRoute(k), e.hasRoute(J) && e.removeRoute(J), s.enableStaticRoute) {
|
|
1825
1829
|
const d = t?.pages || [];
|
|
1826
1830
|
he({
|
|
1827
|
-
name:
|
|
1828
|
-
prefix:
|
|
1831
|
+
name: c,
|
|
1832
|
+
prefix: a,
|
|
1829
1833
|
pages: d,
|
|
1830
1834
|
component: ie,
|
|
1831
1835
|
loader: this.getRenderComponent.bind(this),
|
|
1832
|
-
homepage:
|
|
1833
|
-
}).forEach((
|
|
1834
|
-
o ? e.addRoute(o,
|
|
1835
|
-
}),
|
|
1836
|
+
homepage: u?.id
|
|
1837
|
+
}).forEach((m) => {
|
|
1838
|
+
o ? e.addRoute(o, m) : e.addRoute(m);
|
|
1839
|
+
}), u || (o ? e.addRoute(o, p) : e.addRoute(p));
|
|
1836
1840
|
} else
|
|
1837
1841
|
o ? (e.addRoute(o, l), e.addRoute(o, p)) : (e.addRoute(l), e.addRoute(p));
|
|
1838
1842
|
}
|
|
1839
1843
|
setErrorHandler(e) {
|
|
1840
1844
|
e.config.errorHandler = ct((t, s, r) => {
|
|
1841
|
-
const i = s?.$options.name, o = typeof t == "string" ? t : t?.message || t?.msg || "未知错误",
|
|
1842
|
-
["getComputedStyle", "ResizeObserver"].some((
|
|
1845
|
+
const i = s?.$options.name, o = typeof t == "string" ? t : t?.message || t?.msg || "未知错误", c = `[ ${i} ] ${o} ${r}`;
|
|
1846
|
+
["getComputedStyle", "ResizeObserver"].some((a) => c.includes(a)) || (console.error(
|
|
1843
1847
|
"[VTJ Error]:",
|
|
1844
1848
|
{
|
|
1845
1849
|
err: t,
|
|
@@ -1847,7 +1851,7 @@ class js extends Xe {
|
|
|
1847
1851
|
info: r
|
|
1848
1852
|
},
|
|
1849
1853
|
t?.stack
|
|
1850
|
-
), this.errorHandler && this.errorHandler(t), this.adapter.notify && this.adapter.notify(
|
|
1854
|
+
), this.errorHandler && this.errorHandler(t), this.adapter.notify && this.adapter.notify(c, "组件渲染错误", "error"));
|
|
1851
1855
|
}, 300);
|
|
1852
1856
|
}
|
|
1853
1857
|
/**
|
|
@@ -1862,10 +1866,10 @@ class js extends Xe {
|
|
|
1862
1866
|
*/
|
|
1863
1867
|
install(e) {
|
|
1864
1868
|
const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, i = e.config.globalProperties.installed || {};
|
|
1865
|
-
for (const [o,
|
|
1866
|
-
if (!i[o] && bt(
|
|
1867
|
-
const
|
|
1868
|
-
e.use(
|
|
1869
|
+
for (const [o, c] of Object.entries(this.library))
|
|
1870
|
+
if (!i[o] && bt(c)) {
|
|
1871
|
+
const a = { locale: s[t[o]] }, l = r[o] || {}, u = { ...a, ...l };
|
|
1872
|
+
e.use(c, u), i[o] = !0;
|
|
1869
1873
|
}
|
|
1870
1874
|
e.provide(Je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== y.Design && this.initGlobals(this.project?.globals || {}, {
|
|
1871
1875
|
app: e,
|
|
@@ -1885,9 +1889,9 @@ class js extends Xe {
|
|
|
1885
1889
|
if (o.id === r)
|
|
1886
1890
|
return o;
|
|
1887
1891
|
if (o.children && o.children.length) {
|
|
1888
|
-
const
|
|
1889
|
-
if (
|
|
1890
|
-
return
|
|
1892
|
+
const c = s(r, o.children);
|
|
1893
|
+
if (c)
|
|
1894
|
+
return c;
|
|
1891
1895
|
}
|
|
1892
1896
|
}
|
|
1893
1897
|
};
|
|
@@ -1941,7 +1945,7 @@ class js extends Xe {
|
|
|
1941
1945
|
* @returns 渲染器实例
|
|
1942
1946
|
*/
|
|
1943
1947
|
createDslRenderer(e, t = {}) {
|
|
1944
|
-
const { library: s, components: r, mode: i, apis: o } = this,
|
|
1948
|
+
const { library: s, components: r, mode: i, apis: o } = this, c = {
|
|
1945
1949
|
mode: i,
|
|
1946
1950
|
Vue: s.Vue,
|
|
1947
1951
|
components: r,
|
|
@@ -1949,15 +1953,15 @@ class js extends Xe {
|
|
|
1949
1953
|
apis: o,
|
|
1950
1954
|
window,
|
|
1951
1955
|
...t
|
|
1952
|
-
},
|
|
1953
|
-
getDsl: async (
|
|
1954
|
-
getDslByUrl: async (
|
|
1955
|
-
options:
|
|
1956
|
+
}, f = pe({
|
|
1957
|
+
getDsl: async (a) => await this.getDsl(a) || null,
|
|
1958
|
+
getDslByUrl: async (a) => await this.getDslByUrl(a) || null,
|
|
1959
|
+
options: c
|
|
1956
1960
|
});
|
|
1957
1961
|
return fe({
|
|
1958
|
-
...
|
|
1962
|
+
...c,
|
|
1959
1963
|
dsl: e,
|
|
1960
|
-
loader:
|
|
1964
|
+
loader: f
|
|
1961
1965
|
});
|
|
1962
1966
|
}
|
|
1963
1967
|
/**
|
|
@@ -1975,8 +1979,8 @@ class js extends Xe {
|
|
|
1975
1979
|
if (!s)
|
|
1976
1980
|
return M.warn(`Can not find file: ${e}`), null;
|
|
1977
1981
|
if (t && t(s), this.mode === y.Raw) {
|
|
1978
|
-
const { vtjRawDir: i = ".vtj/vue" } = this.options, o = `${i}/${e}.vue`,
|
|
1979
|
-
return
|
|
1982
|
+
const { vtjRawDir: i = ".vtj/vue" } = this.options, o = `${i}/${e}.vue`, c = this.modules[o] || this.modules[`/src/pages/${e}.vue`];
|
|
1983
|
+
return c ? (await c())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
|
|
1980
1984
|
}
|
|
1981
1985
|
const r = await this.getDsl(s.id);
|
|
1982
1986
|
return r ? this.createDslRenderer(r).renderer : (M.warn(`Can not find dsl: ${e}`), null);
|
|
@@ -2004,7 +2008,7 @@ class js extends Xe {
|
|
|
2004
2008
|
* @returns Vue异步组件
|
|
2005
2009
|
*/
|
|
2006
2010
|
definePluginComponent(e) {
|
|
2007
|
-
return je(async () => await
|
|
2011
|
+
return je(async () => await Le(e, window));
|
|
2008
2012
|
}
|
|
2009
2013
|
/**
|
|
2010
2014
|
* 设置应用全局
|
|
@@ -2056,7 +2060,7 @@ function Ke(n = {}) {
|
|
|
2056
2060
|
return e;
|
|
2057
2061
|
}
|
|
2058
2062
|
async function zs(n, e = "") {
|
|
2059
|
-
const { name: t, urls: s = [] } = n || {}, r = s.map((
|
|
2063
|
+
const { name: t, urls: s = [] } = n || {}, r = s.map((c) => e + c), { css: i, js: o } = vt(r);
|
|
2060
2064
|
if (i.length && xe(i), o.length)
|
|
2061
2065
|
return await De(o, t).catch(
|
|
2062
2066
|
() => {
|
|
@@ -2388,12 +2392,12 @@ export {
|
|
|
2388
2392
|
ft as BUILT_IN_DIRECTIVES,
|
|
2389
2393
|
ve as BaseService,
|
|
2390
2394
|
Re as CONTEXT_HOST,
|
|
2391
|
-
|
|
2395
|
+
Lt as Context,
|
|
2392
2396
|
y as ContextMode,
|
|
2393
2397
|
pt as DATA_TYPES,
|
|
2394
2398
|
J as HOMEPAGE_ROUTE_NAME,
|
|
2395
2399
|
Me as HTML_TAGS,
|
|
2396
|
-
|
|
2400
|
+
Ls as JSCodeToString,
|
|
2397
2401
|
Ms as LIFE_CYCLES_LIST,
|
|
2398
2402
|
Qs as LocalService,
|
|
2399
2403
|
Ps as MemoryService,
|
|
@@ -2409,7 +2413,7 @@ export {
|
|
|
2409
2413
|
yt as compileScopedCSS,
|
|
2410
2414
|
$t as convertCssRpx,
|
|
2411
2415
|
qs as createAccess,
|
|
2412
|
-
|
|
2416
|
+
Bs as createAdapter,
|
|
2413
2417
|
Ds as createAssetScripts,
|
|
2414
2418
|
Hs as createAssetsCss,
|
|
2415
2419
|
Gt as createDataSources,
|
|
@@ -2427,7 +2431,7 @@ export {
|
|
|
2427
2431
|
q as fillBasePath,
|
|
2428
2432
|
N as getMock,
|
|
2429
2433
|
qe as getModifiers,
|
|
2430
|
-
|
|
2434
|
+
Le as getPlugin,
|
|
2431
2435
|
_t as getRawComponent,
|
|
2432
2436
|
Ct as isArrowFunction,
|
|
2433
2437
|
At as isAssignment,
|
|
@@ -2452,7 +2456,7 @@ export {
|
|
|
2452
2456
|
x as nodeCache,
|
|
2453
2457
|
T as nodeRender,
|
|
2454
2458
|
gt as parseDeps,
|
|
2455
|
-
|
|
2459
|
+
L as parseExpression,
|
|
2456
2460
|
R as parseFunction,
|
|
2457
2461
|
vt as parseUrls,
|
|
2458
2462
|
Je as providerKey,
|