@mpxjs/core 2.8.53 → 2.8.54

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.53",
3
+ "version": "2.8.54",
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": "cad6b8f0d2b1c8e520bfafa1de3bbf332466d801"
50
+ "gitHead": "e39ad9b35cdb336f271f424dbfae9cf7688c8d0d"
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 = () => currentInstance?.target
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 getCurrentVueScope,
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(getCurrentVueScope())
45
+ const getCurrentScope = () => fixEffectScope(vueGetCurrentScope())
46
46
 
47
47
  export {
48
48
  // effectScope