提交 47df8fec 编写于 作者: Q qiang

build runtime

上级 78f1ec3e
...@@ -1429,7 +1429,10 @@ function getEventChannel (id) { ...@@ -1429,7 +1429,10 @@ function getEventChannel (id) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -2186,7 +2188,10 @@ function parseApp (vm) { ...@@ -2186,7 +2188,10 @@ function parseApp (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -1626,7 +1628,10 @@ function parseApp (vm) { ...@@ -1626,7 +1628,10 @@ function parseApp (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -1540,7 +1542,10 @@ function parseApp$1 (vm) { ...@@ -1540,7 +1542,10 @@ function parseApp$1 (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -1712,7 +1714,10 @@ function parseApp (vm) { ...@@ -1712,7 +1714,10 @@ function parseApp (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -1493,7 +1495,10 @@ function parseApp (vm) { ...@@ -1493,7 +1495,10 @@ function parseApp (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
...@@ -430,11 +430,13 @@ const eventChannelStack = []; ...@@ -430,11 +430,13 @@ const eventChannelStack = [];
let id = 0; let id = 0;
function initEventChannel (events) { function initEventChannel (events, cache = true) {
id++; id++;
const eventChannel = new EventChannel(id, events); const eventChannel = new EventChannel(id, events);
eventChannels[id] = eventChannel; if (cache) {
eventChannelStack.push(eventChannel); eventChannels[id] = eventChannel;
eventChannelStack.push(eventChannel);
}
return eventChannel return eventChannel
} }
...@@ -1543,7 +1545,10 @@ function parseApp (vm) { ...@@ -1543,7 +1545,10 @@ function parseApp (vm) {
function createApp (vm) { function createApp (vm) {
Vue.prototype.getOpenerEventChannel = function () { Vue.prototype.getOpenerEventChannel = function () {
return this.__eventChannel__ || new EventChannel() if (!this.__eventChannel__) {
this.__eventChannel__ = new EventChannel();
}
return this.__eventChannel__
}; };
const callHook = Vue.prototype.__call_hook; const callHook = Vue.prototype.__call_hook;
Vue.prototype.__call_hook = function (hook, args) { Vue.prototype.__call_hook = function (hook, args) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册