@mpxjs/core 2.8.53 → 2.8.55
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.
|
|
3
|
+
"version": "2.8.55",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"url": "https://github.com/didi/mpx/issues"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8418ed27ec3cfa6307d8e0930a169cd7d09a1014"
|
|
51
51
|
}
|
package/src/core/proxy.js
CHANGED
|
@@ -607,7 +607,9 @@ export default class MpxProxy {
|
|
|
607
607
|
|
|
608
608
|
export let currentInstance = null
|
|
609
609
|
|
|
610
|
-
export const getCurrentInstance = () =>
|
|
610
|
+
export const getCurrentInstance = () => {
|
|
611
|
+
return currentInstance && { proxy: currentInstance?.target }
|
|
612
|
+
}
|
|
611
613
|
|
|
612
614
|
export const setCurrentInstance = (instance) => {
|
|
613
615
|
currentInstance = instance
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
effectScope as vueEffectScope,
|
|
3
|
-
getCurrentScope as
|
|
3
|
+
getCurrentScope as vueGetCurrentScope,
|
|
4
4
|
onScopeDispose
|
|
5
5
|
} from 'vue'
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ const fixEffectScope = (scope) => {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const effectScope = (detached) => fixEffectScope(vueEffectScope(detached))
|
|
45
|
-
const getCurrentScope = () => fixEffectScope(
|
|
45
|
+
const getCurrentScope = () => fixEffectScope(vueGetCurrentScope())
|
|
46
46
|
|
|
47
47
|
export {
|
|
48
48
|
// effectScope
|