@ray-js/router-mp 0.6.22-beta-1 → 0.6.23

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.
@@ -66,9 +66,15 @@ export var RouterScheduler = /*#__PURE__*/function (_IRouterScheduler) {
66
66
  keys.forEach(function (_ref) {
67
67
  var name = _ref.name;
68
68
  delete restQuery[name];
69
+ }); // 兼容小程序tab页,因tab页不能携带参数
70
+
71
+ keys.forEach(function (k) {
72
+ var _query$k$name;
73
+
74
+ return query[k.name] = (_query$k$name = query[k.name]) !== null && _query$k$name !== void 0 ? _query$k$name : '';
69
75
  });
70
76
  var href = compile(route.route, {
71
- validate: true
77
+ validate: false
72
78
  })(query) + hash;
73
79
  return url.params(href, restQuery);
74
80
  }
package/lib/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import "core-js/modules/es.array.map.js";
2
2
  import { router } from './Router';
3
- import { normalizeTabBar } from '@ray-js/framework-shared'; // import location from '@ray-js/location'
4
- // import { url } from '@ray-js/library'
5
-
3
+ import { normalizeTabBar } from '@ray-js/framework-shared';
6
4
  export function createRouter(params) {
7
5
  var _params$tabBar = params.tabBar,
8
6
  tabBar = _params$tabBar === void 0 ? {} : _params$tabBar,
@@ -16,16 +14,11 @@ export function createRouter(params) {
16
14
 
17
15
  var _tabBar = normalizeTabBar(tabBar, routes);
18
16
 
19
- // console.log('>>>>>>>>> mini app config', finalCfg)
20
17
  router.scheduler.registryPages({
21
18
  routes: routes,
22
19
  subpackages: subpackages,
23
20
  tabBar: _tabBar
24
21
  });
25
- global.router = router; // router.parse = url.parse
26
- // router.format = url.format
27
- // console.log('>>>>>>>>>.location0', location)
28
-
29
22
  return router;
30
23
  }
31
24
  export default router;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/router-mp",
3
- "version": "0.6.22-beta-1",
3
+ "version": "0.6.23",
4
4
  "description": "Ray Core",
5
5
  "keywords": [
6
6
  "ray"
@@ -20,16 +20,16 @@
20
20
  "watch": "tsc -p ./tsconfig.build.json --module esnext --outDir lib --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@ray-js/api": "^0.6.22-beta-1",
24
- "@ray-js/env": "^0.6.22-beta-1",
25
- "@ray-js/library": "^0.6.22-beta-1",
26
- "@ray-js/types": "^0.6.22-beta-1",
23
+ "@ray-js/api": "^0.6.23",
24
+ "@ray-js/env": "^0.6.23",
25
+ "@ray-js/library": "^0.6.23",
26
+ "@ray-js/types": "^0.6.23",
27
27
  "@react-navigation/core": "^6.1.0",
28
28
  "path-to-regexp": "^6.2.0",
29
29
  "slash": "^5.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@ray-js/cli": "^0.6.22-beta-1"
32
+ "@ray-js/cli": "^0.6.23"
33
33
  },
34
34
  "maintainers": [
35
35
  {
@@ -37,6 +37,6 @@
37
37
  "email": "tuyafe@tuya.com"
38
38
  }
39
39
  ],
40
- "gitHead": "2e905a1820d0adfc0a6ca8cf3ecf1f3a584a0d44",
40
+ "gitHead": "e60b0be5d086d6d24238c12b29eebc3cbbd3f0dd",
41
41
  "repository": {}
42
42
  }