提交 ea8e420c 编写于 作者: L liuxiaohang

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

上级 9fd4f733
......@@ -12,11 +12,16 @@ import {
export default function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () {
switch (__PLATFORM__) {
case 'mp-weixin':
return this.$scope.getOpenerEventChannel()
default :
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__) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册