智能照明系统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/b7/b7b4561ad2d39e60b1389623368...

30 lines
781 B

import Vue from 'vue'
import 'uni-platform/runtime/index'
import EventChannel from 'uni-helpers/EventChannel'
import parseApp from 'uni-platform/runtime/wrapper/app-parser'
import {
getEventChannel
} from 'uni-helpers/navigate-to'
export default function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () {
if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel()
}
return this.__eventChannel__
}
const callHook = Vue.prototype.__call_hook
Vue.prototype.__call_hook = function (hook, args) {
if (hook === 'onLoad' && args && args.__id__) {
this.__eventChannel__ = getEventChannel(args.__id__)
delete args.__id__
}
return callHook.call(this, hook, args)
}
App(parseApp(vm))
return vm
}