@mpxjs/core 2.8.25-alpha.7 → 2.8.25-alpha.8

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/core",
3
- "version": "2.8.25-alpha.7",
3
+ "version": "2.8.25-alpha.8",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -49,5 +49,5 @@
49
49
  "url": "https://github.com/didi/mpx/issues"
50
50
  },
51
51
  "sideEffects": false,
52
- "gitHead": "87e767a174417796a9188daf45ddd27d6a3ec424"
52
+ "gitHead": "8b08f8924375951c17c0a0f263841640450ecabe"
53
53
  }
@@ -26,11 +26,14 @@ function filterOptions (options) {
26
26
  }
27
27
 
28
28
  function initProxy (context, rawOptions) {
29
- // 缓存options
30
- context.$rawOptions = rawOptions
31
- // 创建proxy对象
32
- context.__mpxProxy = new MpxProxy(rawOptions, context)
33
- context.__mpxProxy.callHook(CREATED, Hummer.pageInfo && Hummer.pageInfo.params && [Hummer.pageInfo.params])
29
+ if (!context.__mpxProxy) {
30
+ // 缓存options
31
+ context.$rawOptions = rawOptions
32
+ // 创建proxy对象
33
+ context.__mpxProxy = new MpxProxy(rawOptions, context)
34
+ // todo 待问题修复后需要还原
35
+ // context.__mpxProxy.callHook(CREATED, Hummer.pageInfo && Hummer.pageInfo.params && [Hummer.pageInfo.params])
36
+ }
34
37
  }
35
38
 
36
39
  export function getDefaultOptions (type, { rawOptions = {}, currentInject }) {
@@ -74,6 +77,8 @@ export function getDefaultOptions (type, { rawOptions = {}, currentInject }) {
74
77
  if (!this.__mpxProxy) {
75
78
  initProxy(this, rawOptions, currentInject, params)
76
79
  }
80
+ // todo 待问题修复后需要移除,目前逻辑是已经创建实例的情况下依旧会重复执行
81
+ this.__mpxProxy.callHook(CREATED, Hummer.pageInfo && Hummer.pageInfo.params && [Hummer.pageInfo.params])
77
82
  },
78
83
  [hookNames[1]] () {
79
84
  this.__mpxProxy && this.__mpxProxy.callHook(MOUNTED, Hummer.pageInfo && Hummer.pageInfo.params && [Hummer.pageInfo.params])