Skip to content

Commit 419779b

Browse files
committed
[weex] expose native module getter on sub Vue instances
1 parent b88d3ca commit 419779b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/platforms/weex/framework.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ export function createInstance (
107107
subVue[name] = Vue[name]
108108
})
109109

110+
// expose weex native module getter on subVue prototype so that
111+
// vdom runtime modules can access native modules via vnode.context
112+
subVue.prototype._requireWeexModule = moduleGetter
113+
110114
// The function which create a closure the JS Bundle will run in.
111115
// It will declare some instance variables like `Vue`, HTML5 Timer APIs etc.
112116
const instanceVars = Object.assign({

0 commit comments

Comments
 (0)