@mpxjs/core 2.7.47 → 2.7.50

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.7.47",
3
+ "version": "2.7.50",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -42,5 +42,5 @@
42
42
  "url": "https://github.com/didi/mpx/issues"
43
43
  },
44
44
  "sideEffects": false,
45
- "gitHead": "05354d5750021d76f4bf0ae2a4ab73fb2f8ef83b"
45
+ "gitHead": "f1fe0f7381ee7e153b0eb7994f25ade5c9f4f0ef"
46
46
  }
@@ -73,7 +73,8 @@ export default function createApp (option, config = {}) {
73
73
  const defaultOptions = filterOptions(spreadProp(mergeOptions(rawOptions, 'app', false), 'methods'), appData)
74
74
 
75
75
  if (__mpx_mode__ === 'web') {
76
- global.currentOption = defaultOptions
76
+ global.__mpxOptionsMap = global.__mpxOptionsMap || {}
77
+ global.__mpxOptionsMap[global.currentModuleId] = defaultOptions
77
78
  global.getApp = function () {
78
79
  return appData
79
80
  }
@@ -55,7 +55,8 @@ export default function createFactory (type) {
55
55
  rawOptions.mixins = getBuiltInMixins(rawOptions, type)
56
56
  const defaultOptions = getDefaultOptions(type, { rawOptions, currentInject })
57
57
  if (__mpx_mode__ === 'web') {
58
- global.currentOption = defaultOptions
58
+ global.__mpxOptionsMap = global.__mpxOptionsMap || {}
59
+ global.__mpxOptionsMap[global.currentModuleId] = defaultOptions
59
60
  } else if (ctor) {
60
61
  return ctor(defaultOptions)
61
62
  }