智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/c5/c58769e34ad4a20c3eb9f6a572f...

40 lines
907 B

import initUni from './api/legacy/index'
import initUpx2px from './api/upx2px'
import initEventBus from './api/event-bus'
let getGlobalUni
let getGlobalApp
let getGlobalUniEmitter
let getGlobalCurrentPages
export function createInstanceContext () {
return {
initUniApp ({
nvue,
getUni,
getApp,
getUniEmitter,
getCurrentPages
}) {
getGlobalUni = getUni
getGlobalApp = getApp
getGlobalUniEmitter = getUniEmitter
getGlobalCurrentPages = getCurrentPages
initUpx2px(nvue)
initEventBus(getUniEmitter)
},
getUni (nvue, plus, BroadcastChannel) {
return initUni(getGlobalUni(), nvue, plus, BroadcastChannel)
},
getApp () {
return getGlobalApp()
},
getUniEmitter () {
return getGlobalUniEmitter()
},
getCurrentPages (returnAll) {
return getGlobalCurrentPages(returnAll)
}
}
}