智能照明系统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/39/39408b290f7e03f3fdb7e1fca68...

23 lines
660 B

function noop () {}
export function initTitleNView (nvue) {
const eventMaps = {
onNavigationBarButtonTap: noop,
onNavigationBarSearchInputChanged: noop,
onNavigationBarSearchInputConfirmed: noop,
onNavigationBarSearchInputClicked: noop,
onNavigationBarSearchInputFocusChanged: noop
}
nvue.requireModule('globalEvent').addEventListener('plusMessage', e => {
if (eventMaps[e.data.type]) {
eventMaps[e.data.type](e.data.data)
}
})
const ret = Object.create(null)
Object.keys(eventMaps).forEach(eventType => {
ret[eventType] = function (callback) {
eventMaps[eventType] = callback
}
})
return ret
}