diff --git a/src/platforms/weex/entry-framework.js b/src/platforms/weex/entry-framework.js index 6758c0e7c9..375d39bbc2 100644 --- a/src/platforms/weex/entry-framework.js +++ b/src/platforms/weex/entry-framework.js @@ -91,9 +91,7 @@ export function createInstance ( // It will declare some instance variables like `Vue`, HTML5 Timer APIs etc. const instanceVars = Object.assign({ Vue, - weex: weexInstanceVar, - // deprecated - __weex_require_module__: weexInstanceVar.requireModule // eslint-disable-line + weex: weexInstanceVar }, timerAPIs, env.services) if (!callFunctionNative(instanceVars, appCode)) { diff --git a/test/weex/runtime/framework.spec.js b/test/weex/runtime/framework.spec.js index f280c345f1..e11edaa3e2 100644 --- a/test/weex/runtime/framework.spec.js +++ b/test/weex/runtime/framework.spec.js @@ -261,7 +261,7 @@ describe('framework APIs', () => { const instance = new Instance(runtime) framework.createInstance(instance.id, ` - const moduleFoo = __weex_require_module__('foo') + const moduleFoo = weex.requireModule('foo') new Vue({ data: { x: 'Hello' @@ -361,9 +361,9 @@ describe('framework APIs', () => { const instance = new Instance(runtime) framework.createInstance(instance.id, ` - const moduleFoo = __weex_require_module__('foo') - const moduleBar = __weex_require_module__('bar') - const moduleBaz = __weex_require_module__('baz') + const moduleFoo = weex.requireModule('foo') + const moduleBar = weex.requireModule('bar') + const moduleBaz = weex.requireModule('baz') new Vue({ render: function (createElement) { const value = [] @@ -592,7 +592,7 @@ describe('framework APIs', () => { const instance = new Instance(runtime) framework.createInstance(instance.id, ` - const moduleFoo = __weex_require_module__('foo') + const moduleFoo = weex.requireModule('foo') new Vue({ mounted: function () { moduleFoo.a(a => a + 1) @@ -624,7 +624,7 @@ describe('framework APIs', () => { const instance = new Instance(runtime) framework.createInstance(instance.id, ` - const moduleFoo = __weex_require_module__('foo') + const moduleFoo = weex.requireModule('foo') new Vue({ mounted: function () { moduleFoo.a(this.$refs.x)