@mpxjs/core 2.10.19 → 2.10.20

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/@types/index.d.ts CHANGED
@@ -373,7 +373,7 @@ export interface RnConfig {
373
373
  * @param params.package 分包名
374
374
  * @returns Promise,表示加载完成
375
375
  */
376
- loadChunkAsync?: (params: { url: string; package: string }) => Promise<any>
376
+ loadChunkAsync?: (params: { url: string; package: string }) => Promise<null>
377
377
 
378
378
  /**
379
379
  * 下载多个异步分包的方法(不执行)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.10.19",
3
+ "version": "2.10.20",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -19,14 +19,13 @@
19
19
  ],
20
20
  "main": "src/index.js",
21
21
  "dependencies": {
22
- "@mpxjs/utils": "^2.10.18",
22
+ "@mpxjs/utils": "^2.10.20",
23
23
  "lodash": "^4.1.1",
24
24
  "miniprogram-api-typings": "^3.10.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@d11/react-native-fast-image": "*",
28
28
  "@mpxjs/api-proxy": "^2.9.0",
29
- "@mpxjs/store": "^2.9.0",
30
29
  "@react-navigation/native": "*",
31
30
  "@react-navigation/native-stack": "*",
32
31
  "react": "*",
@@ -37,6 +36,7 @@
37
36
  "react-native-safe-area-context": "*",
38
37
  "react-native-screens": "*",
39
38
  "react-native-video": "*",
39
+ "react-native-vision-camera": "*",
40
40
  "react-native-webview": "*",
41
41
  "vue": "^2.7.10",
42
42
  "vue-demi": "^0.14.6",
@@ -44,16 +44,16 @@
44
44
  "vue-i18n-bridge": "^9.2.2"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
- "vue": {
47
+ "@mpxjs/api-proxy": {
48
48
  "optional": true
49
49
  },
50
- "vue-demi": {
50
+ "@d11/react-native-fast-image": {
51
51
  "optional": true
52
52
  },
53
- "vue-i18n": {
53
+ "@react-navigation/native": {
54
54
  "optional": true
55
55
  },
56
- "vue-i18n-bridge": {
56
+ "@react-navigation/native-stack": {
57
57
  "optional": true
58
58
  },
59
59
  "react": {
@@ -62,13 +62,13 @@
62
62
  "react-native": {
63
63
  "optional": true
64
64
  },
65
- "react-native-reanimated": {
65
+ "react-native-gesture-handler": {
66
66
  "optional": true
67
67
  },
68
- "@react-navigation/native": {
68
+ "react-native-linear-gradient": {
69
69
  "optional": true
70
70
  },
71
- "@react-navigation/native-stack": {
71
+ "react-native-reanimated": {
72
72
  "optional": true
73
73
  },
74
74
  "react-native-safe-area-context": {
@@ -77,19 +77,25 @@
77
77
  "react-native-screens": {
78
78
  "optional": true
79
79
  },
80
+ "react-native-video": {
81
+ "optional": true
82
+ },
80
83
  "react-native-webview": {
81
84
  "optional": true
82
85
  },
83
- "react-native-gesture-handler": {
86
+ "react-native-vision-camera": {
84
87
  "optional": true
85
88
  },
86
- "react-native-linear-gradient": {
89
+ "vue": {
87
90
  "optional": true
88
91
  },
89
- "@d11/react-native-fast-image": {
92
+ "vue-demi": {
90
93
  "optional": true
91
94
  },
92
- "react-native-video": {
95
+ "vue-i18n": {
96
+ "optional": true
97
+ },
98
+ "vue-i18n-bridge": {
93
99
  "optional": true
94
100
  }
95
101
  },
@@ -113,5 +119,5 @@
113
119
  "url": "https://github.com/didi/mpx/issues"
114
120
  },
115
121
  "sideEffects": false,
116
- "gitHead": "ca50ba6b1361f3c7790746476dd8b8e6be802ea3"
122
+ "gitHead": "929d7a7954124c436aa24e0a66f71512a0ea1c8e"
117
123
  }
@@ -19,7 +19,11 @@ export default function pageStatusMixin (mixinType) {
19
19
  // 处理以上平台直接透传encode的结果,给到onload第二个参数供开发者使用
20
20
  if (isObject(rawQuery)) {
21
21
  for (const key in rawQuery) {
22
- decodedQuery[key] = decodeURIComponent(rawQuery[key])
22
+ try {
23
+ decodedQuery[key] = decodeURIComponent(rawQuery[key])
24
+ } catch (e) {
25
+ decodedQuery[key] = rawQuery[key]
26
+ }
23
27
  }
24
28
  }
25
29
  this.__mpxProxy.callHook(ONLOAD, [rawQuery, decodedQuery])
@@ -268,13 +268,13 @@ export default function styleHelperMixin () {
268
268
  let localStyle, appStyle
269
269
  if (localStyle = this.__getClassStyle?.(className)) {
270
270
  if (localStyle._media?.length) {
271
- mergeResult(localStyle._default, getMediaStyle(localStyle._media))
271
+ mergeResult(localStyle, getMediaStyle(localStyle._media))
272
272
  } else {
273
273
  mergeResult(localStyle)
274
274
  }
275
275
  } else if (appStyle = global.__getAppClassStyle?.(className)) {
276
276
  if (appStyle._media?.length) {
277
- mergeResult(appStyle._default, getMediaStyle(appStyle._media))
277
+ mergeResult(appStyle, getMediaStyle(appStyle._media))
278
278
  } else {
279
279
  mergeResult(appStyle)
280
280
  }
@@ -318,7 +318,11 @@ function createInstance ({ propsRef, type, rawOptions, currentInject, validProps
318
318
  const rawQuery = props.route.params || {}
319
319
  if (isObject(rawQuery)) {
320
320
  for (const key in rawQuery) {
321
- decodedQuery[key] = decodeURIComponent(rawQuery[key])
321
+ try {
322
+ decodedQuery[key] = decodeURIComponent(rawQuery[key])
323
+ } catch (e) {
324
+ decodedQuery[key] = rawQuery[key]
325
+ }
322
326
  }
323
327
  }
324
328
  proxy.callHook(ONLOAD, [rawQuery, decodedQuery])