@vtj/uni 0.17.6 → 0.17.7
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.mjs +110 -99
- package/dist/index.umd.js +2 -2
- package/package.json +5 -5
- package/types/shared.d.ts +0 -5
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { adoptedStyleSheets as
|
|
1
|
+
import { adoptedStyleSheets as h } from "@vtj/renderer";
|
|
2
2
|
/**!
|
|
3
3
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
4
4
|
* @name @vtj/uni
|
|
5
5
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
6
|
-
* @version 0.17.
|
|
6
|
+
* @version 0.17.7
|
|
7
7
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
8
8
|
*/
|
|
9
|
-
const
|
|
9
|
+
const ne = "0.17.7", N = [
|
|
10
10
|
"onLaunch",
|
|
11
11
|
"onShow",
|
|
12
12
|
"onHide",
|
|
@@ -17,7 +17,7 @@ const ee = "0.17.6", N = [
|
|
|
17
17
|
"onPageNotFound",
|
|
18
18
|
"onUniNViewMessage",
|
|
19
19
|
"onExit"
|
|
20
|
-
],
|
|
20
|
+
], A = [
|
|
21
21
|
"beforeCreate",
|
|
22
22
|
"created",
|
|
23
23
|
"beforeMount",
|
|
@@ -26,7 +26,7 @@ const ee = "0.17.6", N = [
|
|
|
26
26
|
"updated",
|
|
27
27
|
"beforeUnmount",
|
|
28
28
|
"unmounted"
|
|
29
|
-
],
|
|
29
|
+
], te = [
|
|
30
30
|
"onLoad",
|
|
31
31
|
"onShow",
|
|
32
32
|
"onReady",
|
|
@@ -45,32 +45,32 @@ const ee = "0.17.6", N = [
|
|
|
45
45
|
"onNavigationBarSearchInputClicked",
|
|
46
46
|
"onShareTimeline",
|
|
47
47
|
"onAddToFavorites",
|
|
48
|
-
...
|
|
49
|
-
],
|
|
50
|
-
name:
|
|
51
|
-
appid:
|
|
48
|
+
...A
|
|
49
|
+
], m = "/pages", I = "VTJ", U = "__UNI__1FC118B", w = "VTJ移动跨端项目", R = "1.0.0", B = "100", C = !1, y = {}, b = { enable: !1 }, v = "3", F = {
|
|
50
|
+
name: I,
|
|
51
|
+
appid: U,
|
|
52
52
|
description: w,
|
|
53
|
-
versionName:
|
|
54
|
-
versionCode:
|
|
55
|
-
transformPx:
|
|
53
|
+
versionName: R,
|
|
54
|
+
versionCode: B,
|
|
55
|
+
transformPx: C,
|
|
56
56
|
"app-plus": { usingComponents: !0, nvueStyleCompiler: "uni-app", compilerVersion: 3, splashscreen: { alwaysShowBeforeRender: !0, waiting: !0, autoclose: !0, delay: 0 }, modules: {}, distribute: { android: { permissions: ['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>', '<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>', '<uses-permission android:name="android.permission.VIBRATE"/>', '<uses-permission android:name="android.permission.READ_LOGS"/>', '<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>', '<uses-feature android:name="android.hardware.camera.autofocus"/>', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>', '<uses-permission android:name="android.permission.CAMERA"/>', '<uses-permission android:name="android.permission.GET_ACCOUNTS"/>', '<uses-permission android:name="android.permission.READ_PHONE_STATE"/>', '<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>', '<uses-permission android:name="android.permission.WAKE_LOCK"/>', '<uses-permission android:name="android.permission.FLASHLIGHT"/>', '<uses-feature android:name="android.hardware.camera"/>', '<uses-permission android:name="android.permission.WRITE_SETTINGS"/>'] }, ios: {}, sdkConfigs: {}, icons: { android: { hdpi: "src/static/logo.png", xhdpi: "src/static/logo.png", xxhdpi: "src/static/logo.png", xxxhdpi: "src/static/logo.png" } } } },
|
|
57
|
-
quickapp:
|
|
57
|
+
quickapp: y,
|
|
58
58
|
"mp-weixin": { appid: "", setting: { urlCheck: !1 }, usingComponents: !0 },
|
|
59
59
|
"mp-alipay": { usingComponents: !0 },
|
|
60
60
|
"mp-baidu": { usingComponents: !0 },
|
|
61
61
|
"mp-toutiao": { usingComponents: !0 },
|
|
62
|
-
uniStatistics:
|
|
63
|
-
vueVersion:
|
|
64
|
-
},
|
|
65
|
-
pages:
|
|
66
|
-
globalStyle:
|
|
67
|
-
easycom:
|
|
62
|
+
uniStatistics: b,
|
|
63
|
+
vueVersion: v
|
|
64
|
+
}, P = [], O = { navigationBarTextStyle: "black", navigationBarTitleText: "uni-app", navigationBarBackgroundColor: "#F8F8F8", backgroundColor: "#F8F8F8" }, L = { autoscan: !0, custom: { "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" } }, x = {
|
|
65
|
+
pages: P,
|
|
66
|
+
globalStyle: O,
|
|
67
|
+
easycom: L
|
|
68
68
|
};
|
|
69
|
-
function
|
|
69
|
+
function oe(e) {
|
|
70
70
|
const [t, ...n] = e;
|
|
71
71
|
return [t.toLowerCase(), ...n].join("").replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function V(e) {
|
|
74
74
|
let { manifestJson: t = {}, pagesJson: n = {}, routes: o = [] } = e;
|
|
75
75
|
const i = o.map((s) => {
|
|
76
76
|
const { path: a, style: r, needLogin: c } = s;
|
|
@@ -82,11 +82,11 @@ function x(e) {
|
|
|
82
82
|
});
|
|
83
83
|
return {
|
|
84
84
|
...e,
|
|
85
|
-
manifestJson: Object.assign({},
|
|
86
|
-
pagesJson: Object.assign({},
|
|
85
|
+
manifestJson: Object.assign({}, F, t),
|
|
86
|
+
pagesJson: Object.assign({}, x, n, { pages: i })
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
const
|
|
89
|
+
const f = {
|
|
90
90
|
navigationBarBackgroundColor: "backgroundColor",
|
|
91
91
|
navigationBarTextStyle: "titleColor",
|
|
92
92
|
navigationBarTitleText: "titleText",
|
|
@@ -95,45 +95,45 @@ const g = {
|
|
|
95
95
|
titlePenetrate: "titlePenetrate",
|
|
96
96
|
transparentTitle: "transparentTitle"
|
|
97
97
|
};
|
|
98
|
-
function
|
|
98
|
+
function T(e) {
|
|
99
99
|
const t = {}, n = {
|
|
100
100
|
black: "#000000",
|
|
101
101
|
white: "#ffffff"
|
|
102
102
|
};
|
|
103
103
|
for (const o in e)
|
|
104
|
-
|
|
104
|
+
f[o] && (t[f[o]] = o === "navigationBarTextStyle" ? n[e[o]] || n.black : e[o]);
|
|
105
105
|
return t;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function k(e) {
|
|
108
108
|
const t = {};
|
|
109
109
|
for (const n in e)
|
|
110
|
-
|
|
110
|
+
f[n] || (t[n] = e[n]);
|
|
111
111
|
return t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ie(e) {
|
|
114
114
|
return e.split("?")[0].match(/\#\/pages\/([\w\W]*)/i)?.[1] ?? "";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function W(e) {
|
|
117
117
|
return e.h5?.router?.mode || "hash";
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function M(e) {
|
|
120
120
|
return {
|
|
121
121
|
topWindow: !!e.topWindow?.path,
|
|
122
122
|
leftWindow: !!e.leftWindow?.path,
|
|
123
123
|
rightWindow: !!e.rightWindow?.path
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function D(e) {
|
|
127
127
|
const { pagesJson: t = {} } = e, { globalStyle: n, pages: o = [] } = t;
|
|
128
128
|
return !!(n?.enablePullDownRefresh || o.find((i) => !!i.style?.enablePullDownRefresh));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function G(e) {
|
|
131
131
|
const { pagesJson: t = {} } = e, { globalStyle: n, pages: o = [] } = t;
|
|
132
132
|
let i = !1;
|
|
133
133
|
return n?.navigationStyle === "custom" ? (i = !0, o.find((s) => s.style?.navigationStyle === "default") && (i = !1)) : o.every((s) => s.style?.navigationStyle === "custom") && (i = !0), i;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
const t =
|
|
135
|
+
function J(e) {
|
|
136
|
+
const t = G(e), n = {
|
|
137
137
|
navigationBar: !1,
|
|
138
138
|
navigationBarButtons: !1,
|
|
139
139
|
navigationBarSearchInput: !1,
|
|
@@ -145,13 +145,13 @@ function G(e) {
|
|
|
145
145
|
const a = i?.h5?.titleNView;
|
|
146
146
|
return s.find((r) => !!r.style?.h5?.titleNView?.buttons.length) && (n.navigationBarButtons = !0), (a?.searchInput || s.find((r) => !!r.style?.h5?.titleNView?.searchInput)) && (n.navigationBarSearchInput = !0), (a?.type === "transparent" || s.find((r) => r.style?.h5?.titleNView?.type === "transparent")) && (n.navigationBarTransparent = !0), n;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const { pagesJson: n = {}, manifestJson: o = {} } = e, { topWindow: i, leftWindow: s, rightWindow: a } =
|
|
148
|
+
function H(e, t = window) {
|
|
149
|
+
const { pagesJson: n = {}, manifestJson: o = {} } = e, { topWindow: i, leftWindow: s, rightWindow: a } = M(n), {
|
|
150
150
|
navigationBar: r,
|
|
151
151
|
navigationBarButtons: c,
|
|
152
152
|
navigationBarSearchInput: u,
|
|
153
153
|
navigationBarTransparent: _
|
|
154
|
-
} =
|
|
154
|
+
} = J(e), p = {
|
|
155
155
|
// vue
|
|
156
156
|
__VUE_OPTIONS_API__: !0,
|
|
157
157
|
// enable/disable Options API support, default: true
|
|
@@ -186,7 +186,7 @@ function J(e, t = window) {
|
|
|
186
186
|
// 是否启用i18n
|
|
187
187
|
__UNI_FEATURE_NVUE__: !1,
|
|
188
188
|
// 是否启用nvue
|
|
189
|
-
__UNI_FEATURE_ROUTER_MODE__:
|
|
189
|
+
__UNI_FEATURE_ROUTER_MODE__: W(o),
|
|
190
190
|
// 路由模式
|
|
191
191
|
__UNI_FEATURE_PAGES__: !!n.pages?.length,
|
|
192
192
|
// 是否多页面
|
|
@@ -204,7 +204,7 @@ function J(e, t = window) {
|
|
|
204
204
|
// 是否启用响应式
|
|
205
205
|
__UNI_FEATURE_NAVIGATIONBAR__: r,
|
|
206
206
|
// 是否启用标题栏
|
|
207
|
-
__UNI_FEATURE_PULL_DOWN_REFRESH__:
|
|
207
|
+
__UNI_FEATURE_PULL_DOWN_REFRESH__: D(e),
|
|
208
208
|
// 是否启用下拉刷新
|
|
209
209
|
__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__: c,
|
|
210
210
|
// 是否启用标题栏按钮
|
|
@@ -217,8 +217,8 @@ function J(e, t = window) {
|
|
|
217
217
|
t[d] = l;
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
const
|
|
221
|
-
function
|
|
220
|
+
const j = "4.76";
|
|
221
|
+
function $(e, t = window) {
|
|
222
222
|
const { pagesJson: n = {}, manifestJson: o = {} } = e, { easycom: i = {} } = n, {
|
|
223
223
|
appid: s = "",
|
|
224
224
|
name: a = "",
|
|
@@ -228,11 +228,11 @@ function j(e, t = window) {
|
|
|
228
228
|
t.__uniConfig = {
|
|
229
229
|
easycom: i,
|
|
230
230
|
globalStyle: {
|
|
231
|
-
...
|
|
232
|
-
navigationBar:
|
|
231
|
+
...k(u),
|
|
232
|
+
navigationBar: T(u),
|
|
233
233
|
isNVue: !1
|
|
234
234
|
},
|
|
235
|
-
compilerVersion:
|
|
235
|
+
compilerVersion: j,
|
|
236
236
|
appId: s,
|
|
237
237
|
appName: a,
|
|
238
238
|
appVersion: c,
|
|
@@ -287,7 +287,7 @@ function j(e, t = window) {
|
|
|
287
287
|
// tabBar: pagesJson.tabBar
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function K(e, t = window) {
|
|
291
291
|
const {
|
|
292
292
|
UniServiceJSBridge: n,
|
|
293
293
|
UniViewJSBridge: o,
|
|
@@ -299,16 +299,16 @@ function $(e, t = window) {
|
|
|
299
299
|
} = e;
|
|
300
300
|
t.UniServiceJSBridge = n, t.UniViewJSBridge = o, t.getApp = i, t.uni = s, t.wx = s, t.getCurrentPages = a, t.upx2px = r, t.__setupPage = (u) => c(u);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Y(e, t, n) {
|
|
303
303
|
const { openBlock: o, createBlock: i, withCtx: s, createVNode: a } = e, { PageComponent: r, setupPage: c, getApp: u } = t;
|
|
304
304
|
return {
|
|
305
305
|
mpType: "page",
|
|
306
306
|
async setup() {
|
|
307
|
-
const p = u()?.$route?.query || {}, { loader: d, component: l } = n,
|
|
307
|
+
const p = u()?.$route?.query || {}, { loader: d, component: l } = n, S = d ? await d(n) : l || {};
|
|
308
308
|
return () => (o(), i(r, null, {
|
|
309
309
|
page: s(() => [
|
|
310
310
|
a(
|
|
311
|
-
c(
|
|
311
|
+
c(S),
|
|
312
312
|
Object.assign({}, p, { ref: "page" }),
|
|
313
313
|
null,
|
|
314
314
|
512
|
|
@@ -319,7 +319,7 @@ function K(e, t, n) {
|
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function q(e, t, n) {
|
|
323
323
|
const { path: o, style: i = {}, meta: s = {}, home: a, id: r } = t, c = e.tabBar?.list || [], u = c.findIndex((l) => l.pagePath === o || l.pagePath?.endsWith(r)), _ = c[u], p = !!_, d = n === 0;
|
|
324
324
|
return {
|
|
325
325
|
isTabBar: p,
|
|
@@ -328,16 +328,16 @@ function Y(e, t, n) {
|
|
|
328
328
|
isEntry: a ?? d,
|
|
329
329
|
navigationBar: {
|
|
330
330
|
type: "default",
|
|
331
|
-
...
|
|
331
|
+
...T(i)
|
|
332
332
|
},
|
|
333
333
|
isNVue: !1,
|
|
334
334
|
route: _ ? _.pagePath : o,
|
|
335
335
|
...s
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function z(e, t, n, o, i = window) {
|
|
339
339
|
const s = n.map((a, r) => {
|
|
340
|
-
const c =
|
|
340
|
+
const c = q(o, a, r), u = Y(e, t, a), { path: _ } = a;
|
|
341
341
|
return {
|
|
342
342
|
path: _,
|
|
343
343
|
alias: _,
|
|
@@ -351,10 +351,10 @@ function q(e, t, n, o, i = window) {
|
|
|
351
351
|
});
|
|
352
352
|
i.__uniRoutes = s, i.__uniLayout = {};
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
|
|
354
|
+
function X(e, t, n = window) {
|
|
355
|
+
h(n, String(e), t);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Z(e, t) {
|
|
358
358
|
if (!t) return;
|
|
359
359
|
[
|
|
360
360
|
"View",
|
|
@@ -396,8 +396,8 @@ function X(e, t) {
|
|
|
396
396
|
e.component(o, i);
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
const t =
|
|
399
|
+
function ae(e) {
|
|
400
|
+
const t = V(e), {
|
|
401
401
|
Vue: n,
|
|
402
402
|
App: o,
|
|
403
403
|
UniH5: i,
|
|
@@ -410,17 +410,17 @@ function ie(e) {
|
|
|
410
410
|
if (!i)
|
|
411
411
|
return n.createApp(o);
|
|
412
412
|
const { plugin: _, setupApp: p } = i;
|
|
413
|
-
|
|
413
|
+
H(t, c), $(t, c), K(i, c), z(n, i, s, a, c), X(r.appid || Date.now(), u, c);
|
|
414
414
|
const d = n.createApp(p(o));
|
|
415
|
-
return d.use(
|
|
415
|
+
return d.use(Z, i), d.use(_), d;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function se(e, t) {
|
|
418
418
|
const n = {};
|
|
419
419
|
return Object.entries(e).forEach(([o, i]) => {
|
|
420
420
|
N.includes(o) && i && (n[o] = t(i));
|
|
421
421
|
}), n;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function E(e, t) {
|
|
424
424
|
return async () => {
|
|
425
425
|
const n = await e.getDsl(t);
|
|
426
426
|
if (n) {
|
|
@@ -430,14 +430,14 @@ function m(e, t) {
|
|
|
430
430
|
return null;
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
async function
|
|
433
|
+
async function re(e, t = !1, n = m) {
|
|
434
434
|
const o = e.project?.pages || [], i = [];
|
|
435
435
|
for (const a of o) {
|
|
436
436
|
const r = e.project?.homepage === a.id;
|
|
437
437
|
i.push({
|
|
438
438
|
id: a.id,
|
|
439
439
|
path: `${n}/${a.id}`,
|
|
440
|
-
loader:
|
|
440
|
+
loader: E(e, a.id),
|
|
441
441
|
style: {
|
|
442
442
|
navigationBarTitleText: a.title,
|
|
443
443
|
...a.style
|
|
@@ -448,7 +448,7 @@ async function se(e, t = !1, n = f) {
|
|
|
448
448
|
}
|
|
449
449
|
const s = i.find((a) => !!a.home) || i[0];
|
|
450
450
|
if (s) {
|
|
451
|
-
const a = n ===
|
|
451
|
+
const a = n === m ? "/" : n;
|
|
452
452
|
i.unshift({
|
|
453
453
|
...s,
|
|
454
454
|
path: a
|
|
@@ -460,7 +460,7 @@ async function se(e, t = !1, n = f) {
|
|
|
460
460
|
i.push({
|
|
461
461
|
id: r.id,
|
|
462
462
|
path: `${n}/${r.id}`,
|
|
463
|
-
loader:
|
|
463
|
+
loader: E(e, r.id),
|
|
464
464
|
style: {
|
|
465
465
|
navigationStyle: "custom"
|
|
466
466
|
}
|
|
@@ -468,51 +468,62 @@ async function se(e, t = !1, n = f) {
|
|
|
468
468
|
}
|
|
469
469
|
return i;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
|
|
471
|
+
function g() {
|
|
472
|
+
if (typeof uni < "u")
|
|
473
|
+
return uni;
|
|
474
|
+
if (typeof globalThis < "u" && globalThis.uni)
|
|
475
|
+
return globalThis.uni;
|
|
476
|
+
if (typeof window < "u" && window.uni)
|
|
477
|
+
return window.uni;
|
|
478
|
+
}
|
|
479
|
+
function ce() {
|
|
480
|
+
const e = g();
|
|
481
|
+
return e?.showLoading && e.showLoading({
|
|
473
482
|
title: "加载中...",
|
|
474
483
|
mask: !0
|
|
475
484
|
}), {
|
|
476
485
|
close: () => {
|
|
477
|
-
|
|
486
|
+
const t = g();
|
|
487
|
+
t?.hideLoading && t.hideLoading();
|
|
478
488
|
}
|
|
479
489
|
};
|
|
480
490
|
}
|
|
481
|
-
async function
|
|
482
|
-
|
|
491
|
+
async function Q(e, t = "", n = "warning") {
|
|
492
|
+
const o = g();
|
|
493
|
+
return o?.showModal ? o.showModal({
|
|
483
494
|
title: t,
|
|
484
495
|
content: e,
|
|
485
496
|
showCancel: !1
|
|
486
|
-
}) : (window.alert(e), !0);
|
|
497
|
+
}) : (typeof window < "u" && window.alert(e), !0);
|
|
487
498
|
}
|
|
488
|
-
async function
|
|
489
|
-
return
|
|
499
|
+
async function ue(e) {
|
|
500
|
+
return Q(e);
|
|
490
501
|
}
|
|
491
502
|
export {
|
|
492
503
|
N as APP_LIFE_CYCLE,
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
504
|
+
A as COMPONENT_LIFE_CYCLES_LIST,
|
|
505
|
+
F as MANIFEST_JSON,
|
|
506
|
+
x as PAGES_JSON,
|
|
507
|
+
te as PAGE_LIFE_CYCLES_LIST,
|
|
508
|
+
m as ROUTE_PAGE_BASE_PATH,
|
|
509
|
+
ue as alert,
|
|
510
|
+
se as createUniAppComponent,
|
|
511
|
+
E as createUniLoader,
|
|
512
|
+
re as createUniRoutes,
|
|
513
|
+
ie as getFileId,
|
|
514
|
+
k as getGobalStyle,
|
|
515
|
+
T as getNavigationBar,
|
|
516
|
+
X as injectUniCSS,
|
|
517
|
+
$ as injectUniConfig,
|
|
518
|
+
H as injectUniFeatures,
|
|
519
|
+
K as injectUniGlobal,
|
|
520
|
+
z as injectUniRoutes,
|
|
521
|
+
Z as install,
|
|
522
|
+
ce as loading,
|
|
523
|
+
V as mergeOptions,
|
|
524
|
+
f as navigationBarMaps,
|
|
525
|
+
Q as notify,
|
|
526
|
+
ae as setupUniApp,
|
|
527
|
+
oe as toKebabCase,
|
|
528
|
+
ne as version
|
|
518
529
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/uni
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.17.
|
|
5
|
+
* @version 0.17.7
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const L="0.17.6",I=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],U=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted"],k=["onLoad","onShow","onReady","onHide","onUnload","onResize","onPullDownRefresh","onReachBottom","onTabItemTap","onShareAppMessage","onPageScroll","onNavigationBarButtonTap","onBackPress","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputClicked","onShareTimeline","onAddToFavorites",...U],S="/pages",h={name:"VTJ",appid:"__UNI__1FC118B",description:"VTJ移动跨端项目",versionName:"1.0.0",versionCode:"100",transformPx:!1,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:{},"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:{enable:!1},vueVersion:"3"},C={pages:[],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},easycom:{autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}}};function V(e){const[t,...n]=e;return[t.toLowerCase(),...n].join("").replace(/[A-Z]/g,i=>"-".concat(i.toLowerCase()))}function w(e){let{manifestJson:t={},pagesJson:n={},routes:o=[]}=e;const i=o.map(u=>{const{path:a,style:d,needLogin:_}=u;return{path:a,style:d,needLogin:_}});return{...e,manifestJson:Object.assign({},h,t),pagesJson:Object.assign({},C,n,{pages:i})}}const T={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function A(e){const t={},n={black:"#000000",white:"#ffffff"};for(const o in e)T[o]&&(t[T[o]]=o==="navigationBarTextStyle"?n[e[o]]||n.black:e[o]);return t}function R(e){const t={};for(const n in e)T[n]||(t[n]=e[n]);return t}function W(e){var o;const n=e.split("?")[0].match(/\#\/pages\/([\w\W]*)/i);return(o=n==null?void 0:n[1])!=null?o:""}function j(e){var n;const t=e.h5;return((n=t==null?void 0:t.router)==null?void 0:n.mode)||"hash"}function G(e){var t,n,o;return{topWindow:!!((t=e.topWindow)!=null&&t.path),leftWindow:!!((n=e.leftWindow)!=null&&n.path),rightWindow:!!((o=e.rightWindow)!=null&&o.path)}}function M(e){const{pagesJson:t={}}=e,{globalStyle:n,pages:o=[]}=t;return!!(n!=null&&n.enablePullDownRefresh||o.find(i=>{var u;return!!((u=i.style)!=null&&u.enablePullDownRefresh)}))}function D(e){const{pagesJson:t={}}=e,{globalStyle:n,pages:o=[]}=t;let i=!1;return(n==null?void 0:n.navigationStyle)==="custom"?(i=!0,o.find(u=>{var a;return((a=u.style)==null?void 0:a.navigationStyle)==="default"})&&(i=!1)):o.every(u=>{var a;return((a=u.style)==null?void 0:a.navigationStyle)==="custom"})&&(i=!0),i}function J(e){var d;const t=D(e),n={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:o={}}=e,{globalStyle:i,pages:u=[]}=o;if(t)return n;n.navigationBar=!0;const a=(d=i==null?void 0:i.h5)==null?void 0:d.titleNView;return u.find(_=>{var s,c,l;return!!((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)!=null&&l.buttons.length)})&&(n.navigationBarButtons=!0),(a!=null&&a.searchInput||u.find(_=>{var s,c,l;return!!((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)!=null&&l.searchInput)}))&&(n.navigationBarSearchInput=!0),((a==null?void 0:a.type)==="transparent"||u.find(_=>{var s,c,l;return((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)==null?void 0:l.type)==="transparent"}))&&(n.navigationBarTransparent=!0),n}function B(e,t=window){var p,g,E,f;const{pagesJson:n={},manifestJson:o={}}=e,{topWindow:i,leftWindow:u,rightWindow:a}=G(n),{navigationBar:d,navigationBarButtons:_,navigationBarSearchInput:s,navigationBarTransparent:c}=J(e),l={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:j(o),__UNI_FEATURE_PAGES__:!!((p=n.pages)!=null&&p.length),__UNI_FEATURE_TABBAR__:!!((E=(g=n.tabBar)==null?void 0:g.list)!=null&&E.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((f=n.tabBar)!=null&&f.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:u,__UNI_FEATURE_RIGHTWINDOW__:a,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:d,__UNI_FEATURE_PULL_DOWN_REFRESH__:M(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:_,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:s,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:c};Object.entries(l).forEach(([Z,Q])=>{t[Z]=Q})}const H="4.76";function y(e,t=window){var l,p;const{pagesJson:n={},manifestJson:o={}}=e,{easycom:i={}}=n,{appid:u="",name:a="",versionCode:d="",versionName:_=""}=o,s=n.globalStyle,c=((l=o.h5)==null?void 0:l.router)||{};t.__uniConfig={easycom:i,globalStyle:{...R(s),navigationBar:A(s),isNVue:!1},compilerVersion:H,appId:u,appName:a,appVersion:_,appVersionCode:String(d),async:{loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0,...((p=o.h5)==null?void 0:p.async)||{}},debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4,...o.networkTimeout||{}},sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:{mode:"hash",base:"/",assets:"assets",routerBase:c.base||"/",...c},darkmode:!1,themeConfig:{},tabBar:n.tabBar?{position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0,...n.tabBar}:void 0}}function v(e,t=window){const{UniServiceJSBridge:n,UniViewJSBridge:o,getApp:i,uni:u,getCurrentPages:a,upx2px:d,setupPage:_}=e;t.UniServiceJSBridge=n,t.UniViewJSBridge=o,t.getApp=i,t.uni=u,t.wx=u,t.getCurrentPages=a,t.upx2px=d,t.__setupPage=s=>_(s)}function x(e,t,n){const{openBlock:o,createBlock:i,withCtx:u,createVNode:a}=e,{PageComponent:d,setupPage:_,getApp:s}=t;return{mpType:"page",async setup(){var f;const c=s(),l=((f=c==null?void 0:c.$route)==null?void 0:f.query)||{},{loader:p,component:g}=n,E=p?await p(n):g||{};return()=>(o(),i(d,null,{page:u(()=>[a(_(E),Object.assign({},l,{ref:"page"}),null,512)]),_:1}))}}}function $(e,t,n){var g;const{path:o,style:i={},meta:u={},home:a,id:d}=t,_=((g=e.tabBar)==null?void 0:g.list)||[],s=_.findIndex(E=>{var f;return E.pagePath===o||((f=E.pagePath)==null?void 0:f.endsWith(d))}),c=_[s],l=!!c,p=n===0;return{isTabBar:l,tabBarIndex:s,isQuit:a!=null?a:p,isEntry:a!=null?a:p,navigationBar:{type:"default",...A(i)},isNVue:!1,route:c?c.pagePath:o,...u}}function F(e,t,n,o,i=window){const u=n.map((a,d)=>{const _=$(o,a,d),s=x(e,t,a),{path:c}=a;return{path:c,alias:c,meta:_,component:{render(){return e.h(e.Suspense,[e.h(s)])}}}});i.__uniRoutes=u,i.__uniLayout={}}function P(e,t,n=window){m.adoptedStyleSheets(n,String(e),t)}function b(e,t){if(!t)return;["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(o=>{const i=t[o];e.component(o,i)})}function Y(e){const t=w(e),{Vue:n,App:o,UniH5:i,routes:u=[],pagesJson:a={},manifestJson:d={},window:_,css:s=""}=t;if(!i)return n.createApp(o);const{plugin:c,setupApp:l}=i;B(t,_),y(t,_),v(i,_),F(n,i,u,a,_),P(d.appid||Date.now(),s,_);const p=n.createApp(l(o));return p.use(b,i),p.use(c),p}function q(e,t){const n={};return Object.entries(e).forEach(([o,i])=>{I.includes(o)&&i&&(n[o]=t(i))}),n}function N(e,t){return async()=>{const n=await e.getDsl(t);if(n){const{renderer:o}=e.createDslRenderer(n);return o}return null}}async function K(e,t=!1,n=S){var a,d,_;const o=((a=e.project)==null?void 0:a.pages)||[],i=[];for(const s of o){const c=((d=e.project)==null?void 0:d.homepage)===s.id;i.push({id:s.id,path:"".concat(n,"/").concat(s.id),loader:N(e,s.id),style:{navigationBarTitleText:s.title,...s.style},needLogin:s.needLogin,home:c})}const u=i.find(s=>!!s.home)||i[0];if(u){const s=n===S?"/":n;i.unshift({...u,path:s})}if(t){const s=((_=e.project)==null?void 0:_.blocks)||[];for(const c of s)i.push({id:c.id,path:"".concat(n,"/").concat(c.id),loader:N(e,c.id),style:{navigationStyle:"custom"}})}return i}function z(){var e;return(e=window.uni)!=null&&e.showLoading&&window.uni.showLoading({title:"加载中...",mask:!0}),{close:()=>{var t;(t=window.uni)!=null&&t.hideLoading&&window.uni.hideLoading()}}}async function O(e,t="",n="warning"){var o;return(o=window.uni)!=null&&o.showModal?window.uni.showModal({title:t,content:e,showCancel:!1}):(window.alert(e),!0)}async function X(e){return O(e)}r.APP_LIFE_CYCLE=I,r.COMPONENT_LIFE_CYCLES_LIST=U,r.MANIFEST_JSON=h,r.PAGES_JSON=C,r.PAGE_LIFE_CYCLES_LIST=k,r.ROUTE_PAGE_BASE_PATH=S,r.alert=X,r.createUniAppComponent=q,r.createUniLoader=N,r.createUniRoutes=K,r.getFileId=W,r.getGobalStyle=R,r.getNavigationBar=A,r.injectUniCSS=P,r.injectUniConfig=y,r.injectUniFeatures=B,r.injectUniGlobal=v,r.injectUniRoutes=F,r.install=b,r.loading=z,r.mergeOptions=w,r.navigationBarMaps=T,r.notify=O,r.setupUniApp=Y,r.toKebabCase=V,r.version=L,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
|
7
|
+
*/const k="0.17.7",I=["onLaunch","onShow","onHide","onError","onPageNotFound","onUnhandledRejection","onThemeChange","onPageNotFound","onUniNViewMessage","onExit"],h=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted"],V=["onLoad","onShow","onReady","onHide","onUnload","onResize","onPullDownRefresh","onReachBottom","onTabItemTap","onShareAppMessage","onPageScroll","onNavigationBarButtonTap","onBackPress","onNavigationBarSearchInputChanged","onNavigationBarSearchInputConfirmed","onNavigationBarSearchInputClicked","onShareTimeline","onAddToFavorites",...h],S="/pages",C={name:"VTJ",appid:"__UNI__1FC118B",description:"VTJ移动跨端项目",versionName:"1.0.0",versionCode:"100",transformPx:!1,"app-plus":{usingComponents:!0,nvueStyleCompiler:"uni-app",compilerVersion:3,splashscreen:{alwaysShowBeforeRender:!0,waiting:!0,autoclose:!0,delay:0},modules:{},distribute:{android:{permissions:['<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>','<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>','<uses-permission android:name="android.permission.VIBRATE"/>','<uses-permission android:name="android.permission.READ_LOGS"/>','<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>','<uses-feature android:name="android.hardware.camera.autofocus"/>','<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>','<uses-permission android:name="android.permission.CAMERA"/>','<uses-permission android:name="android.permission.GET_ACCOUNTS"/>','<uses-permission android:name="android.permission.READ_PHONE_STATE"/>','<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>','<uses-permission android:name="android.permission.WAKE_LOCK"/>','<uses-permission android:name="android.permission.FLASHLIGHT"/>','<uses-feature android:name="android.hardware.camera"/>','<uses-permission android:name="android.permission.WRITE_SETTINGS"/>']},ios:{},sdkConfigs:{},icons:{android:{hdpi:"src/static/logo.png",xhdpi:"src/static/logo.png",xxhdpi:"src/static/logo.png",xxxhdpi:"src/static/logo.png"}}}},quickapp:{},"mp-weixin":{appid:"",setting:{urlCheck:!1},usingComponents:!0},"mp-alipay":{usingComponents:!0},"mp-baidu":{usingComponents:!0},"mp-toutiao":{usingComponents:!0},uniStatistics:{enable:!1},vueVersion:"3"},R={pages:[],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},easycom:{autoscan:!0,custom:{"^uni-(.*)":"@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"}}};function W(e){const[t,...n]=e;return[t.toLowerCase(),...n].join("").replace(/[A-Z]/g,i=>"-".concat(i.toLowerCase()))}function w(e){let{manifestJson:t={},pagesJson:n={},routes:o=[]}=e;const i=o.map(u=>{const{path:a,style:d,needLogin:_}=u;return{path:a,style:d,needLogin:_}});return{...e,manifestJson:Object.assign({},C,t),pagesJson:Object.assign({},R,n,{pages:i})}}const T={navigationBarBackgroundColor:"backgroundColor",navigationBarTextStyle:"titleColor",navigationBarTitleText:"titleText",navigationStyle:"style",titleImage:"titleImage",titlePenetrate:"titlePenetrate",transparentTitle:"transparentTitle"};function A(e){const t={},n={black:"#000000",white:"#ffffff"};for(const o in e)T[o]&&(t[T[o]]=o==="navigationBarTextStyle"?n[e[o]]||n.black:e[o]);return t}function B(e){const t={};for(const n in e)T[n]||(t[n]=e[n]);return t}function j(e){var o;const n=e.split("?")[0].match(/\#\/pages\/([\w\W]*)/i);return(o=n==null?void 0:n[1])!=null?o:""}function G(e){var n;const t=e.h5;return((n=t==null?void 0:t.router)==null?void 0:n.mode)||"hash"}function M(e){var t,n,o;return{topWindow:!!((t=e.topWindow)!=null&&t.path),leftWindow:!!((n=e.leftWindow)!=null&&n.path),rightWindow:!!((o=e.rightWindow)!=null&&o.path)}}function D(e){const{pagesJson:t={}}=e,{globalStyle:n,pages:o=[]}=t;return!!(n!=null&&n.enablePullDownRefresh||o.find(i=>{var u;return!!((u=i.style)!=null&&u.enablePullDownRefresh)}))}function J(e){const{pagesJson:t={}}=e,{globalStyle:n,pages:o=[]}=t;let i=!1;return(n==null?void 0:n.navigationStyle)==="custom"?(i=!0,o.find(u=>{var a;return((a=u.style)==null?void 0:a.navigationStyle)==="default"})&&(i=!1)):o.every(u=>{var a;return((a=u.style)==null?void 0:a.navigationStyle)==="custom"})&&(i=!0),i}function H(e){var d;const t=J(e),n={navigationBar:!1,navigationBarButtons:!1,navigationBarSearchInput:!1,navigationBarTransparent:!1},{pagesJson:o={}}=e,{globalStyle:i,pages:u=[]}=o;if(t)return n;n.navigationBar=!0;const a=(d=i==null?void 0:i.h5)==null?void 0:d.titleNView;return u.find(_=>{var s,c,l;return!!((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)!=null&&l.buttons.length)})&&(n.navigationBarButtons=!0),(a!=null&&a.searchInput||u.find(_=>{var s,c,l;return!!((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)!=null&&l.searchInput)}))&&(n.navigationBarSearchInput=!0),((a==null?void 0:a.type)==="transparent"||u.find(_=>{var s,c,l;return((l=(c=(s=_.style)==null?void 0:s.h5)==null?void 0:c.titleNView)==null?void 0:l.type)==="transparent"}))&&(n.navigationBarTransparent=!0),n}function y(e,t=window){var p,g,E,f;const{pagesJson:n={},manifestJson:o={}}=e,{topWindow:i,leftWindow:u,rightWindow:a}=M(n),{navigationBar:d,navigationBarButtons:_,navigationBarSearchInput:s,navigationBarTransparent:c}=H(e),l={__VUE_OPTIONS_API__:!0,__VUE_PROD_DEVTOOLS__:!1,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:!1,__UNI_FEATURE_WX__:!1,__UNI_FEATURE_WXS__:!1,__UNI_FEATURE_RPX__:!1,__UNI_FEATURE_PROMISE__:!1,__UNI_FEATURE_LONGPRESS__:!1,__UNI_FEATURE_I18N_EN__:!1,__UNI_FEATURE_I18N_ES__:!1,__UNI_FEATURE_I18N_FR__:!1,__UNI_FEATURE_I18N_ZH_HANS__:!0,__UNI_FEATURE_I18N_ZH_HANT__:!1,__UNI_FEATURE_UNI_CLOUD__:!1,__UNI_FEATURE_I18N_LOCALE__:!1,__UNI_FEATURE_NVUE__:!1,__UNI_FEATURE_ROUTER_MODE__:G(o),__UNI_FEATURE_PAGES__:!!((p=n.pages)!=null&&p.length),__UNI_FEATURE_TABBAR__:!!((E=(g=n.tabBar)==null?void 0:g.list)!=null&&E.length),__UNI_FEATURE_TABBAR_MIDBUTTON__:!!((f=n.tabBar)!=null&&f.midButton),__UNI_FEATURE_TOPWINDOW__:i,__UNI_FEATURE_LEFTWINDOW__:u,__UNI_FEATURE_RIGHTWINDOW__:a,__UNI_FEATURE_RESPONSIVE__:!1,__UNI_FEATURE_NAVIGATIONBAR__:d,__UNI_FEATURE_PULL_DOWN_REFRESH__:D(e),__UNI_FEATURE_NAVIGATIONBAR_BUTTONS__:_,__UNI_FEATURE_NAVIGATIONBAR_SEARCHINPUT__:s,__UNI_FEATURE_NAVIGATIONBAR_TRANSPARENT__:c};Object.entries(l).forEach(([Q,nn])=>{t[Q]=nn})}const x="4.76";function v(e,t=window){var l,p;const{pagesJson:n={},manifestJson:o={}}=e,{easycom:i={}}=n,{appid:u="",name:a="",versionCode:d="",versionName:_=""}=o,s=n.globalStyle,c=((l=o.h5)==null?void 0:l.router)||{};t.__uniConfig={easycom:i,globalStyle:{...B(s),navigationBar:A(s),isNVue:!1},compilerVersion:x,appId:u,appName:a,appVersion:_,appVersionCode:String(d),async:{loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0,...((p=o.h5)==null?void 0:p.async)||{}},debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4,...o.networkTimeout||{}},sdkConfigs:{},nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:{},router:{mode:"hash",base:"/",assets:"assets",routerBase:c.base||"/",...c},darkmode:!1,themeConfig:{},tabBar:n.tabBar?{position:"bottom",color:"#7A7E83",selectedColor:"#3cc51f",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",backgroundColor:"#ffffff",selectedIndex:0,shown:!0,...n.tabBar}:void 0}}function F(e,t=window){const{UniServiceJSBridge:n,UniViewJSBridge:o,getApp:i,uni:u,getCurrentPages:a,upx2px:d,setupPage:_}=e;t.UniServiceJSBridge=n,t.UniViewJSBridge=o,t.getApp=i,t.uni=u,t.wx=u,t.getCurrentPages=a,t.upx2px=d,t.__setupPage=s=>_(s)}function $(e,t,n){const{openBlock:o,createBlock:i,withCtx:u,createVNode:a}=e,{PageComponent:d,setupPage:_,getApp:s}=t;return{mpType:"page",async setup(){var f;const c=s(),l=((f=c==null?void 0:c.$route)==null?void 0:f.query)||{},{loader:p,component:g}=n,E=p?await p(n):g||{};return()=>(o(),i(d,null,{page:u(()=>[a(_(E),Object.assign({},l,{ref:"page"}),null,512)]),_:1}))}}}function Y(e,t,n){var g;const{path:o,style:i={},meta:u={},home:a,id:d}=t,_=((g=e.tabBar)==null?void 0:g.list)||[],s=_.findIndex(E=>{var f;return E.pagePath===o||((f=E.pagePath)==null?void 0:f.endsWith(d))}),c=_[s],l=!!c,p=n===0;return{isTabBar:l,tabBarIndex:s,isQuit:a!=null?a:p,isEntry:a!=null?a:p,navigationBar:{type:"default",...A(i)},isNVue:!1,route:c?c.pagePath:o,...u}}function b(e,t,n,o,i=window){const u=n.map((a,d)=>{const _=Y(o,a,d),s=$(e,t,a),{path:c}=a;return{path:c,alias:c,meta:_,component:{render(){return e.h(e.Suspense,[e.h(s)])}}}});i.__uniRoutes=u,i.__uniLayout={}}function P(e,t,n=window){m.adoptedStyleSheets(n,String(e),t)}function O(e,t){if(!t)return;["View","ScrollView","Swiper","MovableArea","MovableView","CoverView","CoverImage","Icon","Text","RichText","Progress","Button","CheckboxGroup","Checkbox","Editor","Form","Input","Label","Picker","PickerView","RadioGroup","Radio","Slider","Switch","Textarea","Navigator","Image","Video","Map","Canvas","WebView","PickerViewColumn","ResizeSensor","SwiperItem"].forEach(o=>{const i=t[o];e.component(o,i)})}function q(e){const t=w(e),{Vue:n,App:o,UniH5:i,routes:u=[],pagesJson:a={},manifestJson:d={},window:_,css:s=""}=t;if(!i)return n.createApp(o);const{plugin:c,setupApp:l}=i;y(t,_),v(t,_),F(i,_),b(n,i,u,a,_),P(d.appid||Date.now(),s,_);const p=n.createApp(l(o));return p.use(O,i),p.use(c),p}function K(e,t){const n={};return Object.entries(e).forEach(([o,i])=>{I.includes(o)&&i&&(n[o]=t(i))}),n}function N(e,t){return async()=>{const n=await e.getDsl(t);if(n){const{renderer:o}=e.createDslRenderer(n);return o}return null}}async function z(e,t=!1,n=S){var a,d,_;const o=((a=e.project)==null?void 0:a.pages)||[],i=[];for(const s of o){const c=((d=e.project)==null?void 0:d.homepage)===s.id;i.push({id:s.id,path:"".concat(n,"/").concat(s.id),loader:N(e,s.id),style:{navigationBarTitleText:s.title,...s.style},needLogin:s.needLogin,home:c})}const u=i.find(s=>!!s.home)||i[0];if(u){const s=n===S?"/":n;i.unshift({...u,path:s})}if(t){const s=((_=e.project)==null?void 0:_.blocks)||[];for(const c of s)i.push({id:c.id,path:"".concat(n,"/").concat(c.id),loader:N(e,c.id),style:{navigationStyle:"custom"}})}return i}function U(){if(typeof uni<"u")return uni;if(typeof globalThis<"u"&&globalThis.uni)return globalThis.uni;if(typeof window<"u"&&window.uni)return window.uni}function X(){const e=U();return e!=null&&e.showLoading&&e.showLoading({title:"加载中...",mask:!0}),{close:()=>{const t=U();t!=null&&t.hideLoading&&t.hideLoading()}}}async function L(e,t="",n="warning"){const o=U();return o!=null&&o.showModal?o.showModal({title:t,content:e,showCancel:!1}):(typeof window<"u"&&window.alert(e),!0)}async function Z(e){return L(e)}r.APP_LIFE_CYCLE=I,r.COMPONENT_LIFE_CYCLES_LIST=h,r.MANIFEST_JSON=C,r.PAGES_JSON=R,r.PAGE_LIFE_CYCLES_LIST=V,r.ROUTE_PAGE_BASE_PATH=S,r.alert=Z,r.createUniAppComponent=K,r.createUniLoader=N,r.createUniRoutes=z,r.getFileId=j,r.getGobalStyle=B,r.getNavigationBar=A,r.injectUniCSS=P,r.injectUniConfig=v,r.injectUniFeatures=y,r.injectUniGlobal=F,r.injectUniRoutes=b,r.install=O,r.loading=X,r.mergeOptions=w,r.navigationBarMaps=T,r.notify=L,r.setupUniApp=q,r.toKebabCase=W,r.version=k,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtj/uni",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"keywords": [
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"author": "chenhuachun",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@vtj/core": "~0.17.
|
|
26
|
-
"@vtj/icons": "~0.17.
|
|
27
|
-
"@vtj/utils": "~0.17.
|
|
28
|
-
"@vtj/renderer": "~0.17.
|
|
25
|
+
"@vtj/core": "~0.17.7",
|
|
26
|
+
"@vtj/icons": "~0.17.7",
|
|
27
|
+
"@vtj/utils": "~0.17.7",
|
|
28
|
+
"@vtj/renderer": "~0.17.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@dcloudio/uni-app": "3.0.0-4070620250821001",
|
package/types/shared.d.ts
CHANGED
package/types/version.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/uni
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.17.
|
|
5
|
+
* @version 0.17.6
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
7
|
*/
|
|
8
|
-
export declare const version = "0.17.
|
|
8
|
+
export declare const version = "0.17.6";
|