提交 cf8367fc 编写于 作者: L liuxiaohang

fix(mp-wexin): getOpenerEventChannel的tree sharking

上级 cd548745
......@@ -12,16 +12,15 @@ import {
export default function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () {
switch (__PLATFORM__) {
case 'mp-weixin':
// 微信小程序使用自身getOpenerEventChannel
if (__PLATFORM__ === '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.
先完成此消息的编辑!
想要评论请 注册