@mpxjs/api-proxy 2.10.7-beta.1 → 2.10.7-beta.5

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.7-beta.1",
3
+ "version": "2.10.7-beta.5",
4
4
  "description": "convert miniprogram API at each end",
5
5
  "module": "src/index.js",
6
6
  "types": "@types/index.d.ts",
@@ -4,8 +4,7 @@ global.__mpxAppCbs = global.__mpxAppCbs || {
4
4
  show: [],
5
5
  hide: [],
6
6
  error: [],
7
- rejection: [],
8
- lazyLoad: []
7
+ rejection: []
9
8
  }
10
9
 
11
10
  function off (cbs, cb) {
@@ -57,18 +56,6 @@ function offAppHide (callback) {
57
56
  off(global.__mpxAppCbs.hide, callback)
58
57
  }
59
58
 
60
- function onLazyLoadError (callback) {
61
- if (isReact) {
62
- global.__mpxAppCbs.lazyLoad.push(callback)
63
- }
64
- }
65
-
66
- function offLazyLoadError (callback) {
67
- if (isReact) {
68
- off(global.__mpxAppCbs.lazyLoad, callback)
69
- }
70
- }
71
-
72
59
  export {
73
60
  onAppShow,
74
61
  onAppHide,
@@ -77,7 +64,5 @@ export {
77
64
  onError,
78
65
  offError,
79
66
  onUnhandledRejection,
80
- offUnhandledRejection,
81
- onLazyLoadError,
82
- offLazyLoadError
67
+ offUnhandledRejection
83
68
  }
@@ -93,6 +93,8 @@ class RNIntersectionObserver {
93
93
  const navigation = getFocusedNavigation() || {}
94
94
  const screen = Dimensions.get('screen')
95
95
  const navigationLayout = navigation.layout || {
96
+ x: 0,
97
+ y: 0,
96
98
  top: 0,
97
99
  left: 0,
98
100
  width: screen.width,
@@ -4,8 +4,7 @@ import {
4
4
  dash2hump,
5
5
  collectDataset,
6
6
  hump2dash,
7
- isArray,
8
- getFocusedNavigation
7
+ isArray
9
8
  } from '@mpxjs/utils'
10
9
 
11
10
  const flushRefFns = (nodeInstances, fns, single) => {
@@ -41,10 +40,8 @@ const wrapFn = (fn) => {
41
40
  const getMeasureProps = (measureProps = []) => {
42
41
  return wrapFn((nodeInstance, resolve) => {
43
42
  const nodeRef = nodeInstance.nodeRef.current
44
- const navigation = getFocusedNavigation()
45
43
  setTimeout(() => {
46
44
  nodeRef.measure(function (x, y, width, height, pageX, pageY) {
47
- pageY = pageY - navigation.layout.top
48
45
  const rectAndSize = {
49
46
  width,
50
47
  height,