@cloudbase/lowcode-builder 1.0.0 → 1.0.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@cloudbase/cals": "^0.3.31",
|
|
42
|
-
"@cloudbase/lowcode-generator": "^1.0.
|
|
42
|
+
"@cloudbase/lowcode-generator": "^1.0.1",
|
|
43
43
|
"axios": "^0.21.0",
|
|
44
44
|
"browserfs": "^1.4.3",
|
|
45
45
|
"browserify-zlib": "^0.2.0",
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
></script>
|
|
444
444
|
<script
|
|
445
445
|
crossorigin="anonymous"
|
|
446
|
-
src="https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/weda-cloud-sdk@1.0.
|
|
446
|
+
src="https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/weda-cloud-sdk@1.0.12/dist/h5.browser.js"
|
|
447
447
|
></script>
|
|
448
448
|
<script>
|
|
449
449
|
// zxing polifill
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
></script>
|
|
462
462
|
<script
|
|
463
463
|
crossorigin
|
|
464
|
-
src="https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
464
|
+
src="https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.1bdb55327899bf5969df.bundle.js"
|
|
465
465
|
></script>
|
|
466
466
|
</body>
|
|
467
467
|
</html>
|
|
@@ -15,6 +15,12 @@ function createNavigatorFn(fnName) {
|
|
|
15
15
|
? `/${packageName}/pages/${pageId}/index`
|
|
16
16
|
: `/pages/${pageId}/index`
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
if (fnName === 'navigateTo') {
|
|
20
|
+
navigateToFn(urlJoinParams(url, params), { events, success, fail, complete});
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
wx[fnName]({
|
|
19
25
|
url: urlJoinParams(url, params),
|
|
20
26
|
events,
|
|
@@ -25,6 +31,35 @@ function createNavigatorFn(fnName) {
|
|
|
25
31
|
}
|
|
26
32
|
}
|
|
27
33
|
|
|
34
|
+
/**
|
|
35
|
+
* 页面堆栈10以内使用wx.navigateTo,超过10则使用wx.redirectTo
|
|
36
|
+
* @param url
|
|
37
|
+
* @param param1
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
function navigateToFn(url, { events, success, fail, complete}) {
|
|
41
|
+
const pages = getCurrentPages();
|
|
42
|
+
if(pages && pages.length >= 10) {
|
|
43
|
+
wx.redirectTo({
|
|
44
|
+
url,
|
|
45
|
+
success,
|
|
46
|
+
fail,
|
|
47
|
+
complete
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
wx.navigateTo({
|
|
53
|
+
url,
|
|
54
|
+
// @types/weixin-app@2.9.3没有events的定义,但实际上官方文档有:https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateTo.html
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
events,
|
|
57
|
+
success,
|
|
58
|
+
fail,
|
|
59
|
+
complete
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
28
63
|
const navigateTo = createNavigatorFn('navigateTo')
|
|
29
64
|
const reLaunch = createNavigatorFn('reLaunch')
|
|
30
65
|
const redirectTo = createNavigatorFn('redirectTo')
|