@mpxjs/store 2.8.23-alpha → 2.8.23-alpha.2
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/store",
|
|
3
|
-
"version": "2.8.23-alpha",
|
|
3
|
+
"version": "2.8.23-alpha.2",
|
|
4
4
|
"description": "A store for mpx framework",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "@types/index.d.ts",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@mpxjs/core": "^2.8.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "556f754c8b43cb825a8d5d5040b1cdf7a6fdd613"
|
|
35
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default () => () => {} // mock plugin in other mode
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Mpx, { reactive, computed } from '@mpxjs/core'
|
|
2
|
-
import
|
|
3
|
-
import createHummerPlugin from '../platform/builtInPlugins/hummerStorePlugin'
|
|
2
|
+
import createHummerPlugin from './builtInPlugins/hummerStorePlugin'
|
|
4
3
|
import {
|
|
5
4
|
getByPath,
|
|
6
5
|
warn,
|
|
@@ -155,7 +154,7 @@ class Store {
|
|
|
155
154
|
registerModule (module) {
|
|
156
155
|
const state = module.state || {}
|
|
157
156
|
const reactiveModule = __mpx_mode__ === 'tenon'
|
|
158
|
-
?
|
|
157
|
+
? Mpx.__vue.reactive({ state })
|
|
159
158
|
: { state }
|
|
160
159
|
if (module.getters) {
|
|
161
160
|
reactiveModule.getters = transformGetters(module.getters, reactiveModule, this)
|