提交 ea8e420c 编写于 作者: L liuxiaohang

this.getOpenerEventChannel在小程序平台使用原生方法

上级 9fd4f733
......@@ -12,10 +12,15 @@ import {
export default function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () {
if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel()
switch (__PLATFORM__) {
case 'mp-weixin':
return this.$scope.getOpenerEventChannel()
default :
if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel()
}
return this.__eventChannel__
}
return this.__eventChannel__
}
const callHook = Vue.prototype.__call_hook
Vue.prototype.__call_hook = function (hook, args) {
......@@ -27,4 +32,4 @@ export default function createApp (vm) {
}
App(parseApp(vm))
return vm
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册