@vtj/renderer 0.10.10 → 0.10.11
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 +5 -86
- package/dist/index.mjs +640 -863
- package/package.json +5 -5
- package/types/index.d.ts +0 -1
- package/types/provider/defaults.d.ts +4 -0
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
import { Base as
|
2
|
-
import { isUrl as
|
3
|
-
import * as
|
4
|
-
import { inject as
|
5
|
-
import { useRoute as
|
1
|
+
import { Base as ke, BUILT_IN_COMPONENTS as Fe, ProjectModel as T, HistoryModel as ce } from "@vtj/core";
|
2
|
+
import { isUrl as Ae, url as P, dedupArray as Me, isString as j, isFunction as q, logger as R, storage as N, cookie as B, toArray as se, unRSA as re, delay as le, createRequest as ue, jsonp as pe, merge as Ie, pathToRegexp as He, pathToRegexpMatch as Te, formDataToJson as De, camelCase as b, upperFirst as xe, pick as Oe, request as J, loadScript as ne, Storage as Ne, mapToObject as Q } from "@vtj/utils";
|
3
|
+
import * as x from "vue";
|
4
|
+
import { inject as de, defineComponent as fe, h as K, ref as z, version as U, defineAsyncComponent as ie, watchEffect as Be } from "vue";
|
5
|
+
import { useRoute as he } 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.11
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
12
12
|
*/
|
13
|
-
const
|
14
|
-
var y = /* @__PURE__ */ ((
|
15
|
-
const
|
13
|
+
const me = "0.10.11";
|
14
|
+
var y = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(y || {});
|
15
|
+
const oe = [
|
16
16
|
"$el",
|
17
17
|
"$emit",
|
18
18
|
"$nextTick",
|
@@ -24,7 +24,7 @@ const ue = [
|
|
24
24
|
"$props",
|
25
25
|
"$options",
|
26
26
|
"$forceUpdate"
|
27
|
-
],
|
27
|
+
], zt = [
|
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
|
+
], Ue = [
|
42
42
|
"vIf",
|
43
43
|
"vShow",
|
44
44
|
"vModel",
|
45
45
|
"vFor",
|
46
46
|
"vBind",
|
47
47
|
"vHtml"
|
48
|
-
],
|
48
|
+
], Le = {
|
49
49
|
String,
|
50
50
|
Number,
|
51
51
|
Boolean,
|
@@ -53,155 +53,155 @@ const ue = [
|
|
53
53
|
Object,
|
54
54
|
Function,
|
55
55
|
Date
|
56
|
-
},
|
56
|
+
}, C = "VtjPage", H = "VtjHomepage", qe = "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
|
60
|
-
return
|
58
|
+
), Je = "component,slot".split(",");
|
59
|
+
function M(r, e) {
|
60
|
+
return r.map((t) => Ae(t) || t.startsWith("/") ? t : `${e}${t}`);
|
61
61
|
}
|
62
|
-
function
|
63
|
-
return /\.css$/.test(
|
62
|
+
function X(r) {
|
63
|
+
return /\.css$/.test(r);
|
64
64
|
}
|
65
|
-
function
|
66
|
-
return /\.js$/.test(
|
65
|
+
function Z(r) {
|
66
|
+
return /\.js$/.test(r);
|
67
67
|
}
|
68
|
-
function
|
69
|
-
return /\.json$/.test(
|
68
|
+
function Ke(r) {
|
69
|
+
return /\.json$/.test(r);
|
70
70
|
}
|
71
|
-
function
|
72
|
-
return
|
73
|
-
(e) => `<script src="${
|
71
|
+
function Vt(r) {
|
72
|
+
return r.map(
|
73
|
+
(e) => `<script src="${P.append(e, { v: me })}"><\/script>`
|
74
74
|
).join("");
|
75
75
|
}
|
76
|
-
function
|
77
|
-
return
|
78
|
-
(e) => `<link rel="stylesheet" href="${
|
76
|
+
function Wt(r = []) {
|
77
|
+
return r.map(
|
78
|
+
(e) => `<link rel="stylesheet" href="${P.append(e, { v: me })}" />`
|
79
79
|
).join("");
|
80
80
|
}
|
81
|
-
function
|
82
|
-
return e &&
|
81
|
+
function ze(r, e = !1) {
|
82
|
+
return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
|
83
83
|
}
|
84
|
-
function
|
85
|
-
const s =
|
84
|
+
function Ve(r, e, t = !1) {
|
85
|
+
const s = r.filter((m) => !!m.enabled), n = [], i = [], a = [], o = [], c = {}, l = {}, f = [], p = {};
|
86
86
|
return s.forEach(
|
87
|
-
({ urls:
|
88
|
-
|
89
|
-
|
90
|
-
}),
|
87
|
+
({ urls: m, assetsUrl: h, library: d, assetsLibrary: u, localeLibrary: w }) => {
|
88
|
+
m?.forEach((g) => {
|
89
|
+
Z(g) && n.push(ze(g, t)), X(g) && i.push(g);
|
90
|
+
}), d && (o.push(d), c[d] = M(m || [], e), w && (l[d] = w)), h && a.push(h), u && f.push(u), d && u && (p[u] = d);
|
91
91
|
}
|
92
92
|
), {
|
93
|
-
scripts:
|
94
|
-
css:
|
95
|
-
materials:
|
96
|
-
libraryExports:
|
97
|
-
materialExports:
|
98
|
-
materialMapLibrary:
|
93
|
+
scripts: M(n, e),
|
94
|
+
css: M(i, e),
|
95
|
+
materials: M(a, e),
|
96
|
+
libraryExports: o,
|
97
|
+
materialExports: Me(f),
|
98
|
+
materialMapLibrary: p,
|
99
99
|
libraryMap: c,
|
100
100
|
libraryLocaleMap: l
|
101
101
|
};
|
102
102
|
}
|
103
|
-
function
|
104
|
-
const { name: t, parent: s, alias:
|
105
|
-
return s ? e[s]?.[
|
103
|
+
function We(r, e) {
|
104
|
+
const { name: t, parent: s, alias: n } = r;
|
105
|
+
return s ? e[s]?.[n || t] : e[n || t];
|
106
106
|
}
|
107
|
-
function
|
108
|
-
return j(
|
107
|
+
function ge(r) {
|
108
|
+
return j(r) ? r : JSON.stringify(r);
|
109
109
|
}
|
110
|
-
function
|
111
|
-
const s =
|
110
|
+
function ve(r, e, t) {
|
111
|
+
const s = r.CSSStyleSheet;
|
112
112
|
if (s.prototype.replaceSync) {
|
113
|
-
const
|
114
|
-
|
115
|
-
const
|
113
|
+
const n = new s();
|
114
|
+
n.id = e, n.replaceSync(t);
|
115
|
+
const i = r.document, a = i.adoptedStyleSheets, o = Array.from(a).filter(
|
116
116
|
(c) => c.id !== e
|
117
117
|
);
|
118
|
-
|
118
|
+
i.adoptedStyleSheets = [...o, n];
|
119
119
|
} else {
|
120
|
-
const
|
121
|
-
let
|
122
|
-
|
120
|
+
const n = r.document;
|
121
|
+
let i = n.getElementById(e);
|
122
|
+
i ? i.innerHTML = t : (i = n.createElement("style"), i.id = e, i.innerHTML = t, n.head.appendChild(i));
|
123
123
|
}
|
124
124
|
}
|
125
|
-
async function
|
125
|
+
async function Ge(r, e) {
|
126
126
|
const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
|
127
|
-
t &&
|
127
|
+
t && ve(window, r, t);
|
128
128
|
}
|
129
|
-
function
|
129
|
+
function Ye(r, e = window) {
|
130
130
|
const t = e.document, s = e.document.head;
|
131
|
-
for (const
|
132
|
-
if (!t.getElementById(
|
131
|
+
for (const n of r)
|
132
|
+
if (!t.getElementById(n)) {
|
133
133
|
const a = t.createElement("link");
|
134
|
-
a.rel = "stylesheet", a.id =
|
134
|
+
a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
|
135
135
|
}
|
136
136
|
}
|
137
|
-
async function
|
138
|
-
const s = t.document,
|
139
|
-
let
|
140
|
-
return
|
141
|
-
for (const c of
|
137
|
+
async function Qe(r, e, t = window) {
|
138
|
+
const s = t.document, n = t.document.head;
|
139
|
+
let i = t[e];
|
140
|
+
return i ? i.default || i : new Promise((a, o) => {
|
141
|
+
for (const c of r) {
|
142
142
|
const l = s.createElement("script");
|
143
143
|
l.src = c, l.onload = () => {
|
144
|
-
|
144
|
+
i = t[e], i ? a(i.default || i) : o(null);
|
145
145
|
}, l.onerror = (f) => {
|
146
|
-
|
147
|
-
},
|
146
|
+
o(f);
|
147
|
+
}, n.appendChild(l);
|
148
148
|
}
|
149
149
|
});
|
150
150
|
}
|
151
|
-
function
|
152
|
-
return
|
151
|
+
function Xe(r) {
|
152
|
+
return q(r) || q(r?.install);
|
153
153
|
}
|
154
|
-
function
|
155
|
-
return
|
154
|
+
function Ze(r) {
|
155
|
+
return Je.includes(r);
|
156
156
|
}
|
157
|
-
function
|
158
|
-
return
|
157
|
+
function et(r) {
|
158
|
+
return qe.includes(r);
|
159
159
|
}
|
160
|
-
function
|
161
|
-
const e = window
|
160
|
+
function k(r = window) {
|
161
|
+
const e = window?.Mock;
|
162
162
|
if (e) return e;
|
163
|
-
const t =
|
164
|
-
if (t)
|
163
|
+
const t = r?.Mock;
|
164
|
+
if (t && window)
|
165
165
|
return window.Mock = t, t;
|
166
166
|
}
|
167
|
-
function
|
167
|
+
function F(r, e, t = !1, s = !1) {
|
168
168
|
try {
|
169
|
-
const
|
170
|
-
|
171
|
-
let
|
172
|
-
|
173
|
-
`) +
|
174
|
-
const a = `with(${t ? "{}" : "$scope || {}"}) { ${
|
169
|
+
const n = ['"use strict";', "var __self = arguments[0];"];
|
170
|
+
n.push("return ");
|
171
|
+
let i = (r.value || "").trim();
|
172
|
+
i = i.replace(/this(\W|$)/g, (o, c) => `__self${c}`), i = n.join(`
|
173
|
+
`) + i;
|
174
|
+
const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
|
175
175
|
return new Function("$scope", a)(e);
|
176
|
-
} catch (
|
177
|
-
if (
|
178
|
-
throw
|
176
|
+
} catch (n) {
|
177
|
+
if (R.error("parseExpression.error", n, r, e?.__self ?? e), s)
|
178
|
+
throw n;
|
179
179
|
}
|
180
180
|
}
|
181
|
-
function
|
182
|
-
const
|
183
|
-
if (typeof
|
181
|
+
function V(r, e, t = !1, s = !1) {
|
182
|
+
const n = F(r, e, t, s);
|
183
|
+
if (typeof n != "function" && (R.error(
|
184
184
|
"parseFunction.error",
|
185
185
|
"not a function",
|
186
|
-
|
186
|
+
r,
|
187
187
|
e?.__self ?? e
|
188
188
|
), s))
|
189
|
-
throw new Error(`"${
|
190
|
-
return
|
189
|
+
throw new Error(`"${r.value}" not a function`);
|
190
|
+
return n;
|
191
191
|
}
|
192
|
-
function _(
|
193
|
-
return
|
192
|
+
function _(r) {
|
193
|
+
return r && r.type === "JSExpression";
|
194
194
|
}
|
195
|
-
function A(
|
196
|
-
return typeof
|
195
|
+
function A(r) {
|
196
|
+
return typeof r == "object" && r && r.type === "JSFunction";
|
197
197
|
}
|
198
|
-
function
|
199
|
-
return _(
|
198
|
+
function tt(r) {
|
199
|
+
return _(r) || A(r);
|
200
200
|
}
|
201
|
-
function
|
202
|
-
return
|
201
|
+
function Gt(r) {
|
202
|
+
return tt(r) ? r.value : JSON.stringify(r);
|
203
203
|
}
|
204
|
-
const
|
204
|
+
const st = {
|
205
205
|
session: !1,
|
206
206
|
authKey: "Authorization",
|
207
207
|
storageKey: "ACCESS_STORAGE",
|
@@ -213,31 +213,31 @@ const _t = {
|
|
213
213
|
unauthorizedMessage: "登录已经失效,请重新登录!",
|
214
214
|
noPermissionMessage: "无权限访问该页面",
|
215
215
|
appName: ""
|
216
|
-
},
|
217
|
-
class
|
216
|
+
}, ye = Symbol("access");
|
217
|
+
class Yt {
|
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({}, st, e), this.loadData();
|
223
223
|
}
|
224
224
|
connect(e) {
|
225
|
-
const { mode: t, router: s, request:
|
226
|
-
this.mode = t, s && this.mode === y.Raw && this.setGuard(s),
|
225
|
+
const { mode: t, router: s, request: n } = e;
|
226
|
+
this.mode = t, s && this.mode === y.Raw && this.setGuard(s), n && this.setRequest(n);
|
227
227
|
}
|
228
228
|
login(e) {
|
229
|
-
const { storageKey: t, storagePrefix: s, session:
|
230
|
-
this.setData(e), this.data && (
|
229
|
+
const { storageKey: t, storagePrefix: s, session: n, authKey: i } = this.options;
|
230
|
+
this.setData(e), this.data && (N.save(t, e, {
|
231
231
|
type: "local",
|
232
232
|
prefix: s
|
233
|
-
}),
|
233
|
+
}), n && B.set(i, this.data.token));
|
234
234
|
}
|
235
235
|
clear() {
|
236
|
-
const { storageKey: e, storagePrefix: t, session: s, authKey:
|
237
|
-
this.data = null,
|
236
|
+
const { storageKey: e, storagePrefix: t, session: s, authKey: n } = this.options;
|
237
|
+
this.data = null, N.remove(e, {
|
238
238
|
type: "local",
|
239
239
|
prefix: t
|
240
|
-
}), s &&
|
240
|
+
}), s && B.remove(n);
|
241
241
|
}
|
242
242
|
logout() {
|
243
243
|
this.clear(), this.toLogin();
|
@@ -250,22 +250,22 @@ class Ms {
|
|
250
250
|
}
|
251
251
|
can(e) {
|
252
252
|
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
|
253
|
-
return typeof e == "function" ? e(s) :
|
253
|
+
return typeof e == "function" ? e(s) : se(e).every((i) => s[i] || s[t + "." + i]);
|
254
254
|
}
|
255
255
|
some(e) {
|
256
256
|
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
|
257
|
-
return
|
257
|
+
return se(e).some((i) => s[i] || s[t + "." + i]);
|
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(ye, this));
|
261
261
|
}
|
262
262
|
isAuthPath(e) {
|
263
263
|
const { auth: t, isAuth: s } = this.options;
|
264
264
|
if (s)
|
265
265
|
return s(e);
|
266
266
|
if (e.path && typeof t == "string") {
|
267
|
-
const
|
268
|
-
return e.path ===
|
267
|
+
const n = t.split("#")[1] || t;
|
268
|
+
return e.path === n;
|
269
269
|
}
|
270
270
|
return !1;
|
271
271
|
}
|
@@ -278,13 +278,13 @@ class Ms {
|
|
278
278
|
setData(e) {
|
279
279
|
const { privateKey: t } = this.options;
|
280
280
|
if (Array.isArray(e) && t) {
|
281
|
-
const s = e.map((
|
281
|
+
const s = e.map((n) => re(n, t));
|
282
282
|
this.data = JSON.parse(s.join(""));
|
283
283
|
return;
|
284
284
|
}
|
285
285
|
if (typeof e == "string")
|
286
286
|
try {
|
287
|
-
const s = t ?
|
287
|
+
const s = t ? re(e, t) : e;
|
288
288
|
s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
|
289
289
|
} catch (s) {
|
290
290
|
console.warn(s);
|
@@ -293,7 +293,7 @@ class Ms {
|
|
293
293
|
this.data = e;
|
294
294
|
}
|
295
295
|
loadData() {
|
296
|
-
const { storageKey: e, storagePrefix: t } = this.options, s =
|
296
|
+
const { storageKey: e, storagePrefix: t } = this.options, s = N.get(e, {
|
297
297
|
type: "local",
|
298
298
|
prefix: t
|
299
299
|
});
|
@@ -301,17 +301,17 @@ class Ms {
|
|
301
301
|
}
|
302
302
|
isLogined() {
|
303
303
|
const { session: e, authKey: t } = this.options;
|
304
|
-
return e && t ? !!
|
304
|
+
return e && t ? !!B.get(t) : !!this.getToken();
|
305
305
|
}
|
306
306
|
hasRoutePermission(e) {
|
307
|
-
if (e.name ===
|
307
|
+
if (e.name === C) {
|
308
308
|
const t = e.params.id;
|
309
309
|
return t && this.can(t);
|
310
310
|
}
|
311
311
|
return !0;
|
312
312
|
}
|
313
313
|
setGuard(e) {
|
314
|
-
e.beforeEach((t, s,
|
314
|
+
e.beforeEach((t, s, n) => this.guard(t, n));
|
315
315
|
}
|
316
316
|
async guard(e, t) {
|
317
317
|
if (this.isWhiteList(e) || this.isAuthPath(e))
|
@@ -320,8 +320,8 @@ class Ms {
|
|
320
320
|
if (this.hasRoutePermission(e))
|
321
321
|
return t();
|
322
322
|
{
|
323
|
-
const { noPermissionMessage: s = "无权限访问", unauthorized:
|
324
|
-
return await this.showTip(s),
|
323
|
+
const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
|
324
|
+
return await this.showTip(s), q(n) ? (n(), t(!1)) : j(n) ? t(n) : t(!1);
|
325
325
|
}
|
326
326
|
}
|
327
327
|
t(!1), this.toLogin();
|
@@ -340,7 +340,7 @@ class Ms {
|
|
340
340
|
}
|
341
341
|
async showTip(e) {
|
342
342
|
const { alert: t } = this.options;
|
343
|
-
return t ? (await
|
343
|
+
return t ? (await le(150), await t(e, {
|
344
344
|
title: "提示",
|
345
345
|
type: "warning"
|
346
346
|
}).catch(() => !1)) : !1;
|
@@ -355,110 +355,111 @@ class Ms {
|
|
355
355
|
);
|
356
356
|
}
|
357
357
|
}
|
358
|
-
function
|
359
|
-
return
|
358
|
+
function rt() {
|
359
|
+
return de(ye, null);
|
360
360
|
}
|
361
|
-
function
|
362
|
-
const { notify: e, loading: t, settings: s = {} } =
|
363
|
-
let
|
361
|
+
function Qt(r = {}) {
|
362
|
+
const { notify: e, loading: t, settings: s = {}, Startup: n } = r;
|
363
|
+
let i = null;
|
364
364
|
return {
|
365
|
-
request:
|
365
|
+
request: ue({
|
366
366
|
settings: {
|
367
367
|
type: "form",
|
368
368
|
validSuccess: !0,
|
369
369
|
originResponse: !1,
|
370
370
|
loading: !0,
|
371
|
-
validate: (
|
371
|
+
validate: (o) => o.data?.code === 0 || !!o.data?.success,
|
372
372
|
failMessage: !0,
|
373
|
-
showError: (
|
374
|
-
e && e(
|
373
|
+
showError: (o) => {
|
374
|
+
e && e(o || "未知错误");
|
375
375
|
},
|
376
376
|
showLoading: () => {
|
377
|
-
|
377
|
+
i && i.close(), t && (i = t());
|
378
378
|
},
|
379
379
|
hideLoading: () => {
|
380
|
-
|
380
|
+
i && (i.close(), i = null);
|
381
381
|
},
|
382
382
|
...s
|
383
383
|
}
|
384
384
|
}),
|
385
|
-
jsonp:
|
385
|
+
jsonp: pe,
|
386
386
|
notify: e,
|
387
|
-
loading: t
|
387
|
+
loading: t,
|
388
|
+
startupComponent: n
|
388
389
|
};
|
389
390
|
}
|
390
|
-
function
|
391
|
+
function nt(r, e) {
|
391
392
|
const { jsonp: t, request: s } = e;
|
392
|
-
if (
|
393
|
-
return (
|
394
|
-
...
|
395
|
-
query:
|
393
|
+
if (r.method === "jsonp")
|
394
|
+
return (n = {}) => t(r.url, {
|
395
|
+
...r.jsonpOptions,
|
396
|
+
query: n
|
396
397
|
});
|
397
398
|
{
|
398
|
-
const
|
399
|
-
url:
|
400
|
-
method:
|
399
|
+
const n = r.headers ? F(r.headers, {}, !0) : void 0, i = {
|
400
|
+
url: r.url,
|
401
|
+
method: r.method,
|
401
402
|
settings: {
|
402
|
-
...
|
403
|
-
headers:
|
403
|
+
...r.settings,
|
404
|
+
headers: n
|
404
405
|
}
|
405
406
|
};
|
406
|
-
return (a,
|
407
|
+
return (a, o) => (delete i.data, s.send(Ie(i, o || {}, { data: a })));
|
407
408
|
}
|
408
409
|
}
|
409
|
-
function
|
410
|
+
function it(r, e) {
|
410
411
|
const { metaQuery: t } = e;
|
411
412
|
if (!t) return;
|
412
|
-
const { code: s, queryCode:
|
413
|
-
return (
|
413
|
+
const { code: s, queryCode: n } = r;
|
414
|
+
return (i, a) => {
|
414
415
|
if (!t) {
|
415
416
|
console.warn("adapter.metaQuery is not defined!");
|
416
417
|
return;
|
417
418
|
}
|
418
|
-
return t(s,
|
419
|
+
return t(s, n, i, a);
|
419
420
|
};
|
420
421
|
}
|
421
|
-
function
|
422
|
+
function ot(r = [], e = [], t) {
|
422
423
|
const s = {};
|
423
|
-
for (const
|
424
|
-
s[
|
425
|
-
for (const
|
426
|
-
s[
|
424
|
+
for (const n of r)
|
425
|
+
s[n.id] = nt(n, t);
|
426
|
+
for (const n of e)
|
427
|
+
s[n.id] = it(n, t);
|
427
428
|
return s;
|
428
429
|
}
|
429
|
-
async function
|
430
|
-
const t =
|
431
|
-
t && (
|
430
|
+
async function at(r = [], e = window) {
|
431
|
+
const t = k(e);
|
432
|
+
t && (_e(e), r.forEach((s) => lt(t, s)));
|
432
433
|
}
|
433
|
-
function
|
434
|
-
const t = A(
|
435
|
-
return async (...
|
436
|
-
let
|
434
|
+
function ct(r, e = window) {
|
435
|
+
const t = A(r.mockTemplate) && r.mockTemplate.value ? V(r.mockTemplate, {}, !0) : void 0, s = k(e);
|
436
|
+
return async (...n) => {
|
437
|
+
let i = {};
|
437
438
|
if (t)
|
438
439
|
try {
|
439
|
-
|
440
|
+
i = await t.apply(t, n);
|
440
441
|
} catch (a) {
|
441
|
-
|
442
|
+
R.warn("模拟数据模版异常", a);
|
442
443
|
}
|
443
|
-
return s?.mock(
|
444
|
+
return s?.mock(i);
|
444
445
|
};
|
445
446
|
}
|
446
|
-
function
|
447
|
+
function lt(r, e) {
|
447
448
|
if (!e.mock) return;
|
448
449
|
const { url: t, mockTemplate: s } = e;
|
449
450
|
if (t && s) {
|
450
|
-
const
|
451
|
-
|
452
|
-
const c =
|
453
|
-
return Object.assign(
|
451
|
+
const n = He(`${t}(.*)`), i = Te(t, { decode: decodeURIComponent }), a = F(s, {}, !0);
|
452
|
+
r.mock(n, (o) => {
|
453
|
+
const c = P.parse(o.url) || {}, l = o.body instanceof FormData ? De(o.body) : o.body, f = i(o.url)?.params;
|
454
|
+
return Object.assign(o, { data: l, params: c, query: f }), r.mock(a(o));
|
454
455
|
});
|
455
456
|
}
|
456
457
|
}
|
457
|
-
function
|
458
|
-
const e =
|
458
|
+
function _e(r = window) {
|
459
|
+
const e = k(r);
|
459
460
|
e && (e._mocked = {});
|
460
461
|
}
|
461
|
-
class
|
462
|
+
class ut {
|
462
463
|
__id = null;
|
463
464
|
__mode;
|
464
465
|
__instance = null;
|
@@ -484,15 +485,15 @@ class Rt {
|
|
484
485
|
$apis = {};
|
485
486
|
__transform = {};
|
486
487
|
constructor(e) {
|
487
|
-
const { mode: t, dsl: s, attrs:
|
488
|
-
this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}),
|
488
|
+
const { mode: t, dsl: s, attrs: n } = e;
|
489
|
+
this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
|
489
490
|
}
|
490
|
-
setup(e, t =
|
491
|
+
setup(e, t = x) {
|
491
492
|
const s = t.getCurrentInstance();
|
492
493
|
if (!s) return;
|
493
494
|
this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
|
494
|
-
const
|
495
|
-
Object.assign(this,
|
495
|
+
const n = s.appContext.config.globalProperties;
|
496
|
+
Object.assign(this, n), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
|
496
497
|
this.__proxy();
|
497
498
|
}), t.onUnmounted(() => {
|
498
499
|
this.__cleanup();
|
@@ -501,12 +502,12 @@ class Rt {
|
|
501
502
|
});
|
502
503
|
}
|
503
504
|
__proxy() {
|
504
|
-
this.__instance &&
|
505
|
+
this.__instance && oe.forEach((e) => {
|
505
506
|
this[e] = this.__instance?.[e];
|
506
507
|
});
|
507
508
|
}
|
508
509
|
__cleanup() {
|
509
|
-
|
510
|
+
oe.forEach((e) => {
|
510
511
|
this[e] = null;
|
511
512
|
}), this.__reset();
|
512
513
|
}
|
@@ -516,36 +517,36 @@ class Rt {
|
|
516
517
|
__parseFunction(e) {
|
517
518
|
if (e)
|
518
519
|
if (this.__mode === y.Runtime) {
|
519
|
-
const { id: t, type: s } = e,
|
520
|
-
return
|
520
|
+
const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
|
521
|
+
return V({ type: s, value: n }, this);
|
521
522
|
} else
|
522
|
-
return
|
523
|
+
return V(e, this);
|
523
524
|
}
|
524
525
|
__parseExpression(e) {
|
525
526
|
if (e)
|
526
527
|
if (this.__mode === y.Runtime) {
|
527
|
-
const { id: t, type: s } = e,
|
528
|
-
return
|
528
|
+
const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
|
529
|
+
return F({ type: s, value: n }, this);
|
529
530
|
} else
|
530
|
-
return
|
531
|
+
return F(e, this);
|
531
532
|
}
|
532
533
|
__ref(e = null, t) {
|
533
534
|
if (this.__mode !== y.VNode)
|
534
535
|
return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
|
535
|
-
await
|
536
|
-
let
|
537
|
-
if (!
|
536
|
+
await le(0);
|
537
|
+
let n = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
|
538
|
+
if (!n) {
|
538
539
|
typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
|
539
540
|
return;
|
540
541
|
}
|
541
|
-
return
|
542
|
+
return n.nodeType === 3 && n.nextSibling && (n = n.nextSibling), n.__vtj__ = e, y.Design === this.__mode && (n.__context__ = this, n.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
|
542
543
|
};
|
543
544
|
}
|
544
545
|
__getRefEl(e, t, s) {
|
545
|
-
const
|
546
|
-
if (
|
547
|
-
const
|
548
|
-
return Array.from(
|
546
|
+
const n = e[t];
|
547
|
+
if (n && s !== n) {
|
548
|
+
const i = new Set([].concat(n, s));
|
549
|
+
return Array.from(i);
|
549
550
|
} else
|
550
551
|
return s;
|
551
552
|
}
|
@@ -557,66 +558,66 @@ class Rt {
|
|
557
558
|
return s.context.__proto__ = this.context, s.__proto__ = this, s;
|
558
559
|
}
|
559
560
|
}
|
560
|
-
function
|
561
|
+
function W(r) {
|
561
562
|
const {
|
562
|
-
Vue: e =
|
563
|
+
Vue: e = x,
|
563
564
|
mode: t = y.Runtime,
|
564
565
|
components: s = {},
|
565
|
-
libs:
|
566
|
-
apis:
|
566
|
+
libs: n = {},
|
567
|
+
apis: i = {},
|
567
568
|
loader: a
|
568
|
-
} =
|
569
|
+
} = r, o = e.computed(() => r.dsl), c = {
|
569
570
|
$components: s,
|
570
|
-
$libs:
|
571
|
-
$apis:
|
572
|
-
}, l = new
|
571
|
+
$libs: n,
|
572
|
+
$apis: i
|
573
|
+
}, l = new ut({
|
573
574
|
mode: t,
|
574
|
-
dsl:
|
575
|
+
dsl: o.value,
|
575
576
|
attrs: c
|
576
577
|
}), f = e.defineComponent({
|
577
|
-
name:
|
578
|
+
name: o.value.name,
|
578
579
|
props: {
|
579
|
-
...
|
580
|
+
...dt(o.value.props ?? [], l)
|
580
581
|
},
|
581
|
-
setup(
|
582
|
-
l.$props =
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
), l.state =
|
587
|
-
const
|
588
|
-
|
582
|
+
setup(p) {
|
583
|
+
l.$props = p, l.props = p, o.value.id && ve(
|
584
|
+
r.window || window,
|
585
|
+
o.value.id,
|
586
|
+
o.value.css || ""
|
587
|
+
), l.state = ft(e, o.value.state ?? {}, l);
|
588
|
+
const m = ht(e, o.value.computed ?? {}, l), h = mt(o.value.methods ?? {}, l), d = gt(e, o.value.inject, l), u = vt(
|
589
|
+
o.value.dataSources || {},
|
589
590
|
l
|
590
591
|
), w = {
|
591
|
-
...m,
|
592
592
|
...d,
|
593
|
+
...m,
|
593
594
|
...h,
|
594
|
-
...
|
595
|
+
...u
|
595
596
|
};
|
596
|
-
return l.setup(w, e),
|
597
|
+
return l.setup(w, e), yt(e, o.value.watch ?? [], l), {
|
597
598
|
vtj: l
|
598
599
|
};
|
599
600
|
},
|
600
|
-
emits:
|
601
|
+
emits: pt(o.value.emits),
|
601
602
|
expose: ["vtj"],
|
602
603
|
render() {
|
603
|
-
if (!
|
604
|
-
const
|
605
|
-
return
|
604
|
+
if (!o.value.nodes) return null;
|
605
|
+
const p = o.value.nodes || [];
|
606
|
+
return p.length === 1 ? D(p[0], l, e, a) : p.map((m) => D(m, l, e, a));
|
606
607
|
},
|
607
|
-
...
|
608
|
+
..._t(o.value.lifeCycles ?? {}, l)
|
608
609
|
});
|
609
610
|
return {
|
610
611
|
renderer: e.markRaw(f),
|
611
612
|
context: l
|
612
613
|
};
|
613
614
|
}
|
614
|
-
function
|
615
|
-
return
|
615
|
+
function pt(r = []) {
|
616
|
+
return r.map((e) => j(e) ? e : e.name);
|
616
617
|
}
|
617
|
-
function
|
618
|
-
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((
|
619
|
-
return
|
618
|
+
function dt(r = [], e) {
|
619
|
+
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Le[i]) : void 0;
|
620
|
+
return r.map((s) => j(s) ? {
|
620
621
|
name: s
|
621
622
|
} : {
|
622
623
|
name: s.name,
|
@@ -624,58 +625,58 @@ function xt(n = [], e) {
|
|
624
625
|
required: s.required,
|
625
626
|
default: _(s.default) ? e.__parseExpression(s.default) : s.default
|
626
627
|
}).reduce(
|
627
|
-
(s,
|
628
|
-
type: t(
|
629
|
-
required:
|
630
|
-
default:
|
628
|
+
(s, n) => (s[n.name] = {
|
629
|
+
type: t(n.type),
|
630
|
+
required: n.required,
|
631
|
+
default: n.default
|
631
632
|
}, s),
|
632
633
|
{}
|
633
634
|
);
|
634
635
|
}
|
635
|
-
function
|
636
|
-
return
|
636
|
+
function ft(r, e, t) {
|
637
|
+
return r.reactive(
|
637
638
|
Object.keys(e || {}).reduce(
|
638
|
-
(s,
|
639
|
-
let
|
640
|
-
return _(
|
639
|
+
(s, n) => {
|
640
|
+
let i = e[n];
|
641
|
+
return _(i) ? i = t.__parseExpression(i) : A(i) && (i = t.__parseFunction(i)), s[n] = i, s;
|
641
642
|
},
|
642
643
|
{}
|
643
644
|
)
|
644
645
|
);
|
645
646
|
}
|
646
|
-
function
|
647
|
+
function ht(r, e, t) {
|
647
648
|
return Object.entries(e ?? {}).reduce(
|
648
|
-
(s, [
|
649
|
+
(s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
|
649
650
|
{}
|
650
651
|
);
|
651
652
|
}
|
652
|
-
function
|
653
|
-
return Object.entries(
|
654
|
-
(t, [s,
|
653
|
+
function mt(r, e) {
|
654
|
+
return Object.entries(r ?? {}).reduce(
|
655
|
+
(t, [s, n]) => (t[s] = e.__parseFunction(n), t),
|
655
656
|
{}
|
656
657
|
);
|
657
658
|
}
|
658
|
-
function
|
659
|
+
function gt(r, e = [], t) {
|
659
660
|
return e.reduce(
|
660
|
-
(s,
|
661
|
-
const { name:
|
662
|
-
|
663
|
-
const
|
664
|
-
return s[
|
661
|
+
(s, n) => {
|
662
|
+
const { name: i, from: a } = n || {};
|
663
|
+
n.default;
|
664
|
+
const o = _(a) ? t.__parseExpression(a) || i : a ?? i, c = _(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
|
665
|
+
return s[i] = r.inject(o, c), s;
|
665
666
|
},
|
666
667
|
{}
|
667
668
|
);
|
668
669
|
}
|
669
|
-
function
|
670
|
-
return Object.keys(
|
670
|
+
function vt(r, e) {
|
671
|
+
return Object.keys(r).reduce(
|
671
672
|
(t, s) => {
|
672
|
-
const
|
673
|
-
if (
|
674
|
-
t[s] =
|
675
|
-
else if (
|
676
|
-
const
|
677
|
-
t[s] = async (...
|
678
|
-
const c = await
|
673
|
+
const n = r[s];
|
674
|
+
if (n.type === "mock")
|
675
|
+
t[s] = ct(n);
|
676
|
+
else if (n.ref) {
|
677
|
+
const i = e.$apis[n.ref], a = A(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
|
678
|
+
t[s] = async (...o) => {
|
679
|
+
const c = await i.apply(e, o);
|
679
680
|
return a ? a(c) : c;
|
680
681
|
};
|
681
682
|
}
|
@@ -684,9 +685,9 @@ function Tt(n, e) {
|
|
684
685
|
{}
|
685
686
|
);
|
686
687
|
}
|
687
|
-
function
|
688
|
+
function yt(r, e = [], t) {
|
688
689
|
e.forEach((s) => {
|
689
|
-
|
690
|
+
r.watch(
|
690
691
|
t.__parseExpression(s.source),
|
691
692
|
t.__parseFunction(s.handler),
|
692
693
|
{
|
@@ -696,530 +697,307 @@ function It(n, e = [], t) {
|
|
696
697
|
);
|
697
698
|
});
|
698
699
|
}
|
699
|
-
function
|
700
|
-
return Object.entries(
|
701
|
-
(t, [s,
|
700
|
+
function _t(r, e) {
|
701
|
+
return Object.entries(r ?? {}).reduce(
|
702
|
+
(t, [s, n]) => (t[s] = e.__parseFunction(n), t),
|
702
703
|
{}
|
703
704
|
);
|
704
705
|
}
|
705
|
-
let
|
706
|
-
const
|
707
|
-
async function
|
708
|
-
const { urls: t = [], library: s } =
|
709
|
-
if (
|
710
|
-
const
|
711
|
-
return
|
712
|
-
(
|
706
|
+
let L = [], E = {};
|
707
|
+
const wt = (r) => r;
|
708
|
+
async function we(r, e = window) {
|
709
|
+
const { urls: t = [], library: s } = r, n = t.filter((o) => Z(o));
|
710
|
+
if (n.length === 0 || !s) return null;
|
711
|
+
const i = t.filter((o) => X(o));
|
712
|
+
return i.length && Ye(i, e), await Qe(n, s, e).catch(
|
713
|
+
(o) => (console.warn("loadScriptUrl error", n, s, o), null)
|
713
714
|
);
|
714
715
|
}
|
715
|
-
function
|
716
|
-
const { getDsl: e, getDslByUrl: t, options: s } =
|
717
|
-
return s.window && (
|
718
|
-
delete s.window[
|
719
|
-
}),
|
720
|
-
if (!
|
721
|
-
if (
|
722
|
-
let
|
723
|
-
return
|
724
|
-
const c = await e(
|
725
|
-
return c && (c.name =
|
716
|
+
function G(r) {
|
717
|
+
const { getDsl: e, getDslByUrl: t, options: s } = r;
|
718
|
+
return s.window && (L.forEach((n) => {
|
719
|
+
delete s.window[n];
|
720
|
+
}), L = []), (n, i, a = x) => {
|
721
|
+
if (!i || typeof i == "string") return n;
|
722
|
+
if (i.type === "Schema" && i.id) {
|
723
|
+
let o = E[i.id];
|
724
|
+
return o || (o = E[i.id] = a.defineAsyncComponent(async () => {
|
725
|
+
const c = await e(i.id);
|
726
|
+
return c && (c.name = n), c ? W({
|
726
727
|
...s,
|
727
728
|
Vue: a,
|
728
729
|
dsl: c,
|
729
730
|
mode: y.Runtime,
|
730
|
-
loader:
|
731
|
+
loader: G(r)
|
731
732
|
}).renderer : null;
|
732
|
-
}),
|
733
|
+
}), o);
|
733
734
|
}
|
734
|
-
if (
|
735
|
-
let
|
736
|
-
return
|
737
|
-
const c = await t(
|
738
|
-
return c && (c.name =
|
735
|
+
if (i.type === "UrlSchema" && i.url) {
|
736
|
+
let o = E[i.url];
|
737
|
+
return o || (o = E[i.url] = a.defineAsyncComponent(async () => {
|
738
|
+
const c = await t(i.url);
|
739
|
+
return c && (c.name = n), c ? W({
|
739
740
|
...s,
|
740
741
|
Vue: a,
|
741
742
|
dsl: c,
|
742
743
|
mode: y.Runtime,
|
743
|
-
loader:
|
744
|
+
loader: G(r)
|
744
745
|
}).renderer : null;
|
745
|
-
}),
|
746
|
+
}), o);
|
746
747
|
}
|
747
|
-
if (
|
748
|
-
let
|
749
|
-
return
|
748
|
+
if (i.type === "Plugin") {
|
749
|
+
let o = i.library ? E[i.library] : null;
|
750
|
+
return o || (i.library && L.push(i.library), o = E[i.library || Symbol()] = a.defineAsyncComponent(
|
750
751
|
async () => {
|
751
|
-
const c = await
|
752
|
-
return c || (console.warn("getPlugin result is null",
|
752
|
+
const c = await we(i, s.window);
|
753
|
+
return c || (console.warn("getPlugin result is null", i), null);
|
753
754
|
}
|
754
|
-
),
|
755
|
+
), o);
|
755
756
|
}
|
756
|
-
return
|
757
|
+
return n;
|
757
758
|
};
|
758
759
|
}
|
759
|
-
function
|
760
|
+
function Xt() {
|
760
761
|
E = {};
|
761
762
|
}
|
762
|
-
function
|
763
|
-
if (!
|
764
|
-
const
|
765
|
-
if (
|
763
|
+
function D(r, e, t = x, s = wt) {
|
764
|
+
if (!r || !r.name || r.invisible) return null;
|
765
|
+
const n = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = r, { vIf: o, vFor: c, vShow: l, vModels: f, vBind: p, vHtml: m, others: h } = $t(a);
|
766
|
+
if (o && !jt(o, e))
|
766
767
|
return null;
|
767
|
-
const
|
768
|
-
const w =
|
769
|
-
if (
|
770
|
-
return
|
771
|
-
if (
|
772
|
-
const
|
773
|
-
return j(
|
774
|
-
})(), S =
|
775
|
-
if (
|
776
|
-
return
|
777
|
-
|
768
|
+
const d = (u) => {
|
769
|
+
const w = u.$components, g = (() => {
|
770
|
+
if (r.name === "component")
|
771
|
+
return bt(u, r.props?.is);
|
772
|
+
if (r.name === "slot") return r.name;
|
773
|
+
const $ = s(r.name, r.from, t);
|
774
|
+
return j($) ? Ze($) || et($) ? $ : w[$] ?? n?.app?.component($) ?? $ : $;
|
775
|
+
})(), S = Et(i, r.props ?? {}, u), Re = Pt(t, r.events ?? {}, u);
|
776
|
+
if (r.name === "slot")
|
777
|
+
return Rt(t, r, S, u, s);
|
778
|
+
p && Object.assign(S, u.__parseExpression(p.value)), l && (S.style = Object.assign(
|
778
779
|
S.style ?? {},
|
779
|
-
|
780
|
-
)),
|
781
|
-
Object.assign(S,
|
780
|
+
kt(l, u)
|
781
|
+
)), m && Object.assign(S, Ft(m, u)), f.forEach(($) => {
|
782
|
+
Object.assign(S, At(t, $, u));
|
782
783
|
});
|
783
|
-
const
|
784
|
+
const Ce = Mt(
|
784
785
|
t,
|
785
|
-
|
786
|
-
|
786
|
+
r.children ?? [],
|
787
|
+
u,
|
787
788
|
s,
|
788
|
-
|
789
|
+
r
|
789
790
|
);
|
790
|
-
let
|
791
|
-
const
|
792
|
-
return
|
791
|
+
let O = t.createVNode(g, { ...S, ...Re }, Ce);
|
792
|
+
const te = n ? St(n, h, u) : [];
|
793
|
+
return te.length && (O = t.withDirectives(O, te)), O;
|
793
794
|
};
|
794
|
-
return c ?
|
795
|
-
}
|
796
|
-
function
|
797
|
-
const s =
|
798
|
-
return e.map((
|
799
|
-
const
|
800
|
-
if (!
|
801
|
-
const a = [
|
802
|
-
return
|
803
|
-
}).filter((
|
804
|
-
}
|
805
|
-
function
|
806
|
-
const e =
|
807
|
-
(c) =>
|
808
|
-
),
|
809
|
-
(c) => !
|
795
|
+
return c ? Tt(c, d, e) : d(e);
|
796
|
+
}
|
797
|
+
function St(r, e, t) {
|
798
|
+
const s = r.app;
|
799
|
+
return e.map((n) => {
|
800
|
+
const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
|
801
|
+
if (!i) return null;
|
802
|
+
const a = [i];
|
803
|
+
return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
|
804
|
+
}).filter((n) => !!n);
|
805
|
+
}
|
806
|
+
function $t(r = []) {
|
807
|
+
const e = r.find((c) => b(c.name) === "vIf"), t = r.find((c) => b(c.name) === "vFor"), s = r.find((c) => b(c.name) === "vShow"), n = r.find((c) => b(c.name) === "vBind"), i = r.find((c) => b(c.name) === "vHtml"), a = r.filter(
|
808
|
+
(c) => b(c.name) === "vModel"
|
809
|
+
), o = r.filter(
|
810
|
+
(c) => !Ue.includes(b(c.name))
|
810
811
|
);
|
811
812
|
return {
|
812
813
|
vIf: e,
|
813
814
|
vFor: t,
|
814
815
|
vShow: s,
|
815
816
|
vModels: a,
|
816
|
-
vBind:
|
817
|
-
others:
|
818
|
-
vHtml:
|
817
|
+
vBind: n,
|
818
|
+
others: o,
|
819
|
+
vHtml: i
|
819
820
|
};
|
820
821
|
}
|
821
|
-
function
|
822
|
-
return !!e.__parseExpression(
|
822
|
+
function jt(r, e) {
|
823
|
+
return !!e.__parseExpression(r.value);
|
823
824
|
}
|
824
|
-
function
|
825
|
-
return e ? _(e) ?
|
825
|
+
function bt(r, e) {
|
826
|
+
return e ? _(e) ? r.__parseExpression(e) : e : "div";
|
826
827
|
}
|
827
|
-
function
|
828
|
-
const s =
|
829
|
-
return s.ref = t.__ref(
|
828
|
+
function Et(r, e, t) {
|
829
|
+
const s = Y(e, t);
|
830
|
+
return s.ref = t.__ref(r, s.ref), s;
|
830
831
|
}
|
831
|
-
function
|
832
|
-
return _(
|
832
|
+
function Y(r, e) {
|
833
|
+
return _(r) ? e.__parseExpression(r) : A(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => Y(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
|
833
834
|
(t, s) => {
|
834
|
-
let
|
835
|
-
return t[s] =
|
835
|
+
let n = r[s];
|
836
|
+
return t[s] = Y(n, e), t;
|
836
837
|
},
|
837
838
|
{}
|
838
|
-
) :
|
839
|
+
) : r;
|
839
840
|
}
|
840
|
-
function
|
841
|
-
const s = ["passive", "capture", "once"],
|
841
|
+
function Pt(r, e, t) {
|
842
|
+
const s = ["passive", "capture", "once"], n = {
|
842
843
|
capture: "Capture",
|
843
844
|
once: "Once",
|
844
845
|
passive: "OnceCapture"
|
845
846
|
};
|
846
847
|
return Object.keys(e || {}).reduce(
|
847
|
-
(
|
848
|
-
const
|
849
|
-
return
|
848
|
+
(i, a) => {
|
849
|
+
const o = e[a], c = Se(o.modifiers), l = c.find((m) => s.includes(m)), f = "on" + xe(a) + (l && n[l] || ""), p = t.__parseFunction(o.handler);
|
850
|
+
return p && (i[f] = r.withModifiers(p, c)), i;
|
850
851
|
},
|
851
852
|
{}
|
852
853
|
);
|
853
854
|
}
|
854
|
-
function
|
855
|
-
const t = Object.keys(
|
855
|
+
function Se(r = {}, e = !1) {
|
856
|
+
const t = Object.keys(r);
|
856
857
|
return e ? t.map((s) => "." + s) : t;
|
857
858
|
}
|
858
|
-
function
|
859
|
-
const { children:
|
860
|
-
return
|
861
|
-
|
862
|
-
) : Array.isArray(
|
863
|
-
(c) =>
|
859
|
+
function Rt(r, e, t, s, n) {
|
860
|
+
const { children: i } = e, a = Ct(e, s), o = s.$slots?.[a.name];
|
861
|
+
return o ? o(t) : i ? j(i) ? r.createTextVNode(i) : _(i) ? r.createTextVNode(
|
862
|
+
ge(s.__parseExpression(i))
|
863
|
+
) : Array.isArray(i) ? i.map(
|
864
|
+
(c) => D(c, s, r, n)
|
864
865
|
) : null : null;
|
865
866
|
}
|
866
|
-
function
|
867
|
-
const { props: t } =
|
867
|
+
function Ct(r, e) {
|
868
|
+
const { props: t } = r, s = t?.name || "default";
|
868
869
|
return {
|
869
870
|
name: _(s) ? e.__parseExpression(s) : s,
|
870
871
|
params: []
|
871
872
|
};
|
872
873
|
}
|
873
|
-
function
|
874
|
-
return e.__parseExpression(
|
874
|
+
function kt(r, e) {
|
875
|
+
return e.__parseExpression(r.value) ? {} : {
|
875
876
|
display: "none"
|
876
877
|
};
|
877
878
|
}
|
878
|
-
function
|
879
|
+
function Ft(r, e) {
|
879
880
|
return {
|
880
|
-
innerHTML: e.__parseExpression(
|
881
|
+
innerHTML: e.__parseExpression(r.value) || ""
|
881
882
|
};
|
882
883
|
}
|
883
|
-
function
|
884
|
+
function At(r, e, t) {
|
884
885
|
const s = {
|
885
886
|
type: "JSFunction",
|
886
887
|
value: e.value?.value ? `(v) => {
|
887
888
|
${e.value.value} = v;
|
888
889
|
}` : "(v) => {}"
|
889
|
-
},
|
890
|
+
}, n = t.__parseFunction(s), i = Se(
|
890
891
|
_(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
|
891
892
|
), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
|
892
893
|
return {
|
893
894
|
[a]: t.__parseExpression(e.value),
|
894
|
-
[`onUpdate:${a}`]:
|
895
|
+
[`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
|
895
896
|
};
|
896
897
|
}
|
897
|
-
function
|
898
|
+
function Mt(r, e, t, s, n) {
|
898
899
|
if (!e) return null;
|
899
900
|
if (j(e))
|
900
901
|
return { default: () => e };
|
901
902
|
if (_(e))
|
902
903
|
return {
|
903
|
-
default: () =>
|
904
|
+
default: () => ge(t.__parseExpression(e))
|
904
905
|
};
|
905
906
|
if (Array.isArray(e) && e.length > 0) {
|
906
|
-
const
|
907
|
-
[`scope_${
|
907
|
+
const i = It(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
|
908
|
+
[`scope_${n.id}`]: o
|
908
909
|
} : {};
|
909
|
-
return Object.entries(
|
910
|
-
const
|
910
|
+
return Object.entries(i).reduce((o, [c, { nodes: l, params: f }]) => (o[c] = (p) => {
|
911
|
+
const m = f.length ? Oe(p ?? {}, f) : a(p);
|
911
912
|
return l.map(
|
912
|
-
(h) =>
|
913
|
+
(h) => D(h, t.__clone(m), r, s)
|
913
914
|
);
|
914
|
-
},
|
915
|
+
}, o), {});
|
915
916
|
}
|
916
917
|
return null;
|
917
918
|
}
|
918
|
-
function
|
919
|
+
function It(r) {
|
919
920
|
const e = {
|
920
921
|
default: {
|
921
922
|
params: [],
|
922
923
|
nodes: []
|
923
924
|
}
|
924
925
|
};
|
925
|
-
for (const t of
|
926
|
-
const s =
|
927
|
-
e[
|
926
|
+
for (const t of r) {
|
927
|
+
const s = Ht(t.slot), n = s.name;
|
928
|
+
e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
|
928
929
|
nodes: [t],
|
929
930
|
params: s.params
|
930
931
|
};
|
931
932
|
}
|
932
933
|
return e;
|
933
934
|
}
|
934
|
-
function
|
935
|
-
return j(
|
936
|
-
}
|
937
|
-
function Xt(n, e, t) {
|
938
|
-
const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
|
939
|
-
let i = t.__parseExpression(s) || [];
|
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
|
-
}
|
942
|
-
function Re(n) {
|
943
|
-
return Ye() ? (Qe(n), !0) : !1;
|
944
|
-
}
|
945
|
-
const Pe = typeof window < "u" && typeof document < "u";
|
946
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
947
|
-
const Zt = (n) => n != null, es = () => {
|
948
|
-
};
|
949
|
-
function ts(n) {
|
950
|
-
return Array.isArray(n) ? n : [n];
|
951
|
-
}
|
952
|
-
function ss(...n) {
|
953
|
-
if (n.length !== 1)
|
954
|
-
return Ke(...n);
|
955
|
-
const e = n[0];
|
956
|
-
return typeof e == "function" ? We(Ge(() => ({ get: e, set: es }))) : H(e);
|
957
|
-
}
|
958
|
-
const ns = Pe ? window : void 0, rs = Pe ? window.document : void 0;
|
959
|
-
function os(n) {
|
960
|
-
var e;
|
961
|
-
const t = ee(n);
|
962
|
-
return (e = t?.$el) != null ? e : t;
|
963
|
-
}
|
964
|
-
function is() {
|
965
|
-
const n = Xe(!1), e = Ze();
|
966
|
-
return e && et(() => {
|
967
|
-
n.value = !0;
|
968
|
-
}, e), n;
|
969
|
-
}
|
970
|
-
function as(n) {
|
971
|
-
const e = is();
|
972
|
-
return ye(() => (e.value, !!n()));
|
973
|
-
}
|
974
|
-
function cs(n, e, t = {}) {
|
975
|
-
const { window: s = ns, ...r } = t;
|
976
|
-
let o;
|
977
|
-
const a = as(() => s && "MutationObserver" in s), i = () => {
|
978
|
-
o && (o.disconnect(), o = void 0);
|
979
|
-
}, c = ye(() => {
|
980
|
-
const d = ee(n), h = ts(d).map(os).filter(Zt);
|
981
|
-
return new Set(h);
|
982
|
-
}), l = ve(
|
983
|
-
() => c.value,
|
984
|
-
(d) => {
|
985
|
-
i(), a.value && d.size && (o = new MutationObserver(e), d.forEach((h) => o.observe(h, r)));
|
986
|
-
},
|
987
|
-
{ immediate: !0, flush: "post" }
|
988
|
-
), f = () => o?.takeRecords(), u = () => {
|
989
|
-
l(), i();
|
990
|
-
};
|
991
|
-
return Re(u), {
|
992
|
-
isSupported: a,
|
993
|
-
stop: u,
|
994
|
-
takeRecords: f
|
995
|
-
};
|
935
|
+
function Ht(r = "default") {
|
936
|
+
return j(r) ? { name: r, params: [] } : { params: [], ...r };
|
996
937
|
}
|
997
|
-
function
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
restoreOnUnmount: a = (u) => u
|
1002
|
-
} = e, i = (t = o?.title) != null ? t : "", c = ss((s = n ?? o?.title) != null ? s : null), l = !!(n && typeof n == "function");
|
1003
|
-
function f(u) {
|
1004
|
-
if (!("titleTemplate" in e))
|
1005
|
-
return u;
|
1006
|
-
const d = e.titleTemplate || "%s";
|
1007
|
-
return typeof d == "function" ? d(u) : ee(d).replace(/%s/g, u);
|
1008
|
-
}
|
1009
|
-
return ve(
|
1010
|
-
c,
|
1011
|
-
(u, d) => {
|
1012
|
-
u !== d && o && (o.title = f(u ?? ""));
|
1013
|
-
},
|
1014
|
-
{ immediate: !0 }
|
1015
|
-
), e.observe && !e.titleTemplate && o && !l && cs(
|
1016
|
-
(r = o.head) == null ? void 0 : r.querySelector("title"),
|
1017
|
-
() => {
|
1018
|
-
o && o.title !== c.value && (c.value = f(o.title));
|
1019
|
-
},
|
1020
|
-
{ childList: !0 }
|
1021
|
-
), Re(() => {
|
1022
|
-
if (a) {
|
1023
|
-
const u = a(i, c.value || "");
|
1024
|
-
u != null && o && (o.title = u);
|
1025
|
-
}
|
1026
|
-
}), c;
|
938
|
+
function Tt(r, e, t) {
|
939
|
+
const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
|
940
|
+
let o = t.__parseExpression(s) || [];
|
941
|
+
return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
|
1027
942
|
}
|
1028
|
-
const
|
943
|
+
const ae = fe({
|
1029
944
|
name: "VtjPageContainer",
|
1030
945
|
async setup() {
|
1031
|
-
const
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
946
|
+
const r = je(), e = he(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = z(Symbol());
|
947
|
+
if (s) {
|
948
|
+
Object.assign(e.meta, s.meta || {}, { cache: s.cache });
|
949
|
+
const { useTitle: a } = r?.adapter;
|
950
|
+
a && a(s.title || "VTJ");
|
951
|
+
}
|
952
|
+
return {
|
953
|
+
provider: r,
|
954
|
+
component: n,
|
1035
955
|
file: s,
|
1036
956
|
query: e.query,
|
1037
957
|
meta: e.meta,
|
1038
|
-
sid:
|
958
|
+
sid: i,
|
1039
959
|
route: e
|
1040
960
|
};
|
1041
961
|
},
|
1042
962
|
render() {
|
1043
|
-
const { component:
|
1044
|
-
return
|
963
|
+
const { component: r, query: e, sid: t } = this;
|
964
|
+
return r ? K(r, { ...e, key: t }) : K("div", "页面不存在");
|
1045
965
|
},
|
1046
966
|
activated() {
|
1047
967
|
this.meta.cache === !1 && (this.sid = Symbol());
|
1048
968
|
}
|
1049
|
-
}),
|
1050
|
-
"data-l-h6o7ki7": "",
|
1051
|
-
class: "vtj-startup__wrapper"
|
1052
|
-
}, ds = {
|
1053
|
-
"data-l-h6o7ki7": "",
|
1054
|
-
class: "vtj-startup"
|
1055
|
-
}, ps = {
|
1056
|
-
"data-l-h6o7ki7": "",
|
1057
|
-
class: "vtj-startup__name"
|
1058
|
-
}, fs = {
|
1059
|
-
"data-l-h6o7ki7": "",
|
1060
|
-
class: "span"
|
1061
|
-
}, hs = {
|
1062
|
-
"data-l-h6o7ki7": "",
|
1063
|
-
class: "vtj-startup__tagline"
|
1064
|
-
}, ms = {
|
1065
|
-
"data-l-h6o7ki7": "",
|
1066
|
-
class: "vtj-startup__actions"
|
1067
|
-
}, gs = /* @__PURE__ */ te({
|
1068
|
-
__name: "Startup",
|
1069
|
-
props: {
|
1070
|
-
name: { default: "VTJ.PRO" },
|
1071
|
-
tagline: { default: "基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台" },
|
1072
|
-
actionText: { default: "开始设计" },
|
1073
|
-
link: {}
|
1074
|
-
},
|
1075
|
-
setup(n) {
|
1076
|
-
((r, o) => {
|
1077
|
-
let a = document.getElementById("h6o7ki7");
|
1078
|
-
a || (a = document.createElement("style"), a.id = "h6o7ki7", document.head.appendChild(a), a.innerHTML = o);
|
1079
|
-
})("h6o7ki7", `
|
1080
|
-
.vtj-startup[data-l-h6o7ki7]{
|
1081
|
-
padding: 20px;
|
1082
|
-
border-radius: 4px;
|
1083
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
1084
|
-
box-sizing: border-box;
|
1085
|
-
grid-row: 1;
|
1086
|
-
width: 100%;
|
1087
|
-
max-width: 800px;
|
1088
|
-
margin: 0 10px;
|
1089
|
-
}
|
1090
|
-
.vtj-startup__wrapper[data-l-h6o7ki7]{
|
1091
|
-
height: 100%;
|
1092
|
-
display: flex;
|
1093
|
-
justify-content: center;
|
1094
|
-
align-items: center;
|
1095
|
-
width: 100%;
|
1096
|
-
}
|
1097
|
-
.vtj-startup__name[data-l-h6o7ki7]{
|
1098
|
-
margin: 0;
|
1099
|
-
padding: 0;
|
1100
|
-
max-width: 576px;
|
1101
|
-
line-height: 56px;
|
1102
|
-
font-size: 48px;
|
1103
|
-
font-weight: 700;
|
1104
|
-
white-space: pre-wrap;
|
1105
|
-
}
|
1106
|
-
.vtj-startup__name .span[data-l-h6o7ki7]{
|
1107
|
-
background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
|
1108
|
-
-webkit-background-clip: text;
|
1109
|
-
background-clip: text;
|
1110
|
-
-webkit-text-fill-color: transparent;
|
1111
|
-
}
|
1112
|
-
.vtj-startup__tagline[data-l-h6o7ki7]{
|
1113
|
-
padding-top: 20px;
|
1114
|
-
line-height: 32px;
|
1115
|
-
font-size: 20px;
|
1116
|
-
font-weight: 500;
|
1117
|
-
white-space: pre-wrap;
|
1118
|
-
color: rgba(60, 60, 67, 0.78);
|
1119
|
-
}
|
1120
|
-
.vtj-startup__actions[data-l-h6o7ki7]{
|
1121
|
-
display: flex;
|
1122
|
-
flex-wrap: wrap;
|
1123
|
-
justify-content: space-between;
|
1124
|
-
align-items: center;
|
1125
|
-
border-top: 1px solid rgba(60, 60, 67, 0.08);
|
1126
|
-
padding: 20px 0 0 0;
|
1127
|
-
margin-top: 20px;
|
1128
|
-
}
|
1129
|
-
.vtj-startup__actions .span[data-l-h6o7ki7]{
|
1130
|
-
color: #e6a23c;
|
1131
|
-
}@media (max-width: 768px){
|
1132
|
-
|
1133
|
-
.vtj-startup__actions .span[data-l-h6o7ki7]{
|
1134
|
-
display: block;
|
1135
|
-
text-align: center;
|
1136
|
-
width: 100%;
|
1137
|
-
}
|
1138
|
-
}
|
1139
|
-
.vtj-startup__actions .button[data-l-h6o7ki7]{
|
1140
|
-
height: 40px;
|
1141
|
-
padding: 0 20px;
|
1142
|
-
border-radius: 20px;
|
1143
|
-
background-color: #409eff;
|
1144
|
-
border: 1px solid transparent;
|
1145
|
-
color: #fff;
|
1146
|
-
font-weight: 600;
|
1147
|
-
cursor: pointer;
|
1148
|
-
display: inline-block;
|
1149
|
-
line-height: 40px;
|
1150
|
-
text-align: center;
|
1151
|
-
}@media (max-width: 768px){
|
1152
|
-
|
1153
|
-
.vtj-startup__actions .button[data-l-h6o7ki7]{
|
1154
|
-
width: 100%;
|
1155
|
-
margin-top: 20px;
|
1156
|
-
}
|
1157
|
-
}
|
1158
|
-
.vtj-startup__actions .button[data-l-h6o7ki7]:hover{
|
1159
|
-
opacity: 0.7;
|
1160
|
-
}`);
|
1161
|
-
const t = n, s = () => {
|
1162
|
-
if (typeof window < "u") {
|
1163
|
-
if (t.link) {
|
1164
|
-
typeof t.link == "function" ? t.link() : window.location.href = t.link;
|
1165
|
-
return;
|
1166
|
-
}
|
1167
|
-
let o = (window.__VTJ_LINK__ || {}).href || window.location.pathname + "__vtj__/#/";
|
1168
|
-
window.location.href = o;
|
1169
|
-
}
|
1170
|
-
};
|
1171
|
-
return (r, o) => (st(), tt("div", us, [
|
1172
|
-
k("div", ds, [
|
1173
|
-
k("h1", ps, [
|
1174
|
-
k("span", fs, q(t.name), 1)
|
1175
|
-
]),
|
1176
|
-
k("div", hs, q(t.tagline), 1),
|
1177
|
-
k("div", ms, [
|
1178
|
-
o[0] || (o[0] = k("span", {
|
1179
|
-
"data-l-h6o7ki7": "",
|
1180
|
-
class: "span"
|
1181
|
-
}, "设置项目主页后,将替换此页面显示", -1)),
|
1182
|
-
k("span", {
|
1183
|
-
"data-l-h6o7ki7": "",
|
1184
|
-
class: "button",
|
1185
|
-
onClick: s
|
1186
|
-
}, q(t.actionText), 1)
|
1187
|
-
])
|
1188
|
-
])
|
1189
|
-
]));
|
1190
|
-
}
|
1191
|
-
}), vs = te({
|
969
|
+
}), Dt = fe({
|
1192
970
|
name: "VtjStartupContainer",
|
1193
971
|
render() {
|
1194
|
-
return
|
972
|
+
return K("div", "page not found!");
|
1195
973
|
}
|
1196
|
-
}),
|
1197
|
-
var
|
1198
|
-
class
|
974
|
+
}), $e = Symbol("Provider");
|
975
|
+
var xt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(xt || {});
|
976
|
+
class Ot extends ke {
|
1199
977
|
constructor(e) {
|
1200
978
|
super(), this.options = e;
|
1201
979
|
const {
|
1202
980
|
service: t,
|
1203
981
|
mode: s = y.Raw,
|
1204
|
-
dependencies:
|
1205
|
-
materials:
|
982
|
+
dependencies: n,
|
983
|
+
materials: i,
|
1206
984
|
project: a = {},
|
1207
|
-
adapter:
|
985
|
+
adapter: o = {},
|
1208
986
|
globals: c = {},
|
1209
987
|
modules: l = {},
|
1210
988
|
router: f = null,
|
1211
|
-
materialPath:
|
1212
|
-
nodeEnv:
|
989
|
+
materialPath: p = "./",
|
990
|
+
nodeEnv: m = "development"
|
1213
991
|
/* Development */
|
1214
992
|
} = e;
|
1215
|
-
this.mode = s, this.modules = l, this.service = t, this.router = f, this.materialPath =
|
1216
|
-
const { access: h, request:
|
1217
|
-
h && h.connect({ mode: s, router: f, request:
|
993
|
+
this.mode = s, this.modules = l, this.service = t, this.router = f, this.materialPath = p, this.nodeEnv = m, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
|
994
|
+
const { access: h, request: d } = this.adapter;
|
995
|
+
h && h.connect({ mode: s, router: f, request: d }), a && s !== y.Design ? this.load(a) : this.project = a;
|
1218
996
|
}
|
1219
997
|
mode;
|
1220
998
|
globals = {};
|
1221
999
|
modules = {};
|
1222
|
-
adapter = { request:
|
1000
|
+
adapter = { request: J, jsonp: pe };
|
1223
1001
|
apis = {};
|
1224
1002
|
dependencies = {};
|
1225
1003
|
materials = {};
|
@@ -1237,106 +1015,106 @@ class _s extends De {
|
|
1237
1015
|
if (e)
|
1238
1016
|
try {
|
1239
1017
|
s = await e.apply(e, t);
|
1240
|
-
} catch (
|
1241
|
-
|
1018
|
+
} catch (i) {
|
1019
|
+
R.warn("模拟数据模版异常", i);
|
1242
1020
|
}
|
1243
|
-
return
|
1021
|
+
return k()?.mock(s);
|
1244
1022
|
};
|
1245
1023
|
}
|
1246
1024
|
async load(e) {
|
1247
1025
|
const t = this.modules[`.vtj/projects/${e.id}.json`] || this.modules[`/src/.vtj/projects/${e.id}.json`];
|
1248
1026
|
if (this.project = t ? await t() : await this.service.init(e), !this.project)
|
1249
1027
|
throw new Error("project is null");
|
1250
|
-
const { apis: s = [], meta:
|
1251
|
-
|
1028
|
+
const { apis: s = [], meta: n = [] } = this.project, i = window;
|
1029
|
+
i && (i.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ot(s, n, this.adapter), _e(i), at(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
1252
1030
|
}
|
1253
1031
|
initMock(e) {
|
1254
|
-
const t =
|
1032
|
+
const t = k(e);
|
1255
1033
|
t && t.setup({
|
1256
1034
|
timeout: "50-500"
|
1257
1035
|
});
|
1258
1036
|
}
|
1259
1037
|
async loadDependencies(e) {
|
1260
1038
|
const t = Object.entries(this.dependencies);
|
1261
|
-
for (const [s,
|
1262
|
-
e[s] || (e[s] = this.library[s] = await
|
1039
|
+
for (const [s, n] of t)
|
1040
|
+
e[s] || (e[s] = this.library[s] = await n());
|
1263
1041
|
}
|
1264
1042
|
async loadAssets(e) {
|
1265
|
-
const { dependencies: t = [] } = this.project, { dependencies: s, library:
|
1043
|
+
const { dependencies: t = [] } = this.project, { dependencies: s, library: n, components: i, materialPath: a, nodeEnv: o } = this, {
|
1266
1044
|
libraryExports: c,
|
1267
1045
|
libraryMap: l,
|
1268
1046
|
materials: f,
|
1269
|
-
materialExports:
|
1270
|
-
materialMapLibrary:
|
1271
|
-
} =
|
1047
|
+
materialExports: p,
|
1048
|
+
materialMapLibrary: m
|
1049
|
+
} = Ve(
|
1272
1050
|
t,
|
1273
1051
|
a,
|
1274
|
-
|
1052
|
+
o === "development"
|
1275
1053
|
/* Development */
|
1276
1054
|
);
|
1277
1055
|
for (const h of c) {
|
1278
|
-
const
|
1279
|
-
if (
|
1280
|
-
|
1281
|
-
else if (
|
1282
|
-
e[h] =
|
1056
|
+
const d = s[h], u = e[h];
|
1057
|
+
if (u)
|
1058
|
+
n[h] = u;
|
1059
|
+
else if (d)
|
1060
|
+
e[h] = n[h] = await d();
|
1283
1061
|
else {
|
1284
1062
|
const w = l[h] || [];
|
1285
1063
|
for (const g of w)
|
1286
|
-
|
1287
|
-
|
1064
|
+
X(g) && await Ge(h, P.append(g, { v: U })), Z(g) && await ne(P.append(g, { v: U }));
|
1065
|
+
n[h] = e[h];
|
1288
1066
|
}
|
1289
1067
|
}
|
1290
|
-
if (
|
1291
|
-
for (const
|
1292
|
-
await
|
1068
|
+
if (o === "development") {
|
1069
|
+
for (const d of f)
|
1070
|
+
await ne(P.append(d, { v: U }));
|
1293
1071
|
const h = this.materials || {};
|
1294
|
-
for (const
|
1295
|
-
const
|
1072
|
+
for (const d of p) {
|
1073
|
+
const u = e[m[d]], w = Fe[d];
|
1296
1074
|
if (w)
|
1297
|
-
|
1298
|
-
|
1075
|
+
u && w.forEach((g) => {
|
1076
|
+
i[g] = u[g];
|
1299
1077
|
});
|
1300
1078
|
else {
|
1301
|
-
const g = h[
|
1302
|
-
g &&
|
1303
|
-
|
1079
|
+
const g = h[d] ? (await h[d]()).default : e[d];
|
1080
|
+
g && u && (g.components || []).forEach((S) => {
|
1081
|
+
i[S.name] = We(S, u);
|
1304
1082
|
});
|
1305
1083
|
}
|
1306
1084
|
}
|
1307
1085
|
}
|
1308
1086
|
}
|
1309
1087
|
initRouter() {
|
1310
|
-
const { router: e, project: t, options: s, adapter:
|
1088
|
+
const { router: e, project: t, options: s, adapter: n } = this;
|
1311
1089
|
if (!e) return;
|
1312
|
-
const
|
1090
|
+
const i = t?.platform === "uniapp" ? "pages" : "page", {
|
1313
1091
|
routeAppendTo: a,
|
1314
|
-
pageRouteName:
|
1092
|
+
pageRouteName: o = i,
|
1315
1093
|
routeMeta: c
|
1316
1094
|
} = s, l = a ? "" : "/", f = {
|
1317
|
-
path: `${l}${
|
1318
|
-
name:
|
1319
|
-
component:
|
1320
|
-
},
|
1095
|
+
path: `${l}${o}/:id`,
|
1096
|
+
name: C,
|
1097
|
+
component: ae
|
1098
|
+
}, p = {
|
1321
1099
|
path: l,
|
1322
|
-
name:
|
1323
|
-
component: t?.homepage ?
|
1100
|
+
name: H,
|
1101
|
+
component: t?.homepage ? ae : n.startupComponent || Dt,
|
1324
1102
|
meta: c
|
1325
1103
|
};
|
1326
|
-
e.hasRoute(
|
1104
|
+
e.hasRoute(C) && e.removeRoute(C), e.hasRoute(H) && e.removeRoute(H), a ? (e.addRoute(a, f), e.addRoute(a, p)) : (e.addRoute(f), e.addRoute(p));
|
1327
1105
|
}
|
1328
1106
|
install(e) {
|
1329
1107
|
const t = e.config.globalProperties.installed || {};
|
1330
|
-
for (const [s,
|
1331
|
-
!t[s] &&
|
1332
|
-
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(
|
1333
|
-
const a =
|
1108
|
+
for (const [s, n] of Object.entries(this.library))
|
1109
|
+
!t[s] && Xe(n) && (e.use(n), t[s] = !0);
|
1110
|
+
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide($e, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, n, i) => {
|
1111
|
+
const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
|
1334
1112
|
console.error(
|
1335
1113
|
"[VTJ Error]:",
|
1336
1114
|
{
|
1337
1115
|
err: s,
|
1338
|
-
instance:
|
1339
|
-
info:
|
1116
|
+
instance: n,
|
1117
|
+
info: i
|
1340
1118
|
},
|
1341
1119
|
s?.stack
|
1342
1120
|
), this.adapter.notify && this.adapter.notify(c, "组件渲染错误", "error");
|
@@ -1347,14 +1125,14 @@ class _s extends De {
|
|
1347
1125
|
return this.getPage(e) || t.find((s) => s.id === e) || null;
|
1348
1126
|
}
|
1349
1127
|
getPage(e) {
|
1350
|
-
const { pages: t = [] } = this.project || {}, s = (
|
1351
|
-
for (const a of
|
1352
|
-
if (a.id ===
|
1128
|
+
const { pages: t = [] } = this.project || {}, s = (n, i = []) => {
|
1129
|
+
for (const a of i) {
|
1130
|
+
if (a.id === n)
|
1353
1131
|
return a;
|
1354
1132
|
if (a.children && a.children.length) {
|
1355
|
-
const
|
1356
|
-
if (
|
1357
|
-
return
|
1133
|
+
const o = s(n, a.children);
|
1134
|
+
if (o)
|
1135
|
+
return o;
|
1358
1136
|
}
|
1359
1137
|
}
|
1360
1138
|
};
|
@@ -1370,31 +1148,31 @@ class _s extends De {
|
|
1370
1148
|
}
|
1371
1149
|
async getDslByUrl(e) {
|
1372
1150
|
const t = this.urlDslCaches[e];
|
1373
|
-
return t || (this.urlDslCaches[e] = this.adapter.request.send({
|
1151
|
+
return t || (this.adapter.request ? this.urlDslCaches[e] = this.adapter.request.send({
|
1374
1152
|
url: e,
|
1375
1153
|
method: "get",
|
1376
1154
|
settings: {
|
1377
1155
|
validSuccess: !1,
|
1378
1156
|
originResponse: !0
|
1379
1157
|
}
|
1380
|
-
}).then((s) => s.data).catch(() => null));
|
1158
|
+
}).then((s) => s.data).catch(() => null) : null);
|
1381
1159
|
}
|
1382
1160
|
createDslRenderer(e, t = {}) {
|
1383
|
-
const { library: s, components:
|
1384
|
-
mode:
|
1161
|
+
const { library: s, components: n, mode: i, apis: a } = this, o = {
|
1162
|
+
mode: i,
|
1385
1163
|
Vue: s.Vue,
|
1386
|
-
components:
|
1164
|
+
components: n,
|
1387
1165
|
libs: s,
|
1388
1166
|
apis: a,
|
1389
1167
|
window,
|
1390
1168
|
...t
|
1391
|
-
}, c =
|
1169
|
+
}, c = G({
|
1392
1170
|
getDsl: async (l) => await this.getDsl(l) || null,
|
1393
1171
|
getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
|
1394
|
-
options:
|
1172
|
+
options: o
|
1395
1173
|
});
|
1396
|
-
return
|
1397
|
-
...
|
1174
|
+
return W({
|
1175
|
+
...o,
|
1398
1176
|
dsl: e,
|
1399
1177
|
loader: c
|
1400
1178
|
});
|
@@ -1402,41 +1180,41 @@ class _s extends De {
|
|
1402
1180
|
async getRenderComponent(e, t) {
|
1403
1181
|
const s = this.getFile(e);
|
1404
1182
|
if (!s)
|
1405
|
-
return
|
1183
|
+
return R.warn(`Can not find file: ${e}`), null;
|
1406
1184
|
t && t(s);
|
1407
|
-
const
|
1408
|
-
if (
|
1409
|
-
return (await
|
1185
|
+
const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
|
1186
|
+
if (i)
|
1187
|
+
return (await i())?.default;
|
1410
1188
|
const a = await this.getDsl(s.id);
|
1411
|
-
return a ? this.createDslRenderer(a).renderer : (
|
1189
|
+
return a ? this.createDslRenderer(a).renderer : (R.warn(`Can not find dsl: ${e}`), null);
|
1412
1190
|
}
|
1413
1191
|
defineUrlSchemaComponent(e, t) {
|
1414
|
-
return
|
1192
|
+
return ie(async () => {
|
1415
1193
|
const s = await this.getDslByUrl(e);
|
1416
1194
|
return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
|
1417
1195
|
});
|
1418
1196
|
}
|
1419
1197
|
definePluginComponent(e) {
|
1420
|
-
return
|
1198
|
+
return ie(async () => await we(e, window));
|
1421
1199
|
}
|
1422
1200
|
}
|
1423
|
-
function
|
1424
|
-
const e = new
|
1201
|
+
function Zt(r) {
|
1202
|
+
const e = new Ot(r);
|
1425
1203
|
return {
|
1426
1204
|
provider: e,
|
1427
1205
|
onReady: (s) => e.ready(s)
|
1428
1206
|
};
|
1429
1207
|
}
|
1430
|
-
function
|
1431
|
-
const e =
|
1208
|
+
function je(r = {}) {
|
1209
|
+
const e = de($e, null);
|
1432
1210
|
if (!e)
|
1433
1211
|
throw new Error("Can not find provider");
|
1434
1212
|
if (e.nodeEnv === "development") {
|
1435
|
-
const { id: t, version: s } =
|
1213
|
+
const { id: t, version: s } = r;
|
1436
1214
|
t && s && (async () => {
|
1437
|
-
const
|
1438
|
-
|
1439
|
-
`[ ${
|
1215
|
+
const n = await e.getDsl(t);
|
1216
|
+
n?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
|
1217
|
+
`[ ${n?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
|
1440
1218
|
"版本不一致",
|
1441
1219
|
"warning"
|
1442
1220
|
);
|
@@ -1444,23 +1222,23 @@ function Ce(n = {}) {
|
|
1444
1222
|
}
|
1445
1223
|
return e;
|
1446
1224
|
}
|
1447
|
-
const
|
1225
|
+
const be = {
|
1448
1226
|
type: "json",
|
1449
1227
|
validSuccess: !0,
|
1450
1228
|
originResponse: !1,
|
1451
1229
|
failMessage: !0,
|
1452
|
-
validate: (
|
1453
|
-
},
|
1230
|
+
validate: (r) => r.data?.code === 0
|
1231
|
+
}, Nt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
|
1454
1232
|
url: e,
|
1455
1233
|
method: "post",
|
1456
1234
|
params: { type: t },
|
1457
|
-
query:
|
1235
|
+
query: n,
|
1458
1236
|
data: {
|
1459
1237
|
type: t,
|
1460
1238
|
data: s
|
1461
1239
|
},
|
1462
|
-
settings:
|
1463
|
-
}),
|
1240
|
+
settings: be
|
1241
|
+
}), Bt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
|
1464
1242
|
url: e,
|
1465
1243
|
method: "post",
|
1466
1244
|
data: {
|
@@ -1468,12 +1246,12 @@ const Me = {
|
|
1468
1246
|
projectId: s
|
1469
1247
|
},
|
1470
1248
|
settings: {
|
1471
|
-
...
|
1249
|
+
...be,
|
1472
1250
|
type: "data"
|
1473
1251
|
}
|
1474
|
-
}).then((
|
1475
|
-
function
|
1476
|
-
return
|
1252
|
+
}).then((n) => n && n[0] ? n[0] : null).catch(() => null);
|
1253
|
+
function es(r) {
|
1254
|
+
return ue({
|
1477
1255
|
settings: {
|
1478
1256
|
type: "json",
|
1479
1257
|
validSuccess: !0,
|
@@ -1481,17 +1259,17 @@ function Is(n) {
|
|
1481
1259
|
failMessage: !0,
|
1482
1260
|
validate: (e) => e.data?.code === 0,
|
1483
1261
|
showError: (e) => {
|
1484
|
-
|
1262
|
+
r && r(e || "未知错误");
|
1485
1263
|
}
|
1486
1264
|
}
|
1487
1265
|
});
|
1488
1266
|
}
|
1489
|
-
class
|
1267
|
+
class ee {
|
1490
1268
|
api;
|
1491
1269
|
pluginCaches = {};
|
1492
1270
|
uploader;
|
1493
|
-
constructor(e =
|
1494
|
-
this.api =
|
1271
|
+
constructor(e = J) {
|
1272
|
+
this.api = Nt(e), this.uploader = Bt(e);
|
1495
1273
|
}
|
1496
1274
|
async getExtension() {
|
1497
1275
|
console.log("BaseService.getExtension");
|
@@ -1566,38 +1344,38 @@ class re {
|
|
1566
1344
|
return await this.api("clearStaticFiles", e).catch(() => "");
|
1567
1345
|
}
|
1568
1346
|
async getPluginMaterial(e) {
|
1569
|
-
const { urls: t = [] } = e, s = t.filter((
|
1347
|
+
const { urls: t = [] } = e, s = t.filter((i) => Ke(i))[0];
|
1570
1348
|
if (!s) return null;
|
1571
|
-
const
|
1572
|
-
return
|
1349
|
+
const n = this.pluginCaches[s];
|
1350
|
+
return n || (this.pluginCaches[s] = J.send({
|
1573
1351
|
url: s,
|
1574
1352
|
method: "get",
|
1575
1353
|
settings: {
|
1576
1354
|
validSuccess: !1,
|
1577
1355
|
originResponse: !0
|
1578
1356
|
}
|
1579
|
-
}).then((
|
1357
|
+
}).then((i) => i.data).catch(() => null));
|
1580
1358
|
}
|
1581
1359
|
async genSource(e) {
|
1582
1360
|
return console.log("BaseService.genSource", e), "";
|
1583
1361
|
}
|
1584
1362
|
}
|
1585
|
-
const v = new
|
1363
|
+
const v = new Ne({
|
1586
1364
|
type: "local",
|
1587
1365
|
expired: 0,
|
1588
1366
|
prefix: "__VTJ_"
|
1589
1367
|
});
|
1590
|
-
class
|
1368
|
+
class ts extends ee {
|
1591
1369
|
init(e) {
|
1592
|
-
const t = new
|
1593
|
-
return v.save(`project_${t.id}`,
|
1370
|
+
const t = new T(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
|
1371
|
+
return v.save(`project_${t.id}`, n), Promise.resolve(n);
|
1594
1372
|
}
|
1595
1373
|
saveProject(e) {
|
1596
|
-
const t = new
|
1374
|
+
const t = new T(e);
|
1597
1375
|
return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
|
1598
1376
|
}
|
1599
1377
|
saveMaterials(e, t) {
|
1600
|
-
return v.save(`materials_${e.id}`,
|
1378
|
+
return v.save(`materials_${e.id}`, Q(t)), Promise.resolve(!0);
|
1601
1379
|
}
|
1602
1380
|
saveFile(e) {
|
1603
1381
|
return v.save(`file_${e.id}`, e), Promise.resolve(!0);
|
@@ -1615,13 +1393,13 @@ class Ds extends re {
|
|
1615
1393
|
removeHistory(e) {
|
1616
1394
|
const t = v.get(`history_${e}`);
|
1617
1395
|
if (t) {
|
1618
|
-
const
|
1619
|
-
this.removeHistoryItem(e,
|
1396
|
+
const n = (t.items || []).map((i) => i.id);
|
1397
|
+
this.removeHistoryItem(e, n), v.remove(`history_${e}`);
|
1620
1398
|
}
|
1621
1399
|
return Promise.resolve(!0);
|
1622
1400
|
}
|
1623
1401
|
getHistory(e) {
|
1624
|
-
const t = v.get(`history_${e}`), s = new
|
1402
|
+
const t = v.get(`history_${e}`), s = new ce(t || { id: e });
|
1625
1403
|
return Promise.resolve(s.toDsl());
|
1626
1404
|
}
|
1627
1405
|
getHistoryItem(e, t) {
|
@@ -1637,22 +1415,22 @@ class Ds extends re {
|
|
1637
1415
|
}), Promise.resolve(!0);
|
1638
1416
|
}
|
1639
1417
|
}
|
1640
|
-
class
|
1418
|
+
class Ut extends ee {
|
1641
1419
|
projects = {};
|
1642
1420
|
materials = {};
|
1643
1421
|
files = {};
|
1644
1422
|
histories = {};
|
1645
1423
|
historyItems = {};
|
1646
1424
|
init(e) {
|
1647
|
-
const t = new
|
1648
|
-
return this.projects[
|
1425
|
+
const t = new T(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
|
1426
|
+
return this.projects[n.id] = n, Promise.resolve(n);
|
1649
1427
|
}
|
1650
1428
|
saveProject(e) {
|
1651
|
-
const t = new
|
1429
|
+
const t = new T(e);
|
1652
1430
|
return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
|
1653
1431
|
}
|
1654
1432
|
saveMaterials(e, t) {
|
1655
|
-
return e.id && (this.materials[e.id] =
|
1433
|
+
return e.id && (this.materials[e.id] = Q(t)), Promise.resolve(!0);
|
1656
1434
|
}
|
1657
1435
|
saveFile(e) {
|
1658
1436
|
return this.files[e.id] = e, Promise.resolve(!0);
|
@@ -1670,18 +1448,18 @@ class bs extends re {
|
|
1670
1448
|
removeHistory(e) {
|
1671
1449
|
const t = this.histories[e];
|
1672
1450
|
if (t) {
|
1673
|
-
const
|
1674
|
-
this.removeHistoryItem(e,
|
1451
|
+
const n = (t.items || []).map((i) => i.id);
|
1452
|
+
this.removeHistoryItem(e, n), delete this.historyItems[e];
|
1675
1453
|
}
|
1676
1454
|
return Promise.resolve(!0);
|
1677
1455
|
}
|
1678
1456
|
getHistory(e) {
|
1679
|
-
const t = this.histories[e], s = new
|
1457
|
+
const t = this.histories[e], s = new ce(t || { id: e });
|
1680
1458
|
return Promise.resolve(s);
|
1681
1459
|
}
|
1682
1460
|
getHistoryItem(e, t) {
|
1683
|
-
const s = `${e}_${t}`,
|
1684
|
-
return Promise.resolve(
|
1461
|
+
const s = `${e}_${t}`, n = this.historyItems[s] || {};
|
1462
|
+
return Promise.resolve(n);
|
1685
1463
|
}
|
1686
1464
|
saveHistoryItem(e, t) {
|
1687
1465
|
const s = `${e}_${t.id}`;
|
@@ -1689,16 +1467,16 @@ class bs extends re {
|
|
1689
1467
|
}
|
1690
1468
|
removeHistoryItem(e, t) {
|
1691
1469
|
return t.forEach((s) => {
|
1692
|
-
const
|
1693
|
-
delete this.historyItems[
|
1470
|
+
const n = `${e}_${s}`;
|
1471
|
+
delete this.historyItems[n];
|
1694
1472
|
}), Promise.resolve(!0);
|
1695
1473
|
}
|
1696
1474
|
}
|
1697
|
-
let
|
1698
|
-
function
|
1699
|
-
return
|
1475
|
+
let I = null;
|
1476
|
+
function ss() {
|
1477
|
+
return I || (I = new Ut(), I);
|
1700
1478
|
}
|
1701
|
-
class
|
1479
|
+
class rs extends ee {
|
1702
1480
|
getFileCaches = {};
|
1703
1481
|
async getExtension() {
|
1704
1482
|
return await this.api("getExtension", {}).catch(() => {
|
@@ -1715,7 +1493,7 @@ class Os extends re {
|
|
1715
1493
|
async saveMaterials(e, t) {
|
1716
1494
|
return !!await this.api("saveMaterials", {
|
1717
1495
|
project: e,
|
1718
|
-
materials:
|
1496
|
+
materials: Q(t)
|
1719
1497
|
}).catch(() => !1);
|
1720
1498
|
}
|
1721
1499
|
async saveFile(e) {
|
@@ -1755,127 +1533,126 @@ class Os extends re {
|
|
1755
1533
|
);
|
1756
1534
|
}
|
1757
1535
|
}
|
1758
|
-
function
|
1536
|
+
function Ee(r, e, t = []) {
|
1759
1537
|
return t.map((s) => {
|
1760
|
-
const { id:
|
1538
|
+
const { id: n, title: i, icon: a, children: o, hidden: c } = s;
|
1761
1539
|
return {
|
1762
|
-
id:
|
1763
|
-
title:
|
1540
|
+
id: n,
|
1541
|
+
title: i,
|
1764
1542
|
icon: a,
|
1765
1543
|
hidden: c,
|
1766
|
-
url: `${
|
1767
|
-
children:
|
1544
|
+
url: `${r}/${e}/${n}`,
|
1545
|
+
children: o && o.length ? Ee(r, e, o) : void 0
|
1768
1546
|
};
|
1769
1547
|
});
|
1770
1548
|
}
|
1771
|
-
function
|
1772
|
-
if (!e) return
|
1549
|
+
function Pe(r, e) {
|
1550
|
+
if (!e) return r;
|
1773
1551
|
let t = [];
|
1774
|
-
for (const s of
|
1552
|
+
for (const s of r)
|
1775
1553
|
if (s.children && s.children.length) {
|
1776
|
-
const
|
1777
|
-
|
1554
|
+
const n = Pe(s.children, e);
|
1555
|
+
n.length && (s.children = n, t.push(s));
|
1778
1556
|
} else
|
1779
1557
|
e.can(s.id.toString()) && t.push(s);
|
1780
1558
|
return t;
|
1781
1559
|
}
|
1782
|
-
function
|
1560
|
+
function ns(r) {
|
1783
1561
|
const {
|
1784
1562
|
menuPathPrefix: e = "",
|
1785
1563
|
pageRouteName: t = "page",
|
1786
1564
|
disableMenusFilter: s = !1
|
1787
|
-
} =
|
1788
|
-
|
1789
|
-
const { name:
|
1790
|
-
if (
|
1791
|
-
const
|
1792
|
-
|
1793
|
-
} else if (
|
1794
|
-
const
|
1795
|
-
|
1565
|
+
} = r || {}, n = je(), i = he(), a = rt(), o = z(!1), c = z(!1), l = n.project;
|
1566
|
+
Be(() => {
|
1567
|
+
const { name: m, params: h, meta: d } = i;
|
1568
|
+
if (m === C) {
|
1569
|
+
const u = n.getPage(h.id);
|
1570
|
+
o.value = !u?.mask, c.value = !!u?.pure;
|
1571
|
+
} else if (m === H) {
|
1572
|
+
const u = n.getHomepage();
|
1573
|
+
o.value = !u?.mask, c.value = !!u?.pure;
|
1796
1574
|
} else
|
1797
|
-
|
1575
|
+
o.value = !d.mask, c.value = !!d.pure;
|
1798
1576
|
});
|
1799
|
-
const f =
|
1577
|
+
const f = Ee(
|
1800
1578
|
e,
|
1801
1579
|
t,
|
1802
1580
|
l?.pages
|
1803
|
-
),
|
1581
|
+
), p = l?.config;
|
1804
1582
|
return {
|
1805
|
-
disabled:
|
1806
|
-
logo:
|
1807
|
-
themeSwitchable:
|
1808
|
-
title:
|
1809
|
-
menus: s ? f :
|
1583
|
+
disabled: o,
|
1584
|
+
logo: p?.logo,
|
1585
|
+
themeSwitchable: p?.themeSwitchable,
|
1586
|
+
title: p?.title || l?.description || l?.name || "VTJ App",
|
1587
|
+
menus: s ? f : Pe(f, a),
|
1810
1588
|
pure: c
|
1811
1589
|
};
|
1812
1590
|
}
|
1813
1591
|
export {
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1592
|
+
ye as ACCESS_KEY,
|
1593
|
+
Yt as Access,
|
1594
|
+
Je as BUILD_IN_TAGS,
|
1595
|
+
Ue as BUILT_IN_DIRECTIVES,
|
1596
|
+
ee as BaseService,
|
1597
|
+
oe as CONTEXT_HOST,
|
1598
|
+
ut as Context,
|
1821
1599
|
y as ContextMode,
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
yt as isJSCode,
|
1600
|
+
Le as DATA_TYPES,
|
1601
|
+
H as HOMEPAGE_ROUTE_NAME,
|
1602
|
+
qe as HTML_TAGS,
|
1603
|
+
Gt as JSCodeToString,
|
1604
|
+
zt as LIFE_CYCLES_LIST,
|
1605
|
+
rs as LocalService,
|
1606
|
+
Ut as MemoryService,
|
1607
|
+
xt as NodeEnv,
|
1608
|
+
C as PAGE_ROUTE_NAME,
|
1609
|
+
Ot as Provider,
|
1610
|
+
ts as StorageService,
|
1611
|
+
me as VTJ_RENDERER_VERSION,
|
1612
|
+
ve as adoptedStyleSheets,
|
1613
|
+
Xt as clearLoaderCache,
|
1614
|
+
Qt as createAdapter,
|
1615
|
+
Vt as createAssetScripts,
|
1616
|
+
Wt as createAssetsCss,
|
1617
|
+
vt as createDataSources,
|
1618
|
+
G as createLoader,
|
1619
|
+
ss as createMemoryService,
|
1620
|
+
it as createMetaApi,
|
1621
|
+
ct as createMock,
|
1622
|
+
Zt as createProvider,
|
1623
|
+
W as createRenderer,
|
1624
|
+
nt as createSchemaApi,
|
1625
|
+
ot as createSchemaApis,
|
1626
|
+
es as createServiceRequest,
|
1627
|
+
wt as defaultLoader,
|
1628
|
+
M as fillBasePath,
|
1629
|
+
k as getMock,
|
1630
|
+
Se as getModifiers,
|
1631
|
+
we as getPlugin,
|
1632
|
+
We as getRawComponent,
|
1633
|
+
Ze as isBuiltInTag,
|
1634
|
+
X as isCSSUrl,
|
1635
|
+
tt as isJSCode,
|
1859
1636
|
_ as isJSExpression,
|
1860
1637
|
A as isJSFunction,
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1638
|
+
Ke as isJSON,
|
1639
|
+
Z as isJSUrl,
|
1640
|
+
et as isNativeTag,
|
1641
|
+
Xe as isVuePlugin,
|
1642
|
+
Ge as loadCss,
|
1643
|
+
Ye as loadCssUrl,
|
1644
|
+
Qe as loadScriptUrl,
|
1645
|
+
lt as mockApi,
|
1646
|
+
at as mockApis,
|
1647
|
+
_e as mockCleanup,
|
1648
|
+
D as nodeRender,
|
1649
|
+
Ve as parseDeps,
|
1650
|
+
F as parseExpression,
|
1651
|
+
V as parseFunction,
|
1652
|
+
$e as providerKey,
|
1653
|
+
ze as removeProdFlag,
|
1654
|
+
ge as toString,
|
1655
|
+
rt as useAccess,
|
1656
|
+
ns as useMask,
|
1657
|
+
je as useProvider
|
1881
1658
|
};
|