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