Skip to content

Commit

Permalink
[build] 2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 9, 2017
1 parent aaad733 commit 6bdaeb0
Show file tree
Hide file tree
Showing 12 changed files with 651 additions and 305 deletions.
162 changes: 111 additions & 51 deletions dist/vue.common.js

Large diffs are not rendered by default.

162 changes: 111 additions & 51 deletions dist/vue.esm.js

Large diffs are not rendered by default.

158 changes: 109 additions & 49 deletions dist/vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

116 changes: 79 additions & 37 deletions dist/vue.runtime.common.js
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.2
* Vue.js v2.3.3
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand All @@ -21,6 +21,9 @@ function isTrue (v) {
return v === true
}

function isFalse (v) {
return v === false
}
/**
* Check if value is primitive
*/
Expand Down Expand Up @@ -1412,7 +1415,8 @@ function getPropDefaultValue (vm, prop, key) {
// return previous default value to avoid unnecessary watcher trigger
if (vm && vm.$options.propsData &&
vm.$options.propsData[key] === undefined &&
vm._props[key] !== undefined) {
vm._props[key] !== undefined
) {
return vm._props[key]
}
// call factory function for non-Function types
Expand Down Expand Up @@ -1686,6 +1690,7 @@ function cloneVNode (vnode) {
cloned.ns = vnode.ns;
cloned.isStatic = vnode.isStatic;
cloned.key = vnode.key;
cloned.isComment = vnode.isComment;
cloned.isCloned = true;
return cloned
}
Expand Down Expand Up @@ -1904,6 +1909,10 @@ function normalizeChildren (children) {
: undefined
}

function isTextNode (node) {
return isDef(node) && isDef(node.text) && isFalse(node.isComment)
}

function normalizeArrayChildren (children, nestedIndex) {
var res = [];
var i, c, last;
Expand All @@ -1915,18 +1924,25 @@ function normalizeArrayChildren (children, nestedIndex) {
if (Array.isArray(c)) {
res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)));
} else if (isPrimitive(c)) {
if (isDef(last) && isDef(last.text)) {
last.text += String(c);
if (isTextNode(last)) {
// merge adjacent text nodes
// this is necessary for SSR hydration because text nodes are
// essentially merged when rendered to HTML strings
(last).text += String(c);
} else if (c !== '') {
// convert primitive to vnode
res.push(createTextVNode(c));
}
} else {
if (isDef(c.text) && isDef(last) && isDef(last.text)) {
if (isTextNode(c) && isTextNode(last)) {
// merge adjacent text nodes
res[res.length - 1] = createTextVNode(last.text + c.text);
} else {
// default key for nested array children (likely generated by v-for)
if (isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) {
if (isTrue(children._isVList) &&
isDef(c.tag) &&
isUndef(c.key) &&
isDef(nestedIndex)) {
c.key = "__vlist" + nestedIndex + "_" + i + "__";
}
res.push(c);
Expand Down Expand Up @@ -2026,11 +2042,13 @@ function resolveAsyncComponent (

if (isDef(res.timeout)) {
setTimeout(function () {
reject(
process.env.NODE_ENV !== 'production'
? ("timeout (" + (res.timeout) + "ms)")
: null
);
if (isUndef(factory.resolved)) {
reject(
process.env.NODE_ENV !== 'production'
? ("timeout (" + (res.timeout) + "ms)")
: null
);
}
}, res.timeout);
}
}
Expand Down Expand Up @@ -2209,7 +2227,8 @@ function resolveSlots (
// named slots should only be respected if the vnode was rendered in the
// same context.
if ((child.context === context || child.functionalContext === context) &&
child.data && child.data.slot != null) {
child.data && child.data.slot != null
) {
var name = child.data.slot;
var slot = (slots[name] || (slots[name] = []));
if (child.tag === 'template') {
Expand All @@ -2233,11 +2252,16 @@ function isWhitespace (node) {
}

function resolveScopedSlots (
fns
fns, // see flow/vnode
res
) {
var res = {};
res = res || {};
for (var i = 0; i < fns.length; i++) {
res[fns[i][0]] = fns[i][1];
if (Array.isArray(fns[i])) {
resolveScopedSlots(fns[i], res);
} else {
res[fns[i].key] = fns[i].fn;
}
}
return res
}
Expand Down Expand Up @@ -2555,7 +2579,7 @@ var index = 0;
* Reset the scheduler's state.
*/
function resetSchedulerState () {
queue.length = activatedChildren.length = 0;
index = queue.length = activatedChildren.length = 0;
has = {};
if (process.env.NODE_ENV !== 'production') {
circular = {};
Expand Down Expand Up @@ -2665,10 +2689,10 @@ function queueWatcher (watcher) {
// if already flushing, splice the watcher based on its id
// if already past its id, it will be run next immediately.
var i = queue.length - 1;
while (i >= 0 && queue[i].id > watcher.id) {
while (i > index && queue[i].id > watcher.id) {
i--;
}
queue.splice(Math.max(i, index) + 1, 0, watcher);
queue.splice(i + 1, 0, watcher);
}
// queue the flush
if (!waiting) {
Expand Down Expand Up @@ -3571,7 +3595,8 @@ function _createElement (
}
// support single function children as default scoped slot
if (Array.isArray(children) &&
typeof children[0] === 'function') {
typeof children[0] === 'function'
) {
data = data || {};
data.scopedSlots = { default: children[0] };
children.length = 0;
Expand Down Expand Up @@ -3659,6 +3684,9 @@ function renderList (
ret[i] = render(val[key], key, i);
}
}
if (isDef(ret)) {
(ret)._isVList = true;
}
return ret
}

Expand Down Expand Up @@ -4058,7 +4086,8 @@ function dedupe (latest, extended, sealed) {

function Vue$3 (options) {
if (process.env.NODE_ENV !== 'production' &&
!(this instanceof Vue$3)) {
!(this instanceof Vue$3)
) {
warn('Vue is a constructor and should be called with the `new` keyword');
}
this._init(options);
Expand All @@ -4076,7 +4105,7 @@ function initUse (Vue) {
Vue.use = function (plugin) {
/* istanbul ignore if */
if (plugin.installed) {
return
return this
}
// additional parameters
var args = toArray(arguments, 1);
Expand All @@ -4096,6 +4125,7 @@ function initUse (Vue) {
function initMixin$1 (Vue) {
Vue.mixin = function (mixin) {
this.options = mergeOptions(this.options, mixin);
return this
};
}

Expand Down Expand Up @@ -4389,11 +4419,12 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {

Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
/* istanbul ignore next */
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';
Vue$3.version = '2.3.3';

/* */

Expand Down Expand Up @@ -4974,8 +5005,9 @@ function createPatchFunction (backend) {
}
// for slot content they should also get the scopeId from the host instance.
if (isDef(i = activeInstance) &&
i !== vnode.context &&
isDef(i = i.$options._scopeId)) {
i !== vnode.context &&
isDef(i = i.$options._scopeId)
) {
nodeOps.setAttribute(vnode.elm, i, '');
}
}
Expand Down Expand Up @@ -5127,9 +5159,10 @@ function createPatchFunction (backend) {
// if the new node is not cloned it means the render functions have been
// reset by the hot-reload-api and we need to do a proper re-render.
if (isTrue(vnode.isStatic) &&
isTrue(oldVnode.isStatic) &&
vnode.key === oldVnode.key &&
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {
isTrue(oldVnode.isStatic) &&
vnode.key === oldVnode.key &&
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
) {
vnode.elm = oldVnode.elm;
vnode.componentInstance = oldVnode.componentInstance;
return
Expand Down Expand Up @@ -5220,8 +5253,9 @@ function createPatchFunction (backend) {
// longer than the virtual children list.
if (!childrenMatch || childNode) {
if (process.env.NODE_ENV !== 'production' &&
typeof console !== 'undefined' &&
!bailed) {
typeof console !== 'undefined' &&
!bailed
) {
bailed = true;
console.warn('Parent: ', elm);
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
Expand Down Expand Up @@ -5897,7 +5931,8 @@ function updateStyle (oldVnode, vnode) {
var oldData = oldVnode.data;

if (isUndef(data.staticStyle) && isUndef(data.style) &&
isUndef(oldData.staticStyle) && isUndef(oldData.style)) {
isUndef(oldData.staticStyle) && isUndef(oldData.style)
) {
return
}

Expand Down Expand Up @@ -6035,12 +6070,14 @@ var animationEndEvent = 'animationend';
if (hasTransition) {
/* istanbul ignore if */
if (window.ontransitionend === undefined &&
window.onwebkittransitionend !== undefined) {
window.onwebkittransitionend !== undefined
) {
transitionProp = 'WebkitTransition';
transitionEndEvent = 'webkitTransitionEnd';
}
if (window.onanimationend === undefined &&
window.onwebkitanimationend !== undefined) {
window.onwebkitanimationend !== undefined
) {
animationProp = 'WebkitAnimation';
animationEndEvent = 'webkitAnimationEnd';
}
Expand Down Expand Up @@ -6280,8 +6317,9 @@ function enter (vnode, toggleDisplay) {
var parent = el.parentNode;
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
if (pendingNode &&
pendingNode.tag === vnode.tag &&
pendingNode.elm._leaveCb) {
pendingNode.tag === vnode.tag &&
pendingNode.elm._leaveCb
) {
pendingNode.elm._leaveCb();
}
enterHook && enterHook(el, cb);
Expand Down Expand Up @@ -6614,6 +6652,8 @@ function onCompositionStart (e) {
}

function onCompositionEnd (e) {
// prevent triggering an input event for no reason
if (!e.target.composing) { return }
e.target.composing = false;
trigger(e.target, 'input');
}
Expand Down Expand Up @@ -6796,7 +6836,8 @@ var Transition = {

// warn invalid mode
if (process.env.NODE_ENV !== 'production' &&
mode && mode !== 'in-out' && mode !== 'out-in') {
mode && mode !== 'in-out' && mode !== 'out-in'
) {
warn(
'invalid <transition> mode: ' + mode,
this.$parent
Expand Down Expand Up @@ -7080,8 +7121,9 @@ setTimeout(function () {
}
}
if (process.env.NODE_ENV !== 'production' &&
config.productionTip !== false &&
inBrowser && typeof console !== 'undefined') {
config.productionTip !== false &&
inBrowser && typeof console !== 'undefined'
) {
console[console.info ? 'info' : 'log'](
"You are running Vue in development mode.\n" +
"Make sure to turn on production mode when deploying for production.\n" +
Expand Down

0 comments on commit 6bdaeb0

Please sign in to comment.