Skip to content

Commit

Permalink
build: build 2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 3, 2017
1 parent ad673e1 commit 015a318
Show file tree
Hide file tree
Showing 14 changed files with 914 additions and 375 deletions.
166 changes: 110 additions & 56 deletions dist/vue.common.js

Large diffs are not rendered by default.

166 changes: 110 additions & 56 deletions dist/vue.esm.js

Large diffs are not rendered by default.

166 changes: 110 additions & 56 deletions dist/vue.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/vue.min.js

Large diffs are not rendered by default.

99 changes: 66 additions & 33 deletions dist/vue.runtime.common.js
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.5.2
* Vue.js v2.5.3
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -756,23 +756,29 @@ function createTextVNode (val) {
// multiple renders, cloning them avoids errors when DOM manipulations rely
// on their elm reference.
function cloneVNode (vnode, deep) {
var componentOptions = vnode.componentOptions;
var cloned = new VNode(
vnode.tag,
vnode.data,
vnode.children,
vnode.text,
vnode.elm,
vnode.context,
vnode.componentOptions,
componentOptions,
vnode.asyncFactory
);
cloned.ns = vnode.ns;
cloned.isStatic = vnode.isStatic;
cloned.key = vnode.key;
cloned.isComment = vnode.isComment;
cloned.isCloned = true;
if (deep && vnode.children) {
cloned.children = cloneVNodes(vnode.children);
if (deep) {
if (vnode.children) {
cloned.children = cloneVNodes(vnode.children, true);
}
if (componentOptions && componentOptions.children) {
componentOptions.children = cloneVNodes(componentOptions.children, true);
}
}
return cloned
}
Expand Down Expand Up @@ -1005,7 +1011,7 @@ function set (target, key, val) {
target.splice(key, 1, val);
return val
}
if (hasOwn(target, key)) {
if (key in target && !(key in Object.prototype)) {
target[key] = val;
return val
}
Expand Down Expand Up @@ -1137,7 +1143,7 @@ function mergeDataOrFn (
typeof parentVal === 'function' ? parentVal.call(this) : parentVal
)
}
} else if (parentVal || childVal) {
} else {
return function mergedInstanceDataFn () {
// instance merge
var instanceData = typeof childVal === 'function'
Expand Down Expand Up @@ -1171,7 +1177,7 @@ strats.data = function (

return parentVal
}
return mergeDataOrFn.call(this, parentVal, childVal)
return mergeDataOrFn(parentVal, childVal)
}

return mergeDataOrFn(parentVal, childVal, vm)
Expand Down Expand Up @@ -1977,6 +1983,9 @@ function updateListeners (
/* */

function mergeVNodeHook (def, hookKey, hook) {
if (def instanceof VNode) {
def = def.data.hook || (def.data.hook = {});
}
var invoker;
var oldHook = def[hookKey];

Expand Down Expand Up @@ -2344,6 +2353,7 @@ function updateComponentListeners (
) {
target = vm;
updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
target = undefined;
}

function eventsMixin (Vue) {
Expand Down Expand Up @@ -2399,7 +2409,7 @@ function eventsMixin (Vue) {
if (!cbs) {
return vm
}
if (arguments.length === 1) {
if (!fn) {
vm._events[event] = null;
return vm
}
Expand Down Expand Up @@ -2461,7 +2471,6 @@ function resolveSlots (
if (!children) {
return slots
}
var defaultSlot = [];
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i];
var data = child.data;
Expand All @@ -2482,12 +2491,14 @@ function resolveSlots (
slot.push(child);
}
} else {
defaultSlot.push(child);
(slots.default || (slots.default = [])).push(child);
}
}
// ignore whitespace
if (!defaultSlot.every(isWhitespace)) {
slots.default = defaultSlot;
// ignore slots that contains only whitespace
for (var name$1 in slots) {
if (slots[name$1].every(isWhitespace)) {
delete slots[name$1];
}
}
return slots
}
Expand Down Expand Up @@ -3651,6 +3662,7 @@ function renderSlot (
bindObject
) {
var scopedSlotFn = this.$scopedSlots[name];
var nodes;
if (scopedSlotFn) { // scoped slot
props = props || {};
if (bindObject) {
Expand All @@ -3662,19 +3674,28 @@ function renderSlot (
}
props = extend(extend({}, bindObject), props);
}
return scopedSlotFn(props) || fallback
nodes = scopedSlotFn(props) || fallback;
} else {
var slotNodes = this.$slots[name];
// warn duplicate slot usage
if (slotNodes && process.env.NODE_ENV !== 'production') {
slotNodes._rendered && warn(
"Duplicate presence of slot \"" + name + "\" found in the same render tree " +
"- this will likely cause render errors.",
this
);
if (slotNodes) {
if (process.env.NODE_ENV !== 'production' && slotNodes._rendered) {
warn(
"Duplicate presence of slot \"" + name + "\" found in the same render tree " +
"- this will likely cause render errors.",
this
);
}
slotNodes._rendered = true;
}
return slotNodes || fallback
nodes = slotNodes || fallback;
}

var target = props && props.slot;
if (target) {
return this.$createElement('template', { slot: target }, nodes)
} else {
return nodes
}
}

Expand Down Expand Up @@ -4829,8 +4850,8 @@ var KeepAlive = {
// check pattern
var name = getComponentName(componentOptions);
if (name && (
(this.include && !matches(this.include, name)) ||
(this.exclude && matches(this.exclude, name))
(this.exclude && matches(this.exclude, name)) ||
(this.include && !matches(this.include, name))
)) {
return vnode
}
Expand Down Expand Up @@ -4926,7 +4947,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
}
});

Vue$3.version = '2.5.2';
Vue$3.version = '2.5.3';

/* */

Expand Down Expand Up @@ -5907,9 +5928,12 @@ function createPatchFunction (backend) {
// create an empty node and replace it
oldVnode = emptyNodeAt(oldVnode);
}

// replacing existing element
var oldElm = oldVnode.elm;
var parentElm$1 = nodeOps.parentNode(oldElm);

// create new node
createElm(
vnode,
insertedVnodeQueue,
Expand All @@ -5920,9 +5944,8 @@ function createPatchFunction (backend) {
nodeOps.nextSibling(oldElm)
);

// update parent placeholder node element, recursively
if (isDef(vnode.parent)) {
// component root element replaced.
// update parent placeholder node element, recursively
var ancestor = vnode.parent;
var patchable = isPatchable(vnode);
while (ancestor) {
Expand Down Expand Up @@ -5951,6 +5974,7 @@ function createPatchFunction (backend) {
}
}

// destroy old node
if (isDef(parentElm$1)) {
removeVnodes(parentElm$1, [oldVnode], 0, 0);
} else if (isDef(oldVnode.tag)) {
Expand Down Expand Up @@ -6016,14 +6040,14 @@ function _update (oldVnode, vnode) {
}
};
if (isCreate) {
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert);
mergeVNodeHook(vnode, 'insert', callInsert);
} else {
callInsert();
}
}

if (dirsWithPostpatch.length) {
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {
mergeVNodeHook(vnode, 'postpatch', function () {
for (var i = 0; i < dirsWithPostpatch.length; i++) {
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
}
Expand Down Expand Up @@ -6315,6 +6339,7 @@ function updateDOMListeners (oldVnode, vnode) {
target$1 = vnode.elm;
normalizeEvents(on);
updateListeners(on, oldOn, add$1, remove$2, vnode.context);
target$1 = undefined;
}

var events = {
Expand Down Expand Up @@ -6920,7 +6945,7 @@ function enter (vnode, toggleDisplay) {

if (!vnode.data.show) {
// remove pending leave element on enter by injecting an insert hook
mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {
mergeVNodeHook(vnode, 'insert', function () {
var parent = el.parentNode;
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
if (pendingNode &&
Expand Down Expand Up @@ -7159,10 +7184,17 @@ if (isIE9) {
});
}

var model$1 = {
inserted: function inserted (el, binding, vnode) {
var directive = {
inserted: function inserted (el, binding, vnode, oldVnode) {
if (vnode.tag === 'select') {
setSelected(el, binding, vnode.context);
// #6903
if (oldVnode.elm && !oldVnode.elm._vOptions) {
mergeVNodeHook(vnode, 'postpatch', function () {
directive.componentUpdated(el, binding, vnode);
});
} else {
setSelected(el, binding, vnode.context);
}
el._vOptions = [].map.call(el.options, getValue);
} else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
el._vModifiers = binding.modifiers;
Expand All @@ -7183,6 +7215,7 @@ var model$1 = {
}
}
},

componentUpdated: function componentUpdated (el, binding, vnode) {
if (vnode.tag === 'select') {
setSelected(el, binding, vnode.context);
Expand Down Expand Up @@ -7341,7 +7374,7 @@ var show = {
};

var platformDirectives = {
model: model$1,
model: directive,
show: show
};

Expand Down

0 comments on commit 015a318

Please sign in to comment.