@vtj/renderer 0.10.6 → 0.10.8
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 +6 -6
- package/dist/index.mjs +270 -276
- package/package.json +6 -6
- package/types/components/Startup.d.ts +1 -1
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { Base as De, BUILT_IN_COMPONENTS as He, ProjectModel as
|
2
|
-
import { isUrl as Oe, url as R, dedupArray as
|
3
|
-
import * as
|
4
|
-
import { inject as ge, toRef as Ke, readonly as We, ref as
|
5
|
-
import { useRoute as
|
1
|
+
import { Base as De, BUILT_IN_COMPONENTS as He, ProjectModel as D, HistoryModel as pe } from "@vtj/core";
|
2
|
+
import { isUrl as Oe, url as R, dedupArray as Ne, isString as j, isFunction as V, logger as P, storage as U, cookie as L, toArray as ie, unRSA as ae, delay as fe, createRequest as he, jsonp as me, merge as Be, pathToRegexp as Ue, pathToRegexpMatch as Le, formDataToJson as qe, camelCase as $, upperFirst as Je, pick as ze, request as K, loadScript as ce, Storage as Ve, mapToObject as Z } from "@vtj/utils";
|
3
|
+
import * as N from "vue";
|
4
|
+
import { inject as ge, toRef as Ke, readonly as We, ref as H, customRef as Ge, getCurrentScope as Ye, onScopeDispose as Qe, watch as ve, toValue as ee, computed as ye, shallowRef as Xe, getCurrentInstance as Ze, onMounted as et, defineComponent as te, h as W, createElementBlock as tt, openBlock as st, createElementVNode as k, toDisplayString as q, version as J, defineAsyncComponent as le, watchEffect as nt } from "vue";
|
5
|
+
import { useRoute as _e } from "vue-router";
|
6
6
|
/**!
|
7
7
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
8
8
|
* @name @vtj/renderer
|
9
9
|
* @author CHC chenhuachun1549@dingtalk.com
|
10
|
-
* @version 0.10.
|
10
|
+
* @version 0.10.8
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
12
12
|
*/
|
13
|
-
const
|
13
|
+
const we = "0.10.8";
|
14
14
|
var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
|
15
15
|
const ue = [
|
16
16
|
"$el",
|
@@ -24,7 +24,7 @@ const ue = [
|
|
24
24
|
"$props",
|
25
25
|
"$options",
|
26
26
|
"$forceUpdate"
|
27
|
-
],
|
27
|
+
], Rs = [
|
28
28
|
"beforeCreate",
|
29
29
|
"created",
|
30
30
|
"beforeMount",
|
@@ -38,14 +38,14 @@ const ue = [
|
|
38
38
|
"renderTriggered",
|
39
39
|
"activated",
|
40
40
|
"deactivated"
|
41
|
-
],
|
41
|
+
], rt = [
|
42
42
|
"vIf",
|
43
43
|
"vShow",
|
44
44
|
"vModel",
|
45
45
|
"vFor",
|
46
46
|
"vBind",
|
47
47
|
"vHtml"
|
48
|
-
],
|
48
|
+
], ot = {
|
49
49
|
String,
|
50
50
|
Number,
|
51
51
|
Boolean,
|
@@ -53,10 +53,10 @@ const ue = [
|
|
53
53
|
Object,
|
54
54
|
Function,
|
55
55
|
Date
|
56
|
-
}, x = "VtjPage",
|
56
|
+
}, x = "VtjPage", I = "VtjHomepage", it = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
|
57
57
|
","
|
58
|
-
),
|
59
|
-
function
|
58
|
+
), at = "component,slot".split(",");
|
59
|
+
function F(n, e) {
|
60
60
|
return n.map((t) => Oe(t) || t.startsWith("/") ? t : `${e}${t}`);
|
61
61
|
}
|
62
62
|
function se(n) {
|
@@ -65,49 +65,49 @@ function se(n) {
|
|
65
65
|
function ne(n) {
|
66
66
|
return /\.js$/.test(n);
|
67
67
|
}
|
68
|
-
function
|
68
|
+
function ct(n) {
|
69
69
|
return /\.json$/.test(n);
|
70
70
|
}
|
71
|
-
function
|
71
|
+
function Ps(n) {
|
72
72
|
return n.map(
|
73
|
-
(e) => `<script src="${R.append(e, { v:
|
73
|
+
(e) => `<script src="${R.append(e, { v: we })}"><\/script>`
|
74
74
|
).join("");
|
75
75
|
}
|
76
|
-
function
|
76
|
+
function xs(n = []) {
|
77
77
|
return n.map(
|
78
|
-
(e) => `<link rel="stylesheet" href="${R.append(e, { v:
|
78
|
+
(e) => `<link rel="stylesheet" href="${R.append(e, { v: we })}" />`
|
79
79
|
).join("");
|
80
80
|
}
|
81
|
-
function
|
81
|
+
function lt(n, e = !1) {
|
82
82
|
return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
|
83
83
|
}
|
84
|
-
function
|
84
|
+
function ut(n, e, t = !1) {
|
85
85
|
const s = n.filter((d) => !!d.enabled), r = [], o = [], a = [], i = [], c = {}, l = {}, f = [], u = {};
|
86
86
|
return s.forEach(
|
87
87
|
({ urls: d, assetsUrl: h, library: m, assetsLibrary: p, localeLibrary: w }) => {
|
88
88
|
d?.forEach((g) => {
|
89
|
-
ne(g) && r.push(
|
90
|
-
}), m && (i.push(m), c[m] =
|
89
|
+
ne(g) && r.push(lt(g, t)), se(g) && o.push(g);
|
90
|
+
}), m && (i.push(m), c[m] = F(d || [], e), w && (l[m] = w)), h && a.push(h), p && f.push(p), m && p && (u[p] = m);
|
91
91
|
}
|
92
92
|
), {
|
93
|
-
scripts:
|
94
|
-
css:
|
95
|
-
materials:
|
93
|
+
scripts: F(r, e),
|
94
|
+
css: F(o, e),
|
95
|
+
materials: F(a, e),
|
96
96
|
libraryExports: i,
|
97
|
-
materialExports:
|
97
|
+
materialExports: Ne(f),
|
98
98
|
materialMapLibrary: u,
|
99
99
|
libraryMap: c,
|
100
100
|
libraryLocaleMap: l
|
101
101
|
};
|
102
102
|
}
|
103
|
-
function
|
103
|
+
function dt(n, e) {
|
104
104
|
const { name: t, parent: s, alias: r } = n;
|
105
105
|
return s ? e[s]?.[r || t] : e[r || t];
|
106
106
|
}
|
107
|
-
function
|
107
|
+
function Se(n) {
|
108
108
|
return j(n) ? n : JSON.stringify(n);
|
109
109
|
}
|
110
|
-
function
|
110
|
+
function be(n, e, t) {
|
111
111
|
const s = n.CSSStyleSheet;
|
112
112
|
if (s.prototype.replaceSync) {
|
113
113
|
const r = new s();
|
@@ -122,11 +122,11 @@ function je(n, e, t) {
|
|
122
122
|
o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
|
123
123
|
}
|
124
124
|
}
|
125
|
-
async function
|
125
|
+
async function pt(n, e) {
|
126
126
|
const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
|
127
|
-
t &&
|
127
|
+
t && be(window, n, t);
|
128
128
|
}
|
129
|
-
function
|
129
|
+
function ft(n, e = window) {
|
130
130
|
const t = e.document, s = e.document.head;
|
131
131
|
for (const r of n)
|
132
132
|
if (!t.getElementById(r)) {
|
@@ -134,7 +134,7 @@ function pt(n, e = window) {
|
|
134
134
|
a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
|
135
135
|
}
|
136
136
|
}
|
137
|
-
async function
|
137
|
+
async function ht(n, e, t = window) {
|
138
138
|
const s = t.document, r = t.document.head;
|
139
139
|
let o = t[e];
|
140
140
|
return o ? o.default || o : new Promise((a, i) => {
|
@@ -148,23 +148,23 @@ async function ft(n, e, t = window) {
|
|
148
148
|
}
|
149
149
|
});
|
150
150
|
}
|
151
|
-
function ht(n) {
|
152
|
-
return V(n) || V(n?.install);
|
153
|
-
}
|
154
151
|
function mt(n) {
|
155
|
-
return
|
152
|
+
return V(n) || V(n?.install);
|
156
153
|
}
|
157
154
|
function gt(n) {
|
158
|
-
return
|
155
|
+
return at.includes(n);
|
159
156
|
}
|
160
|
-
function
|
157
|
+
function vt(n) {
|
158
|
+
return it.includes(n);
|
159
|
+
}
|
160
|
+
function C(n = window) {
|
161
161
|
const e = window.Mock;
|
162
162
|
if (e) return e;
|
163
163
|
const t = n.Mock;
|
164
164
|
if (t)
|
165
165
|
return window.Mock = t, t;
|
166
166
|
}
|
167
|
-
function
|
167
|
+
function M(n, e, t = !1, s = !1) {
|
168
168
|
try {
|
169
169
|
const r = ['"use strict";', "var __self = arguments[0];"];
|
170
170
|
r.push("return ");
|
@@ -179,7 +179,7 @@ function A(n, e, t = !1, s = !1) {
|
|
179
179
|
}
|
180
180
|
}
|
181
181
|
function G(n, e, t = !1, s = !1) {
|
182
|
-
const r =
|
182
|
+
const r = M(n, e, t, s);
|
183
183
|
if (typeof r != "function" && (P.error(
|
184
184
|
"parseFunction.error",
|
185
185
|
"not a function",
|
@@ -192,16 +192,16 @@ function G(n, e, t = !1, s = !1) {
|
|
192
192
|
function _(n) {
|
193
193
|
return n && n.type === "JSExpression";
|
194
194
|
}
|
195
|
-
function
|
195
|
+
function A(n) {
|
196
196
|
return typeof n == "object" && n && n.type === "JSFunction";
|
197
197
|
}
|
198
|
-
function
|
199
|
-
return _(n) ||
|
198
|
+
function yt(n) {
|
199
|
+
return _(n) || A(n);
|
200
200
|
}
|
201
|
-
function
|
202
|
-
return
|
201
|
+
function Cs(n) {
|
202
|
+
return yt(n) ? n.value : JSON.stringify(n);
|
203
203
|
}
|
204
|
-
const
|
204
|
+
const _t = {
|
205
205
|
session: !1,
|
206
206
|
authKey: "Authorization",
|
207
207
|
storageKey: "ACCESS_STORAGE",
|
@@ -213,13 +213,13 @@ const yt = {
|
|
213
213
|
unauthorizedMessage: "登录已经失效,请重新登录!",
|
214
214
|
noPermissionMessage: "无权限访问该页面",
|
215
215
|
appName: ""
|
216
|
-
},
|
217
|
-
class
|
216
|
+
}, je = Symbol("access");
|
217
|
+
class Ms {
|
218
218
|
options;
|
219
219
|
data = null;
|
220
220
|
mode = y.Raw;
|
221
221
|
constructor(e) {
|
222
|
-
this.options = Object.assign({},
|
222
|
+
this.options = Object.assign({}, _t, e), this.loadData();
|
223
223
|
}
|
224
224
|
connect(e) {
|
225
225
|
const { mode: t, router: s, request: r } = e;
|
@@ -257,7 +257,7 @@ class Fs {
|
|
257
257
|
return ie(e).some((o) => s[o] || s[t + "." + o]);
|
258
258
|
}
|
259
259
|
install(e) {
|
260
|
-
e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide(
|
260
|
+
e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide(je, this));
|
261
261
|
}
|
262
262
|
isAuthPath(e) {
|
263
263
|
const { auth: t, isAuth: s } = this.options;
|
@@ -355,10 +355,10 @@ class Fs {
|
|
355
355
|
);
|
356
356
|
}
|
357
357
|
}
|
358
|
-
function
|
359
|
-
return ge(
|
358
|
+
function wt() {
|
359
|
+
return ge(je, null);
|
360
360
|
}
|
361
|
-
function
|
361
|
+
function As(n = {}) {
|
362
362
|
const { notify: e, loading: t, settings: s = {} } = n;
|
363
363
|
let r = null;
|
364
364
|
return {
|
@@ -387,7 +387,7 @@ function Ts(n = {}) {
|
|
387
387
|
loading: t
|
388
388
|
};
|
389
389
|
}
|
390
|
-
function
|
390
|
+
function St(n, e) {
|
391
391
|
const { jsonp: t, request: s } = e;
|
392
392
|
if (n.method === "jsonp")
|
393
393
|
return (r = {}) => t(n.url, {
|
@@ -395,7 +395,7 @@ function wt(n, e) {
|
|
395
395
|
query: r
|
396
396
|
});
|
397
397
|
{
|
398
|
-
const r = n.headers ?
|
398
|
+
const r = n.headers ? M(n.headers, {}, !0) : void 0, o = {
|
399
399
|
url: n.url,
|
400
400
|
method: n.method,
|
401
401
|
settings: {
|
@@ -403,10 +403,10 @@ function wt(n, e) {
|
|
403
403
|
headers: r
|
404
404
|
}
|
405
405
|
};
|
406
|
-
return (a, i) => (delete o.data, s.send(
|
406
|
+
return (a, i) => (delete o.data, s.send(Be(o, i || {}, { data: a })));
|
407
407
|
}
|
408
408
|
}
|
409
|
-
function
|
409
|
+
function bt(n, e) {
|
410
410
|
const { metaQuery: t } = e;
|
411
411
|
if (!t) return;
|
412
412
|
const { code: s, queryCode: r } = n;
|
@@ -418,20 +418,20 @@ function St(n, e) {
|
|
418
418
|
return t(s, r, o, a);
|
419
419
|
};
|
420
420
|
}
|
421
|
-
function
|
421
|
+
function jt(n = [], e = [], t) {
|
422
422
|
const s = {};
|
423
423
|
for (const r of n)
|
424
|
-
s[r.id] = wt(r, t);
|
425
|
-
for (const r of e)
|
426
424
|
s[r.id] = St(r, t);
|
425
|
+
for (const r of e)
|
426
|
+
s[r.id] = bt(r, t);
|
427
427
|
return s;
|
428
428
|
}
|
429
|
-
async function
|
430
|
-
const t =
|
431
|
-
t && (
|
429
|
+
async function $t(n = [], e = window) {
|
430
|
+
const t = C(e);
|
431
|
+
t && ($e(e), n.forEach((s) => Et(t, s)));
|
432
432
|
}
|
433
|
-
function
|
434
|
-
const t =
|
433
|
+
function kt(n, e = window) {
|
434
|
+
const t = A(n.mockTemplate) && n.mockTemplate.value ? G(n.mockTemplate, {}, !0) : void 0, s = C(e);
|
435
435
|
return async (...r) => {
|
436
436
|
let o = {};
|
437
437
|
if (t)
|
@@ -443,22 +443,22 @@ function $t(n, e = window) {
|
|
443
443
|
return s?.mock(o);
|
444
444
|
};
|
445
445
|
}
|
446
|
-
function
|
446
|
+
function Et(n, e) {
|
447
447
|
if (!e.mock) return;
|
448
448
|
const { url: t, mockTemplate: s } = e;
|
449
449
|
if (t && s) {
|
450
|
-
const r = Ue(`${t}(.*)`), o = Le(t, { decode: decodeURIComponent }), a =
|
450
|
+
const r = Ue(`${t}(.*)`), o = Le(t, { decode: decodeURIComponent }), a = M(s, {}, !0);
|
451
451
|
n.mock(r, (i) => {
|
452
452
|
const c = R.parse(i.url) || {}, l = i.body instanceof FormData ? qe(i.body) : i.body, f = o(i.url)?.params;
|
453
453
|
return Object.assign(i, { data: l, params: c, query: f }), n.mock(a(i));
|
454
454
|
});
|
455
455
|
}
|
456
456
|
}
|
457
|
-
function
|
458
|
-
const e =
|
457
|
+
function $e(n = window) {
|
458
|
+
const e = C(n);
|
459
459
|
e && (e._mocked = {});
|
460
460
|
}
|
461
|
-
class
|
461
|
+
class Rt {
|
462
462
|
__id = null;
|
463
463
|
__mode;
|
464
464
|
__instance = null;
|
@@ -487,7 +487,7 @@ class Et {
|
|
487
487
|
const { mode: t, dsl: s, attrs: r } = e;
|
488
488
|
this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
|
489
489
|
}
|
490
|
-
setup(e, t =
|
490
|
+
setup(e, t = N) {
|
491
491
|
const s = t.getCurrentInstance();
|
492
492
|
if (!s) return;
|
493
493
|
this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
|
@@ -525,9 +525,9 @@ class Et {
|
|
525
525
|
if (e)
|
526
526
|
if (this.__mode === y.Runtime) {
|
527
527
|
const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
|
528
|
-
return
|
528
|
+
return M({ type: s, value: r }, this);
|
529
529
|
} else
|
530
|
-
return
|
530
|
+
return M(e, this);
|
531
531
|
}
|
532
532
|
__ref(e = null, t) {
|
533
533
|
if (this.__mode !== y.VNode)
|
@@ -559,7 +559,7 @@ class Et {
|
|
559
559
|
}
|
560
560
|
function Y(n) {
|
561
561
|
const {
|
562
|
-
Vue: e =
|
562
|
+
Vue: e = N,
|
563
563
|
mode: t = y.Runtime,
|
564
564
|
components: s = {},
|
565
565
|
libs: r = {},
|
@@ -569,22 +569,22 @@ function Y(n) {
|
|
569
569
|
$components: s,
|
570
570
|
$libs: r,
|
571
571
|
$apis: o
|
572
|
-
}, l = new
|
572
|
+
}, l = new Rt({
|
573
573
|
mode: t,
|
574
574
|
dsl: i.value,
|
575
575
|
attrs: c
|
576
576
|
}), f = e.defineComponent({
|
577
577
|
name: i.value.name,
|
578
578
|
props: {
|
579
|
-
...
|
579
|
+
...xt(i.value.props ?? [], l)
|
580
580
|
},
|
581
581
|
setup(u) {
|
582
|
-
l.$props = u, l.props = u, i.value.id &&
|
582
|
+
l.$props = u, l.props = u, i.value.id && be(
|
583
583
|
n.window || window,
|
584
584
|
i.value.id,
|
585
585
|
i.value.css || ""
|
586
|
-
), l.state =
|
587
|
-
const d =
|
586
|
+
), l.state = Ct(e, i.value.state ?? {}, l);
|
587
|
+
const d = Mt(e, i.value.computed ?? {}, l), h = At(i.value.methods ?? {}, l), m = Ft(e, i.value.inject, l), p = Tt(
|
588
588
|
i.value.dataSources || {},
|
589
589
|
l
|
590
590
|
), w = {
|
@@ -593,29 +593,29 @@ function Y(n) {
|
|
593
593
|
...h,
|
594
594
|
...p
|
595
595
|
};
|
596
|
-
return l.setup(w, e),
|
596
|
+
return l.setup(w, e), It(e, i.value.watch ?? [], l), {
|
597
597
|
vtj: l
|
598
598
|
};
|
599
599
|
},
|
600
|
-
emits:
|
600
|
+
emits: Pt(i.value.emits),
|
601
601
|
expose: ["vtj"],
|
602
602
|
render() {
|
603
603
|
if (!i.value.nodes) return null;
|
604
604
|
const u = i.value.nodes || [];
|
605
605
|
return u.length === 1 ? O(u[0], l, e, a) : u.map((d) => O(d, l, e, a));
|
606
606
|
},
|
607
|
-
...
|
607
|
+
...Dt(i.value.lifeCycles ?? {}, l)
|
608
608
|
});
|
609
609
|
return {
|
610
610
|
renderer: e.markRaw(f),
|
611
611
|
context: l
|
612
612
|
};
|
613
613
|
}
|
614
|
-
function
|
614
|
+
function Pt(n = []) {
|
615
615
|
return n.map((e) => j(e) ? e : e.name);
|
616
616
|
}
|
617
|
-
function
|
618
|
-
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) =>
|
617
|
+
function xt(n = [], e) {
|
618
|
+
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => ot[o]) : void 0;
|
619
619
|
return n.map((s) => j(s) ? {
|
620
620
|
name: s
|
621
621
|
} : {
|
@@ -632,30 +632,30 @@ function Pt(n = [], e) {
|
|
632
632
|
{}
|
633
633
|
);
|
634
634
|
}
|
635
|
-
function
|
635
|
+
function Ct(n, e, t) {
|
636
636
|
return n.reactive(
|
637
637
|
Object.keys(e || {}).reduce(
|
638
638
|
(s, r) => {
|
639
639
|
let o = e[r];
|
640
|
-
return _(o) ? o = t.__parseExpression(o) :
|
640
|
+
return _(o) ? o = t.__parseExpression(o) : A(o) && (o = t.__parseFunction(o)), s[r] = o, s;
|
641
641
|
},
|
642
642
|
{}
|
643
643
|
)
|
644
644
|
);
|
645
645
|
}
|
646
|
-
function
|
646
|
+
function Mt(n, e, t) {
|
647
647
|
return Object.entries(e ?? {}).reduce(
|
648
648
|
(s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
|
649
649
|
{}
|
650
650
|
);
|
651
651
|
}
|
652
|
-
function
|
652
|
+
function At(n, e) {
|
653
653
|
return Object.entries(n ?? {}).reduce(
|
654
654
|
(t, [s, r]) => (t[s] = e.__parseFunction(r), t),
|
655
655
|
{}
|
656
656
|
);
|
657
657
|
}
|
658
|
-
function
|
658
|
+
function Ft(n, e = [], t) {
|
659
659
|
return e.reduce(
|
660
660
|
(s, r) => {
|
661
661
|
const { name: o, from: a } = r || {};
|
@@ -666,14 +666,14 @@ function At(n, e = [], t) {
|
|
666
666
|
{}
|
667
667
|
);
|
668
668
|
}
|
669
|
-
function
|
669
|
+
function Tt(n, e) {
|
670
670
|
return Object.keys(n).reduce(
|
671
671
|
(t, s) => {
|
672
672
|
const r = n[s];
|
673
673
|
if (r.type === "mock")
|
674
|
-
t[s] =
|
674
|
+
t[s] = kt(r);
|
675
675
|
else if (r.ref) {
|
676
|
-
const o = e.$apis[r.ref], a =
|
676
|
+
const o = e.$apis[r.ref], a = A(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
|
677
677
|
t[s] = async (...i) => {
|
678
678
|
const c = await o.apply(e, i);
|
679
679
|
return a ? a(c) : c;
|
@@ -684,7 +684,7 @@ function Ft(n, e) {
|
|
684
684
|
{}
|
685
685
|
);
|
686
686
|
}
|
687
|
-
function
|
687
|
+
function It(n, e = [], t) {
|
688
688
|
e.forEach((s) => {
|
689
689
|
n.watch(
|
690
690
|
t.__parseExpression(s.source),
|
@@ -696,19 +696,19 @@ function Tt(n, e = [], t) {
|
|
696
696
|
);
|
697
697
|
});
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function Dt(n, e) {
|
700
700
|
return Object.entries(n ?? {}).reduce(
|
701
701
|
(t, [s, r]) => (t[s] = e.__parseFunction(r), t),
|
702
702
|
{}
|
703
703
|
);
|
704
704
|
}
|
705
705
|
let z = [], E = {};
|
706
|
-
const
|
707
|
-
async function
|
706
|
+
const Ht = (n) => n;
|
707
|
+
async function ke(n, e = window) {
|
708
708
|
const { urls: t = [], library: s } = n, r = t.filter((i) => ne(i));
|
709
709
|
if (r.length === 0 || !s) return null;
|
710
710
|
const o = t.filter((i) => se(i));
|
711
|
-
return o.length &&
|
711
|
+
return o.length && ft(o, e), await ht(r, s, e).catch(
|
712
712
|
(i) => (console.warn("loadScriptUrl error", r, s, i), null)
|
713
713
|
);
|
714
714
|
}
|
@@ -716,7 +716,7 @@ function Q(n) {
|
|
716
716
|
const { getDsl: e, getDslByUrl: t, options: s } = n;
|
717
717
|
return s.window && (z.forEach((r) => {
|
718
718
|
delete s.window[r];
|
719
|
-
}), z = []), (r, o, a =
|
719
|
+
}), z = []), (r, o, a = N) => {
|
720
720
|
if (!o || typeof o == "string") return r;
|
721
721
|
if (o.type === "Schema" && o.id) {
|
722
722
|
let i = E[o.id];
|
@@ -748,7 +748,7 @@ function Q(n) {
|
|
748
748
|
let i = o.library ? E[o.library] : null;
|
749
749
|
return i || (o.library && z.push(o.library), i = E[o.library || Symbol()] = a.defineAsyncComponent(
|
750
750
|
async () => {
|
751
|
-
const c = await
|
751
|
+
const c = await ke(o, s.window);
|
752
752
|
return c || (console.warn("getPlugin result is null", o), null);
|
753
753
|
}
|
754
754
|
), i);
|
@@ -756,44 +756,44 @@ function Q(n) {
|
|
756
756
|
return r;
|
757
757
|
};
|
758
758
|
}
|
759
|
-
function
|
759
|
+
function Fs() {
|
760
760
|
E = {};
|
761
761
|
}
|
762
|
-
function O(n, e, t =
|
762
|
+
function O(n, e, t = N, s = Ht) {
|
763
763
|
if (!n || !n.name || n.invisible) return null;
|
764
|
-
const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = n, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } =
|
764
|
+
const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = n, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Nt(a);
|
765
765
|
if (i && !Bt(i, e))
|
766
766
|
return null;
|
767
767
|
const m = (p) => {
|
768
768
|
const w = p.$components, g = (() => {
|
769
769
|
if (n.name === "component")
|
770
|
-
return
|
770
|
+
return Ut(p, n.props?.is);
|
771
771
|
if (n.name === "slot") return n.name;
|
772
772
|
const b = s(n.name, n.from, t);
|
773
|
-
return j(b) ?
|
774
|
-
})(), S =
|
773
|
+
return j(b) ? gt(b) || vt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
|
774
|
+
})(), S = Lt(o, n.props ?? {}, p), Te = qt(t, n.events ?? {}, p);
|
775
775
|
if (n.name === "slot")
|
776
|
-
return
|
776
|
+
return Jt(t, n, S, p, s);
|
777
777
|
u && Object.assign(S, p.__parseExpression(u.value)), l && (S.style = Object.assign(
|
778
778
|
S.style ?? {},
|
779
|
-
|
780
|
-
)), d && Object.assign(S,
|
781
|
-
Object.assign(S,
|
779
|
+
Vt(l, p)
|
780
|
+
)), d && Object.assign(S, Kt(d, p)), f.forEach((b) => {
|
781
|
+
Object.assign(S, Wt(t, b, p));
|
782
782
|
});
|
783
|
-
const Ie =
|
783
|
+
const Ie = Gt(
|
784
784
|
t,
|
785
785
|
n.children ?? [],
|
786
786
|
p,
|
787
787
|
s,
|
788
788
|
n
|
789
789
|
);
|
790
|
-
let
|
791
|
-
const oe = r ?
|
792
|
-
return oe.length && (
|
790
|
+
let B = t.createVNode(g, { ...S, ...Te }, Ie);
|
791
|
+
const oe = r ? Ot(r, h, p) : [];
|
792
|
+
return oe.length && (B = t.withDirectives(B, oe)), B;
|
793
793
|
};
|
794
|
-
return c ?
|
794
|
+
return c ? Xt(c, m, e) : m(e);
|
795
795
|
}
|
796
|
-
function
|
796
|
+
function Ot(n, e, t) {
|
797
797
|
const s = n.app;
|
798
798
|
return e.map((r) => {
|
799
799
|
const o = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
|
@@ -802,11 +802,11 @@ function Ht(n, e, t) {
|
|
802
802
|
return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
|
803
803
|
}).filter((r) => !!r);
|
804
804
|
}
|
805
|
-
function
|
805
|
+
function Nt(n = []) {
|
806
806
|
const e = n.find((c) => $(c.name) === "vIf"), t = n.find((c) => $(c.name) === "vFor"), s = n.find((c) => $(c.name) === "vShow"), r = n.find((c) => $(c.name) === "vBind"), o = n.find((c) => $(c.name) === "vHtml"), a = n.filter(
|
807
807
|
(c) => $(c.name) === "vModel"
|
808
808
|
), i = n.filter(
|
809
|
-
(c) => !
|
809
|
+
(c) => !rt.includes($(c.name))
|
810
810
|
);
|
811
811
|
return {
|
812
812
|
vIf: e,
|
@@ -821,15 +821,15 @@ function Ot(n = []) {
|
|
821
821
|
function Bt(n, e) {
|
822
822
|
return !!e.__parseExpression(n.value);
|
823
823
|
}
|
824
|
-
function
|
824
|
+
function Ut(n, e) {
|
825
825
|
return e ? _(e) ? n.__parseExpression(e) : e : "div";
|
826
826
|
}
|
827
|
-
function
|
827
|
+
function Lt(n, e, t) {
|
828
828
|
const s = X(e, t);
|
829
829
|
return s.ref = t.__ref(n, s.ref), s;
|
830
830
|
}
|
831
831
|
function X(n, e) {
|
832
|
-
return _(n) ? e.__parseExpression(n) :
|
832
|
+
return _(n) ? e.__parseExpression(n) : A(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => X(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
|
833
833
|
(t, s) => {
|
834
834
|
let r = n[s];
|
835
835
|
return t[s] = X(r, e), t;
|
@@ -837,7 +837,7 @@ function X(n, e) {
|
|
837
837
|
{}
|
838
838
|
) : n;
|
839
839
|
}
|
840
|
-
function
|
840
|
+
function qt(n, e, t) {
|
841
841
|
const s = ["passive", "capture", "once"], r = {
|
842
842
|
capture: "Capture",
|
843
843
|
once: "Once",
|
@@ -845,48 +845,48 @@ function Lt(n, e, t) {
|
|
845
845
|
};
|
846
846
|
return Object.keys(e || {}).reduce(
|
847
847
|
(o, a) => {
|
848
|
-
const i = e[a], c =
|
848
|
+
const i = e[a], c = Ee(i.modifiers), l = c.find((d) => s.includes(d)), f = "on" + Je(a) + (l && r[l] || ""), u = t.__parseFunction(i.handler);
|
849
849
|
return u && (o[f] = n.withModifiers(u, c)), o;
|
850
850
|
},
|
851
851
|
{}
|
852
852
|
);
|
853
853
|
}
|
854
|
-
function
|
854
|
+
function Ee(n = {}, e = !1) {
|
855
855
|
const t = Object.keys(n);
|
856
856
|
return e ? t.map((s) => "." + s) : t;
|
857
857
|
}
|
858
|
-
function
|
859
|
-
const { children: o } = e, a =
|
858
|
+
function Jt(n, e, t, s, r) {
|
859
|
+
const { children: o } = e, a = zt(e, s), i = s.$slots?.[a.name];
|
860
860
|
return i ? i(t) : o ? j(o) ? n.createTextVNode(o) : _(o) ? n.createTextVNode(
|
861
|
-
|
861
|
+
Se(s.__parseExpression(o))
|
862
862
|
) : Array.isArray(o) ? o.map(
|
863
863
|
(c) => O(c, s, n, r)
|
864
864
|
) : null : null;
|
865
865
|
}
|
866
|
-
function
|
866
|
+
function zt(n, e) {
|
867
867
|
const { props: t } = n, s = t?.name || "default";
|
868
868
|
return {
|
869
869
|
name: _(s) ? e.__parseExpression(s) : s,
|
870
870
|
params: []
|
871
871
|
};
|
872
872
|
}
|
873
|
-
function
|
873
|
+
function Vt(n, e) {
|
874
874
|
return e.__parseExpression(n.value) ? {} : {
|
875
875
|
display: "none"
|
876
876
|
};
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function Kt(n, e) {
|
879
879
|
return {
|
880
880
|
innerHTML: e.__parseExpression(n.value) || ""
|
881
881
|
};
|
882
882
|
}
|
883
|
-
function
|
883
|
+
function Wt(n, e, t) {
|
884
884
|
const s = {
|
885
885
|
type: "JSFunction",
|
886
886
|
value: e.value?.value ? `(v) => {
|
887
887
|
${e.value.value} = v;
|
888
888
|
}` : "(v) => {}"
|
889
|
-
}, r = t.__parseFunction(s), o =
|
889
|
+
}, r = t.__parseFunction(s), o = Ee(
|
890
890
|
_(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
|
891
891
|
), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
|
892
892
|
return {
|
@@ -894,16 +894,16 @@ function Kt(n, e, t) {
|
|
894
894
|
[`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
|
895
895
|
};
|
896
896
|
}
|
897
|
-
function
|
897
|
+
function Gt(n, e, t, s, r) {
|
898
898
|
if (!e) return null;
|
899
899
|
if (j(e))
|
900
900
|
return { default: () => e };
|
901
901
|
if (_(e))
|
902
902
|
return {
|
903
|
-
default: () =>
|
903
|
+
default: () => Se(t.__parseExpression(e))
|
904
904
|
};
|
905
905
|
if (Array.isArray(e) && e.length > 0) {
|
906
|
-
const o =
|
906
|
+
const o = Yt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
|
907
907
|
[`scope_${r.id}`]: i
|
908
908
|
} : {};
|
909
909
|
return Object.entries(o).reduce((i, [c, { nodes: l, params: f }]) => (i[c] = (u) => {
|
@@ -915,7 +915,7 @@ function Wt(n, e, t, s, r) {
|
|
915
915
|
}
|
916
916
|
return null;
|
917
917
|
}
|
918
|
-
function
|
918
|
+
function Yt(n) {
|
919
919
|
const e = {
|
920
920
|
default: {
|
921
921
|
params: [],
|
@@ -923,7 +923,7 @@ function Gt(n) {
|
|
923
923
|
}
|
924
924
|
};
|
925
925
|
for (const t of n) {
|
926
|
-
const s =
|
926
|
+
const s = Qt(t.slot), r = s.name;
|
927
927
|
e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
|
928
928
|
nodes: [t],
|
929
929
|
params: s.params
|
@@ -931,61 +931,55 @@ function Gt(n) {
|
|
931
931
|
}
|
932
932
|
return e;
|
933
933
|
}
|
934
|
-
function
|
934
|
+
function Qt(n = "default") {
|
935
935
|
return j(n) ? { name: n, params: [] } : { params: [], ...n };
|
936
936
|
}
|
937
|
-
function
|
937
|
+
function Xt(n, e, t) {
|
938
938
|
const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
|
939
939
|
let i = t.__parseExpression(s) || [];
|
940
940
|
return Number.isInteger(i) && (i = new Array(i).fill(!0).map((c, l) => l + 1)), Array.isArray(i) ? i.map((c, l) => e(t.__clone({ [o]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
|
941
941
|
}
|
942
|
-
function
|
943
|
-
return
|
942
|
+
function Re(n) {
|
943
|
+
return Ye() ? (Qe(n), !0) : !1;
|
944
944
|
}
|
945
945
|
const Pe = typeof window < "u" && typeof document < "u";
|
946
946
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
947
947
|
const Zt = (n) => n != null, es = () => {
|
948
948
|
};
|
949
949
|
function ts(n) {
|
950
|
-
return ve();
|
951
|
-
}
|
952
|
-
function ss(n) {
|
953
950
|
return Array.isArray(n) ? n : [n];
|
954
951
|
}
|
955
|
-
function
|
952
|
+
function ss(...n) {
|
956
953
|
if (n.length !== 1)
|
957
954
|
return Ke(...n);
|
958
955
|
const e = n[0];
|
959
|
-
return typeof e == "function" ? We(Ge(() => ({ get: e, set: es }))) :
|
960
|
-
}
|
961
|
-
function rs(n, e) {
|
962
|
-
ts() && Ye(n, e);
|
956
|
+
return typeof e == "function" ? We(Ge(() => ({ get: e, set: es }))) : H(e);
|
963
957
|
}
|
964
|
-
const
|
965
|
-
function
|
958
|
+
const ns = Pe ? window : void 0, rs = Pe ? window.document : void 0;
|
959
|
+
function os(n) {
|
966
960
|
var e;
|
967
961
|
const t = ee(n);
|
968
962
|
return (e = t?.$el) != null ? e : t;
|
969
963
|
}
|
970
|
-
function
|
971
|
-
const n =
|
972
|
-
return e &&
|
964
|
+
function is() {
|
965
|
+
const n = Xe(!1), e = Ze();
|
966
|
+
return e && et(() => {
|
973
967
|
n.value = !0;
|
974
968
|
}, e), n;
|
975
969
|
}
|
976
|
-
function
|
977
|
-
const e =
|
978
|
-
return
|
970
|
+
function as(n) {
|
971
|
+
const e = is();
|
972
|
+
return ye(() => (e.value, !!n()));
|
979
973
|
}
|
980
|
-
function
|
981
|
-
const { window: s =
|
974
|
+
function cs(n, e, t = {}) {
|
975
|
+
const { window: s = ns, ...r } = t;
|
982
976
|
let o;
|
983
|
-
const a =
|
977
|
+
const a = as(() => s && "MutationObserver" in s), i = () => {
|
984
978
|
o && (o.disconnect(), o = void 0);
|
985
|
-
}, c =
|
986
|
-
const d = ee(n), h =
|
979
|
+
}, c = ye(() => {
|
980
|
+
const d = ee(n), h = ts(d).map(os).filter(Zt);
|
987
981
|
return new Set(h);
|
988
|
-
}), l =
|
982
|
+
}), l = ve(
|
989
983
|
() => c.value,
|
990
984
|
(d) => {
|
991
985
|
i(), a.value && d.size && (o = new MutationObserver(e), d.forEach((h) => o.observe(h, r)));
|
@@ -994,37 +988,37 @@ function us(n, e, t = {}) {
|
|
994
988
|
), f = () => o?.takeRecords(), u = () => {
|
995
989
|
l(), i();
|
996
990
|
};
|
997
|
-
return
|
991
|
+
return Re(u), {
|
998
992
|
isSupported: a,
|
999
993
|
stop: u,
|
1000
994
|
takeRecords: f
|
1001
995
|
};
|
1002
996
|
}
|
1003
|
-
function
|
997
|
+
function ls(n = null, e = {}) {
|
1004
998
|
var t, s, r;
|
1005
999
|
const {
|
1006
|
-
document: o =
|
1000
|
+
document: o = rs,
|
1007
1001
|
restoreOnUnmount: a = (u) => u
|
1008
|
-
} = e, i = (t = o?.title) != null ? t : "", c =
|
1002
|
+
} = e, i = (t = o?.title) != null ? t : "", c = ss((s = n ?? o?.title) != null ? s : null), l = !!(n && typeof n == "function");
|
1009
1003
|
function f(u) {
|
1010
1004
|
if (!("titleTemplate" in e))
|
1011
1005
|
return u;
|
1012
1006
|
const d = e.titleTemplate || "%s";
|
1013
1007
|
return typeof d == "function" ? d(u) : ee(d).replace(/%s/g, u);
|
1014
1008
|
}
|
1015
|
-
return
|
1009
|
+
return ve(
|
1016
1010
|
c,
|
1017
1011
|
(u, d) => {
|
1018
1012
|
u !== d && o && (o.title = f(u ?? ""));
|
1019
1013
|
},
|
1020
1014
|
{ immediate: !0 }
|
1021
|
-
), e.observe && !e.titleTemplate && o && !l &&
|
1015
|
+
), e.observe && !e.titleTemplate && o && !l && cs(
|
1022
1016
|
(r = o.head) == null ? void 0 : r.querySelector("title"),
|
1023
1017
|
() => {
|
1024
1018
|
o && o.title !== c.value && (c.value = f(o.title));
|
1025
1019
|
},
|
1026
1020
|
{ childList: !0 }
|
1027
|
-
),
|
1021
|
+
), Re(() => {
|
1028
1022
|
if (a) {
|
1029
1023
|
const u = a(i, c.value || "");
|
1030
1024
|
u != null && o && (o.title = u);
|
@@ -1034,8 +1028,8 @@ function ds(n = null, e = {}) {
|
|
1034
1028
|
const de = te({
|
1035
1029
|
name: "VtjPageContainer",
|
1036
1030
|
async setup() {
|
1037
|
-
const n = Ce(), e =
|
1038
|
-
return s && (Object.assign(e.meta, s.meta || {}, { cache: s.cache }),
|
1031
|
+
const n = Ce(), e = _e(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = H(Symbol());
|
1032
|
+
return s && (Object.assign(e.meta, s.meta || {}, { cache: s.cache }), ls(s.title || "VTJ")), {
|
1039
1033
|
provider: n,
|
1040
1034
|
component: r,
|
1041
1035
|
file: s,
|
@@ -1052,25 +1046,25 @@ const de = te({
|
|
1052
1046
|
activated() {
|
1053
1047
|
this.meta.cache === !1 && (this.sid = Symbol());
|
1054
1048
|
}
|
1055
|
-
}),
|
1049
|
+
}), us = {
|
1056
1050
|
"data-l-h6o7ki7": "",
|
1057
1051
|
class: "vtj-startup__wrapper"
|
1058
|
-
},
|
1052
|
+
}, ds = {
|
1059
1053
|
"data-l-h6o7ki7": "",
|
1060
1054
|
class: "vtj-startup"
|
1061
|
-
},
|
1055
|
+
}, ps = {
|
1062
1056
|
"data-l-h6o7ki7": "",
|
1063
1057
|
class: "vtj-startup__name"
|
1064
|
-
},
|
1058
|
+
}, fs = {
|
1065
1059
|
"data-l-h6o7ki7": "",
|
1066
1060
|
class: "span"
|
1067
|
-
},
|
1061
|
+
}, hs = {
|
1068
1062
|
"data-l-h6o7ki7": "",
|
1069
1063
|
class: "vtj-startup__tagline"
|
1070
|
-
},
|
1064
|
+
}, ms = {
|
1071
1065
|
"data-l-h6o7ki7": "",
|
1072
1066
|
class: "vtj-startup__actions"
|
1073
|
-
},
|
1067
|
+
}, gs = /* @__PURE__ */ te({
|
1074
1068
|
__name: "Startup",
|
1075
1069
|
props: {
|
1076
1070
|
name: { default: "VTJ.PRO" },
|
@@ -1174,13 +1168,13 @@ const de = te({
|
|
1174
1168
|
window.location.href = o;
|
1175
1169
|
}
|
1176
1170
|
};
|
1177
|
-
return (r, o) => (
|
1178
|
-
k("div",
|
1179
|
-
k("h1",
|
1180
|
-
k("span",
|
1171
|
+
return (r, o) => (st(), tt("div", us, [
|
1172
|
+
k("div", ds, [
|
1173
|
+
k("h1", ps, [
|
1174
|
+
k("span", fs, q(t.name), 1)
|
1181
1175
|
]),
|
1182
|
-
k("div",
|
1183
|
-
k("div",
|
1176
|
+
k("div", hs, q(t.tagline), 1),
|
1177
|
+
k("div", ms, [
|
1184
1178
|
o[0] || (o[0] = k("span", {
|
1185
1179
|
"data-l-h6o7ki7": "",
|
1186
1180
|
class: "span"
|
@@ -1194,14 +1188,14 @@ const de = te({
|
|
1194
1188
|
])
|
1195
1189
|
]));
|
1196
1190
|
}
|
1197
|
-
}),
|
1191
|
+
}), vs = te({
|
1198
1192
|
name: "VtjStartupContainer",
|
1199
1193
|
render() {
|
1200
|
-
return W(
|
1194
|
+
return W(gs);
|
1201
1195
|
}
|
1202
1196
|
}), xe = Symbol("Provider");
|
1203
|
-
var
|
1204
|
-
class
|
1197
|
+
var ys = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ys || {});
|
1198
|
+
class _s extends De {
|
1205
1199
|
constructor(e) {
|
1206
1200
|
super(), this.options = e;
|
1207
1201
|
const {
|
@@ -1246,7 +1240,7 @@ class Ss extends De {
|
|
1246
1240
|
} catch (o) {
|
1247
1241
|
P.warn("模拟数据模版异常", o);
|
1248
1242
|
}
|
1249
|
-
return
|
1243
|
+
return C()?.mock(s);
|
1250
1244
|
};
|
1251
1245
|
}
|
1252
1246
|
async load(e) {
|
@@ -1254,10 +1248,10 @@ class Ss extends De {
|
|
1254
1248
|
if (this.project = t ? await t() : await this.service.init(e), !this.project)
|
1255
1249
|
throw new Error("project is null");
|
1256
1250
|
const { apis: s = [], meta: r = [] } = this.project, o = window;
|
1257
|
-
o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis =
|
1251
|
+
o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = jt(s, r, this.adapter), $e(o), $t(s, o), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
1258
1252
|
}
|
1259
1253
|
initMock(e) {
|
1260
|
-
const t =
|
1254
|
+
const t = C(e);
|
1261
1255
|
t && t.setup({
|
1262
1256
|
timeout: "50-500"
|
1263
1257
|
});
|
@@ -1274,7 +1268,7 @@ class Ss extends De {
|
|
1274
1268
|
materials: f,
|
1275
1269
|
materialExports: u,
|
1276
1270
|
materialMapLibrary: d
|
1277
|
-
} =
|
1271
|
+
} = ut(
|
1278
1272
|
t,
|
1279
1273
|
a,
|
1280
1274
|
i === "development"
|
@@ -1289,7 +1283,7 @@ class Ss extends De {
|
|
1289
1283
|
else {
|
1290
1284
|
const w = l[h] || [];
|
1291
1285
|
for (const g of w)
|
1292
|
-
se(g) && await
|
1286
|
+
se(g) && await pt(h, R.append(g, { v: J })), ne(g) && await ce(R.append(g, { v: J }));
|
1293
1287
|
r[h] = e[h];
|
1294
1288
|
}
|
1295
1289
|
}
|
@@ -1306,7 +1300,7 @@ class Ss extends De {
|
|
1306
1300
|
else {
|
1307
1301
|
const g = h[m] ? (await h[m]()).default : e[m];
|
1308
1302
|
g && p && (g.components || []).forEach((S) => {
|
1309
|
-
o[S.name] =
|
1303
|
+
o[S.name] = dt(S, p);
|
1310
1304
|
});
|
1311
1305
|
}
|
1312
1306
|
}
|
@@ -1325,16 +1319,16 @@ class Ss extends De {
|
|
1325
1319
|
component: de
|
1326
1320
|
}, u = {
|
1327
1321
|
path: l,
|
1328
|
-
name:
|
1329
|
-
component: t?.homepage ? de : r.startupComponent ||
|
1322
|
+
name: I,
|
1323
|
+
component: t?.homepage ? de : r.startupComponent || vs,
|
1330
1324
|
meta: c
|
1331
1325
|
};
|
1332
|
-
e.hasRoute(x) && e.removeRoute(x), e.hasRoute(
|
1326
|
+
e.hasRoute(x) && e.removeRoute(x), e.hasRoute(I) && e.removeRoute(I), a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
|
1333
1327
|
}
|
1334
1328
|
install(e) {
|
1335
1329
|
const t = e.config.globalProperties.installed || {};
|
1336
1330
|
for (const [s, r] of Object.entries(this.library))
|
1337
|
-
!t[s] &&
|
1331
|
+
!t[s] && mt(r) && (e.use(r), t[s] = !0);
|
1338
1332
|
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(xe, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, r, o) => {
|
1339
1333
|
const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${i} ${o}`;
|
1340
1334
|
console.error(
|
@@ -1423,11 +1417,11 @@ class Ss extends De {
|
|
1423
1417
|
});
|
1424
1418
|
}
|
1425
1419
|
definePluginComponent(e) {
|
1426
|
-
return le(async () => await
|
1420
|
+
return le(async () => await ke(e, window));
|
1427
1421
|
}
|
1428
1422
|
}
|
1429
|
-
function
|
1430
|
-
const e = new
|
1423
|
+
function Ts(n) {
|
1424
|
+
const e = new _s(n);
|
1431
1425
|
return {
|
1432
1426
|
provider: e,
|
1433
1427
|
onReady: (s) => e.ready(s)
|
@@ -1456,7 +1450,7 @@ const Me = {
|
|
1456
1450
|
originResponse: !1,
|
1457
1451
|
failMessage: !0,
|
1458
1452
|
validate: (n) => n.data?.code === 0
|
1459
|
-
},
|
1453
|
+
}, ws = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
|
1460
1454
|
url: e,
|
1461
1455
|
method: "post",
|
1462
1456
|
params: { type: t },
|
@@ -1466,7 +1460,7 @@ const Me = {
|
|
1466
1460
|
data: s
|
1467
1461
|
},
|
1468
1462
|
settings: Me
|
1469
|
-
}),
|
1463
|
+
}), Ss = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
|
1470
1464
|
url: e,
|
1471
1465
|
method: "post",
|
1472
1466
|
data: {
|
@@ -1478,7 +1472,7 @@ const Me = {
|
|
1478
1472
|
type: "data"
|
1479
1473
|
}
|
1480
1474
|
}).then((r) => r && r[0] ? r[0] : null).catch(() => null);
|
1481
|
-
function
|
1475
|
+
function Is(n) {
|
1482
1476
|
return he({
|
1483
1477
|
settings: {
|
1484
1478
|
type: "json",
|
@@ -1497,7 +1491,7 @@ class re {
|
|
1497
1491
|
pluginCaches = {};
|
1498
1492
|
uploader;
|
1499
1493
|
constructor(e = K) {
|
1500
|
-
this.api =
|
1494
|
+
this.api = ws(e), this.uploader = Ss(e);
|
1501
1495
|
}
|
1502
1496
|
async getExtension() {
|
1503
1497
|
console.log("BaseService.getExtension");
|
@@ -1572,7 +1566,7 @@ class re {
|
|
1572
1566
|
return await this.api("clearStaticFiles", e).catch(() => "");
|
1573
1567
|
}
|
1574
1568
|
async getPluginMaterial(e) {
|
1575
|
-
const { urls: t = [] } = e, s = t.filter((o) =>
|
1569
|
+
const { urls: t = [] } = e, s = t.filter((o) => ct(o))[0];
|
1576
1570
|
if (!s) return null;
|
1577
1571
|
const r = this.pluginCaches[s];
|
1578
1572
|
return r || (this.pluginCaches[s] = K.send({
|
@@ -1593,13 +1587,13 @@ const v = new Ve({
|
|
1593
1587
|
expired: 0,
|
1594
1588
|
prefix: "__VTJ_"
|
1595
1589
|
});
|
1596
|
-
class
|
1590
|
+
class Ds extends re {
|
1597
1591
|
init(e) {
|
1598
|
-
const t = new
|
1592
|
+
const t = new D(e), s = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
|
1599
1593
|
return v.save(`project_${t.id}`, r), Promise.resolve(r);
|
1600
1594
|
}
|
1601
1595
|
saveProject(e) {
|
1602
|
-
const t = new
|
1596
|
+
const t = new D(e);
|
1603
1597
|
return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
|
1604
1598
|
}
|
1605
1599
|
saveMaterials(e, t) {
|
@@ -1643,18 +1637,18 @@ class Os extends re {
|
|
1643
1637
|
}), Promise.resolve(!0);
|
1644
1638
|
}
|
1645
1639
|
}
|
1646
|
-
class
|
1640
|
+
class bs extends re {
|
1647
1641
|
projects = {};
|
1648
1642
|
materials = {};
|
1649
1643
|
files = {};
|
1650
1644
|
histories = {};
|
1651
1645
|
historyItems = {};
|
1652
1646
|
init(e) {
|
1653
|
-
const t = new
|
1647
|
+
const t = new D(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
|
1654
1648
|
return this.projects[r.id] = r, Promise.resolve(r);
|
1655
1649
|
}
|
1656
1650
|
saveProject(e) {
|
1657
|
-
const t = new
|
1651
|
+
const t = new D(e);
|
1658
1652
|
return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
|
1659
1653
|
}
|
1660
1654
|
saveMaterials(e, t) {
|
@@ -1700,11 +1694,11 @@ class $s extends re {
|
|
1700
1694
|
}), Promise.resolve(!0);
|
1701
1695
|
}
|
1702
1696
|
}
|
1703
|
-
let
|
1704
|
-
function
|
1705
|
-
return
|
1697
|
+
let T = null;
|
1698
|
+
function Hs() {
|
1699
|
+
return T || (T = new bs(), T);
|
1706
1700
|
}
|
1707
|
-
class
|
1701
|
+
class Os extends re {
|
1708
1702
|
getFileCaches = {};
|
1709
1703
|
async getExtension() {
|
1710
1704
|
return await this.api("getExtension", {}).catch(() => {
|
@@ -1785,18 +1779,18 @@ function Fe(n, e) {
|
|
1785
1779
|
e.can(s.id.toString()) && t.push(s);
|
1786
1780
|
return t;
|
1787
1781
|
}
|
1788
|
-
function
|
1782
|
+
function Ns(n) {
|
1789
1783
|
const {
|
1790
1784
|
menuPathPrefix: e = "",
|
1791
1785
|
pageRouteName: t = "page",
|
1792
1786
|
disableMenusFilter: s = !1
|
1793
|
-
} = n || {}, r = Ce(), o =
|
1794
|
-
|
1787
|
+
} = n || {}, r = Ce(), o = _e(), a = wt(), i = H(!1), c = H(!1), l = r.project;
|
1788
|
+
nt(() => {
|
1795
1789
|
const { name: d, params: h, meta: m } = o;
|
1796
1790
|
if (d === x) {
|
1797
1791
|
const p = r.getPage(h.id);
|
1798
1792
|
i.value = !p?.mask, c.value = !!p?.pure;
|
1799
|
-
} else if (d ===
|
1793
|
+
} else if (d === I) {
|
1800
1794
|
const p = r.getHomepage();
|
1801
1795
|
i.value = !p?.mask, c.value = !!p?.pure;
|
1802
1796
|
} else
|
@@ -1817,71 +1811,71 @@ function Us(n) {
|
|
1817
1811
|
};
|
1818
1812
|
}
|
1819
1813
|
export {
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1814
|
+
je as ACCESS_KEY,
|
1815
|
+
Ms as Access,
|
1816
|
+
at as BUILD_IN_TAGS,
|
1817
|
+
rt as BUILT_IN_DIRECTIVES,
|
1824
1818
|
re as BaseService,
|
1825
1819
|
ue as CONTEXT_HOST,
|
1826
|
-
|
1820
|
+
Rt as Context,
|
1827
1821
|
y as ContextMode,
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1822
|
+
ot as DATA_TYPES,
|
1823
|
+
I as HOMEPAGE_ROUTE_NAME,
|
1824
|
+
it as HTML_TAGS,
|
1825
|
+
Cs as JSCodeToString,
|
1826
|
+
Rs as LIFE_CYCLES_LIST,
|
1827
|
+
Os as LocalService,
|
1828
|
+
bs as MemoryService,
|
1829
|
+
ys as NodeEnv,
|
1836
1830
|
x as PAGE_ROUTE_NAME,
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1831
|
+
_s as Provider,
|
1832
|
+
gs as Startup,
|
1833
|
+
Ds as StorageService,
|
1834
|
+
we as VTJ_RENDERER_VERSION,
|
1835
|
+
be as adoptedStyleSheets,
|
1836
|
+
Fs as clearLoaderCache,
|
1837
|
+
As as createAdapter,
|
1838
|
+
Ps as createAssetScripts,
|
1839
|
+
xs as createAssetsCss,
|
1840
|
+
Tt as createDataSources,
|
1847
1841
|
Q as createLoader,
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1842
|
+
Hs as createMemoryService,
|
1843
|
+
bt as createMetaApi,
|
1844
|
+
kt as createMock,
|
1845
|
+
Ts as createProvider,
|
1852
1846
|
Y as createRenderer,
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1847
|
+
St as createSchemaApi,
|
1848
|
+
jt as createSchemaApis,
|
1849
|
+
Is as createServiceRequest,
|
1850
|
+
Ht as defaultLoader,
|
1851
|
+
F as fillBasePath,
|
1852
|
+
C as getMock,
|
1853
|
+
Ee as getModifiers,
|
1854
|
+
ke as getPlugin,
|
1855
|
+
dt as getRawComponent,
|
1856
|
+
gt as isBuiltInTag,
|
1863
1857
|
se as isCSSUrl,
|
1864
|
-
|
1858
|
+
yt as isJSCode,
|
1865
1859
|
_ as isJSExpression,
|
1866
|
-
|
1867
|
-
|
1860
|
+
A as isJSFunction,
|
1861
|
+
ct as isJSON,
|
1868
1862
|
ne as isJSUrl,
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1863
|
+
vt as isNativeTag,
|
1864
|
+
mt as isVuePlugin,
|
1865
|
+
pt as loadCss,
|
1866
|
+
ft as loadCssUrl,
|
1867
|
+
ht as loadScriptUrl,
|
1868
|
+
Et as mockApi,
|
1869
|
+
$t as mockApis,
|
1870
|
+
$e as mockCleanup,
|
1877
1871
|
O as nodeRender,
|
1878
|
-
|
1879
|
-
|
1872
|
+
ut as parseDeps,
|
1873
|
+
M as parseExpression,
|
1880
1874
|
G as parseFunction,
|
1881
1875
|
xe as providerKey,
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1876
|
+
lt as removeProdFlag,
|
1877
|
+
Se as toString,
|
1878
|
+
wt as useAccess,
|
1879
|
+
Ns as useMask,
|
1886
1880
|
Ce as useProvider
|
1887
1881
|
};
|