diff --git a/src/core/runtime/index.js b/src/core/runtime/index.js index cb850ef6d25c9a1315be62e49e353bac38ae9146..8ba99d37b3b378ed842153cb1ab40f9d626ecd82 100644 --- a/src/core/runtime/index.js +++ b/src/core/runtime/index.js @@ -44,7 +44,7 @@ canIUses.forEach(canIUseApi => { let uni = {} -if (typeof Proxy !== 'undefined') { +if (typeof Proxy !== 'undefined' && __PLATFORM__ !== 'app-plus') { uni = new Proxy({}, { get (target, name) { if (name === 'upx2px') { @@ -98,11 +98,12 @@ if (typeof Proxy !== 'undefined') { } if (__PLATFORM__ === 'app-plus') { - if (typeof global !== 'undefined') { + if (typeof global !== 'undefined') { + global.uni = uni global.UniEmitter = eventApi } } - + __GLOBAL__.createApp = createApp __GLOBAL__.createPage = createPage __GLOBAL__.createComponent = createComponent