@mpxjs/api-proxy 2.10.13-beta.1 → 2.10.15-1

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": "@mpxjs/api-proxy",
3
- "version": "2.10.13-beta.1",
3
+ "version": "2.10.15-1",
4
4
  "description": "convert miniprogram API at each end",
5
5
  "module": "src/index.js",
6
6
  "types": "@types/index.d.ts",
@@ -9,18 +9,23 @@ const getWindowInfo = function () {
9
9
  const navigationInsets = navigation.insets || {}
10
10
  const insets = Object.assign({}, initialWindowMetricsInset, navigationInsets)
11
11
  let safeArea = {}
12
- const { top = 0, bottom = 0, left = 0, right = 0 } = insets
12
+ const { top = 0, left = 0 } = insets
13
+ let { bottom = 0, right = 0 } = initialWindowMetricsInset
13
14
  const screenHeight = __mpx_mode__ === 'ios' ? dimensionsScreen.height : dimensionsScreen.height - bottom // 解决安卓开启屏幕内三建导航安卓把安全区计算进去后产生的影响
14
15
  const screenWidth = __mpx_mode__ === 'ios' ? dimensionsScreen.width : dimensionsScreen.width - right
15
16
  const layout = navigation.layout || {}
16
17
  const layoutHeight = layout.height || 0
17
18
  const layoutWidth = layout.width || 0
18
19
  const windowHeight = layoutHeight || screenHeight
20
+ if (__mpx_mode__ !== 'ios') {
21
+ bottom = 0
22
+ right = 0
23
+ }
19
24
  try {
20
25
  safeArea = {
21
26
  left,
22
27
  right: screenWidth - right,
23
- top,
28
+ top: top,
24
29
  bottom: screenHeight - bottom,
25
30
  height: screenHeight - top - bottom,
26
31
  width: screenWidth - left - right