Browse Source

[build] 2.1.8

dev
Evan You 8 years ago
parent
commit
2856544afd
  1. 90
      dist/vue.common.js
  2. 90
      dist/vue.js
  3. 8
      dist/vue.min.js
  4. 69
      dist/vue.runtime.common.js
  5. 69
      dist/vue.runtime.js
  6. 6
      dist/vue.runtime.min.js
  7. 40
      packages/vue-server-renderer/build.js
  8. 2
      packages/vue-server-renderer/package.json
  9. 40
      packages/vue-template-compiler/build.js
  10. 2
      packages/vue-template-compiler/package.json

90
dist/vue.common.js

@ -1,5 +1,5 @@
/*!
* Vue.js v2.1.7
* Vue.js v2.1.8
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
@ -82,10 +82,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -1300,7 +1300,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}
@ -1791,9 +1791,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove$1(this.vm._watchers, this);
}
var i = this.deps.length;
@ -1933,6 +1932,14 @@ var computedSharedDefinition = {
function initComputed (vm, computed) {
for (var key in computed) {
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && key in vm) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
@ -3651,7 +3658,7 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});
Vue$3.version = '2.1.7';
Vue$3.version = '2.1.8';
/* */
@ -4478,6 +4485,8 @@ function createPatchFunction (backend) {
}
}
}
} else if (elm.data !== vnode.text) {
elm.data = vnode.text;
}
return true
}
@ -4489,7 +4498,7 @@ function createPatchFunction (backend) {
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
)
} else {
return _toString(vnode.text) === node.data
return node.nodeType === (vnode.isComment ? 8 : 3)
}
}
@ -5273,8 +5282,10 @@ function enter (vnode, toggleDisplay) {
var css = data.css;
var type = data.type;
var enterClass = data.enterClass;
var enterToClass = data.enterToClass;
var enterActiveClass = data.enterActiveClass;
var appearClass = data.appearClass;
var appearToClass = data.appearToClass;
var appearActiveClass = data.appearActiveClass;
var beforeEnter = data.beforeEnter;
var enter = data.enter;
@ -5304,6 +5315,7 @@ function enter (vnode, toggleDisplay) {
var startClass = isAppear ? appearClass : enterClass;
var activeClass = isAppear ? appearActiveClass : enterActiveClass;
var toClass = isAppear ? appearToClass : enterToClass;
var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;
var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;
var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;
@ -5318,6 +5330,7 @@ function enter (vnode, toggleDisplay) {
var cb = el._enterCb = once(function () {
if (expectsCSS) {
removeTransitionClass(el, toClass);
removeTransitionClass(el, activeClass);
}
if (cb.cancelled) {
@ -5350,9 +5363,10 @@ function enter (vnode, toggleDisplay) {
beforeEnterHook && beforeEnterHook(el);
if (expectsCSS) {
addTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
nextFrame(function () {
addTransitionClass(el, toClass);
removeTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5391,6 +5405,7 @@ function leave (vnode, rm) {
var css = data.css;
var type = data.type;
var leaveClass = data.leaveClass;
var leaveToClass = data.leaveToClass;
var leaveActiveClass = data.leaveActiveClass;
var beforeLeave = data.beforeLeave;
var leave = data.leave;
@ -5410,6 +5425,7 @@ function leave (vnode, rm) {
el.parentNode._pending[vnode.key] = null;
}
if (expectsCSS) {
removeTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveActiveClass);
}
if (cb.cancelled) {
@ -5442,9 +5458,10 @@ function leave (vnode, rm) {
beforeLeave && beforeLeave(el);
if (expectsCSS) {
addTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
nextFrame(function () {
addTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5479,6 +5496,9 @@ var autoCssTransition = cached(function (name) {
enterClass: (name + "-enter"),
leaveClass: (name + "-leave"),
appearClass: (name + "-enter"),
enterToClass: (name + "-enter-to"),
leaveToClass: (name + "-leave-to"),
appearToClass: (name + "-enter-to"),
enterActiveClass: (name + "-enter-active"),
leaveActiveClass: (name + "-leave-active"),
appearActiveClass: (name + "-enter-active")
@ -5746,10 +5766,13 @@ var transitionProps = {
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String
appearActiveClass: String,
appearToClass: String
};
// in case the child is also an abstract component, e.g. <keep-alive>
@ -5793,6 +5816,10 @@ function hasParentTransition (vnode) {
}
}
function isSameChild (child, oldChild) {
return oldChild.key === child.key && oldChild.tag === child.tag
}
var Transition = {
name: 'transition',
props: transitionProps,
@ -5865,11 +5892,10 @@ var Transition = {
child.data.show = true;
}
if (oldChild && oldChild.data && oldChild.key !== key) {
if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
// replace old child transition data with fresh one
// important for dynamic transitions!
var oldData = oldChild.data.transition = extend({}, data);
var oldData = oldChild && (oldChild.data.transition = extend({}, data));
// handle transition mode
if (mode === 'out-in') {
// return placeholder node and queue update when leave finishes
@ -6080,6 +6106,15 @@ Vue$3.prototype.$mount = function (
return this._mount(el, hydrating)
};
if (process.env.NODE_ENV !== 'production' &&
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" +
"See more tips at https://vuejs.org/guide/deployment.html"
);
}
// devtools global hook
/* istanbul ignore next */
setTimeout(function () {
@ -6090,8 +6125,8 @@ setTimeout(function () {
process.env.NODE_ENV !== 'production' &&
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent)
) {
console.log(
'Download the Vue Devtools for a better development experience:\n' +
console[console.info ? 'info' : 'log'](
'Download the Vue Devtools extension for a better development experience:\n' +
'https://github.com/vuejs/vue-devtools'
);
}
@ -7542,6 +7577,8 @@ function bind$2 (el, dir) {
};
}
/* */
var baseDirectives = {
bind: bind$2,
cloak: noop
@ -7820,23 +7857,25 @@ function genChildren (el, checkSkip) {
}
}
// determine the normalzation needed for the children array.
// determine the normalization needed for the children array.
// 0: no normalization needed
// 1: simple normalization needed (possible 1-level deep nested array)
// 2: full nomralization needed
// 2: full normalization needed
function getNormalizationType (children) {
var res = 0;
for (var i = 0; i < children.length; i++) {
var el = children[i];
if (needsNormalization(el) ||
(el.if && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
return 2
res = 2;
break
}
if (maybeComponent(el) ||
(el.if && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
return 1
res = 1;
}
}
return 0
return res
}
function needsNormalization (el) {
@ -8141,8 +8180,11 @@ function genCheckboxModel (
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
addProp(el, 'checked',
"Array.isArray(" + value + ")" +
"?_i(" + value + "," + valueBinding + ")>-1" +
":_q(" + value + "," + trueValueBinding + ")"
"?_i(" + value + "," + valueBinding + ")>-1" + (
trueValueBinding === 'true'
? (":(" + value + ")")
: (":_q(" + value + "," + trueValueBinding + ")")
)
);
addHandler(el, 'change',
"var $$a=" + value + "," +

90
dist/vue.js

@ -1,5 +1,5 @@
/*!
* Vue.js v2.1.7
* Vue.js v2.1.8
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
@ -86,10 +86,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -1304,7 +1304,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}
@ -1793,9 +1793,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove$1(this.vm._watchers, this);
}
var i = this.deps.length;
@ -1933,6 +1932,14 @@ var computedSharedDefinition = {
function initComputed (vm, computed) {
for (var key in computed) {
/* istanbul ignore if */
if ("development" !== 'production' && key in vm) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
@ -3649,7 +3656,7 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});
Vue$3.version = '2.1.7';
Vue$3.version = '2.1.8';
/* */
@ -4476,6 +4483,8 @@ function createPatchFunction (backend) {
}
}
}
} else if (elm.data !== vnode.text) {
elm.data = vnode.text;
}
return true
}
@ -4487,7 +4496,7 @@ function createPatchFunction (backend) {
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
)
} else {
return _toString(vnode.text) === node.data
return node.nodeType === (vnode.isComment ? 8 : 3)
}
}
@ -5271,8 +5280,10 @@ function enter (vnode, toggleDisplay) {
var css = data.css;
var type = data.type;
var enterClass = data.enterClass;
var enterToClass = data.enterToClass;
var enterActiveClass = data.enterActiveClass;
var appearClass = data.appearClass;
var appearToClass = data.appearToClass;
var appearActiveClass = data.appearActiveClass;
var beforeEnter = data.beforeEnter;
var enter = data.enter;
@ -5302,6 +5313,7 @@ function enter (vnode, toggleDisplay) {
var startClass = isAppear ? appearClass : enterClass;
var activeClass = isAppear ? appearActiveClass : enterActiveClass;
var toClass = isAppear ? appearToClass : enterToClass;
var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;
var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;
var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;
@ -5316,6 +5328,7 @@ function enter (vnode, toggleDisplay) {
var cb = el._enterCb = once(function () {
if (expectsCSS) {
removeTransitionClass(el, toClass);
removeTransitionClass(el, activeClass);
}
if (cb.cancelled) {
@ -5348,9 +5361,10 @@ function enter (vnode, toggleDisplay) {
beforeEnterHook && beforeEnterHook(el);
if (expectsCSS) {
addTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
nextFrame(function () {
addTransitionClass(el, toClass);
removeTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5389,6 +5403,7 @@ function leave (vnode, rm) {
var css = data.css;
var type = data.type;
var leaveClass = data.leaveClass;
var leaveToClass = data.leaveToClass;
var leaveActiveClass = data.leaveActiveClass;
var beforeLeave = data.beforeLeave;
var leave = data.leave;
@ -5408,6 +5423,7 @@ function leave (vnode, rm) {
el.parentNode._pending[vnode.key] = null;
}
if (expectsCSS) {
removeTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveActiveClass);
}
if (cb.cancelled) {
@ -5440,9 +5456,10 @@ function leave (vnode, rm) {
beforeLeave && beforeLeave(el);
if (expectsCSS) {
addTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
nextFrame(function () {
addTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5477,6 +5494,9 @@ var autoCssTransition = cached(function (name) {
enterClass: (name + "-enter"),
leaveClass: (name + "-leave"),
appearClass: (name + "-enter"),
enterToClass: (name + "-enter-to"),
leaveToClass: (name + "-leave-to"),
appearToClass: (name + "-enter-to"),
enterActiveClass: (name + "-enter-active"),
leaveActiveClass: (name + "-leave-active"),
appearActiveClass: (name + "-enter-active")
@ -5744,10 +5764,13 @@ var transitionProps = {
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String
appearActiveClass: String,
appearToClass: String
};
// in case the child is also an abstract component, e.g. <keep-alive>
@ -5791,6 +5814,10 @@ function hasParentTransition (vnode) {
}
}
function isSameChild (child, oldChild) {
return oldChild.key === child.key && oldChild.tag === child.tag
}
var Transition = {
name: 'transition',
props: transitionProps,
@ -5863,11 +5890,10 @@ var Transition = {
child.data.show = true;
}
if (oldChild && oldChild.data && oldChild.key !== key) {
if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
// replace old child transition data with fresh one
// important for dynamic transitions!
var oldData = oldChild.data.transition = extend({}, data);
var oldData = oldChild && (oldChild.data.transition = extend({}, data));
// handle transition mode
if (mode === 'out-in') {
// return placeholder node and queue update when leave finishes
@ -6078,6 +6104,15 @@ Vue$3.prototype.$mount = function (
return this._mount(el, hydrating)
};
if ("development" !== 'production' &&
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" +
"See more tips at https://vuejs.org/guide/deployment.html"
);
}
// devtools global hook
/* istanbul ignore next */
setTimeout(function () {
@ -6088,8 +6123,8 @@ setTimeout(function () {
"development" !== 'production' &&
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent)
) {
console.log(
'Download the Vue Devtools for a better development experience:\n' +
console[console.info ? 'info' : 'log'](
'Download the Vue Devtools extension for a better development experience:\n' +
'https://github.com/vuejs/vue-devtools'
);
}
@ -7540,6 +7575,8 @@ function bind$2 (el, dir) {
};
}
/* */
var baseDirectives = {
bind: bind$2,
cloak: noop
@ -7818,23 +7855,25 @@ function genChildren (el, checkSkip) {
}
}
// determine the normalzation needed for the children array.
// determine the normalization needed for the children array.
// 0: no normalization needed
// 1: simple normalization needed (possible 1-level deep nested array)
// 2: full nomralization needed
// 2: full normalization needed
function getNormalizationType (children) {
var res = 0;
for (var i = 0; i < children.length; i++) {
var el = children[i];
if (needsNormalization(el) ||
(el.if && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
return 2
res = 2;
break
}
if (maybeComponent(el) ||
(el.if && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
return 1
res = 1;
}
}
return 0
return res
}
function needsNormalization (el) {
@ -8139,8 +8178,11 @@ function genCheckboxModel (
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
addProp(el, 'checked',
"Array.isArray(" + value + ")" +
"?_i(" + value + "," + valueBinding + ")>-1" +
":_q(" + value + "," + trueValueBinding + ")"
"?_i(" + value + "," + valueBinding + ")>-1" + (
trueValueBinding === 'true'
? (":(" + value + ")")
: (":_q(" + value + "," + trueValueBinding + ")")
)
);
addHandler(el, 'change',
"var $$a=" + value + "," +

8
dist/vue.min.js

File diff suppressed because one or more lines are too long

69
dist/vue.runtime.common.js

@ -1,5 +1,5 @@
/*!
* Vue.js v2.1.7
* Vue.js v2.1.8
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
@ -82,10 +82,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -1300,7 +1300,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}
@ -1791,9 +1791,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove$1(this.vm._watchers, this);
}
var i = this.deps.length;
@ -1933,6 +1932,14 @@ var computedSharedDefinition = {
function initComputed (vm, computed) {
for (var key in computed) {
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && key in vm) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
@ -3651,7 +3658,7 @@ Object.defineProperty(Vue$2.prototype, '$isServer', {
get: isServerRendering
});
Vue$2.version = '2.1.7';
Vue$2.version = '2.1.8';
/* */
@ -4478,6 +4485,8 @@ function createPatchFunction (backend) {
}
}
}
} else if (elm.data !== vnode.text) {
elm.data = vnode.text;
}
return true
}
@ -4489,7 +4498,7 @@ function createPatchFunction (backend) {
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
)
} else {
return _toString(vnode.text) === node.data
return node.nodeType === (vnode.isComment ? 8 : 3)
}
}
@ -5273,8 +5282,10 @@ function enter (vnode, toggleDisplay) {
var css = data.css;
var type = data.type;
var enterClass = data.enterClass;
var enterToClass = data.enterToClass;
var enterActiveClass = data.enterActiveClass;
var appearClass = data.appearClass;
var appearToClass = data.appearToClass;
var appearActiveClass = data.appearActiveClass;
var beforeEnter = data.beforeEnter;
var enter = data.enter;
@ -5304,6 +5315,7 @@ function enter (vnode, toggleDisplay) {
var startClass = isAppear ? appearClass : enterClass;
var activeClass = isAppear ? appearActiveClass : enterActiveClass;
var toClass = isAppear ? appearToClass : enterToClass;
var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;
var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;
var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;
@ -5318,6 +5330,7 @@ function enter (vnode, toggleDisplay) {
var cb = el._enterCb = once(function () {
if (expectsCSS) {
removeTransitionClass(el, toClass);
removeTransitionClass(el, activeClass);
}
if (cb.cancelled) {
@ -5350,9 +5363,10 @@ function enter (vnode, toggleDisplay) {
beforeEnterHook && beforeEnterHook(el);
if (expectsCSS) {
addTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
nextFrame(function () {
addTransitionClass(el, toClass);
removeTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5391,6 +5405,7 @@ function leave (vnode, rm) {
var css = data.css;
var type = data.type;
var leaveClass = data.leaveClass;
var leaveToClass = data.leaveToClass;
var leaveActiveClass = data.leaveActiveClass;
var beforeLeave = data.beforeLeave;
var leave = data.leave;
@ -5410,6 +5425,7 @@ function leave (vnode, rm) {
el.parentNode._pending[vnode.key] = null;
}
if (expectsCSS) {
removeTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveActiveClass);
}
if (cb.cancelled) {
@ -5442,9 +5458,10 @@ function leave (vnode, rm) {
beforeLeave && beforeLeave(el);
if (expectsCSS) {
addTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
nextFrame(function () {
addTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5479,6 +5496,9 @@ var autoCssTransition = cached(function (name) {
enterClass: (name + "-enter"),
leaveClass: (name + "-leave"),
appearClass: (name + "-enter"),
enterToClass: (name + "-enter-to"),
leaveToClass: (name + "-leave-to"),
appearToClass: (name + "-enter-to"),
enterActiveClass: (name + "-enter-active"),
leaveActiveClass: (name + "-leave-active"),
appearActiveClass: (name + "-enter-active")
@ -5746,10 +5766,13 @@ var transitionProps = {
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String
appearActiveClass: String,
appearToClass: String
};
// in case the child is also an abstract component, e.g. <keep-alive>
@ -5793,6 +5816,10 @@ function hasParentTransition (vnode) {
}
}
function isSameChild (child, oldChild) {
return oldChild.key === child.key && oldChild.tag === child.tag
}
var Transition = {
name: 'transition',
props: transitionProps,
@ -5865,11 +5892,10 @@ var Transition = {
child.data.show = true;
}
if (oldChild && oldChild.data && oldChild.key !== key) {
if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
// replace old child transition data with fresh one
// important for dynamic transitions!
var oldData = oldChild.data.transition = extend({}, data);
var oldData = oldChild && (oldChild.data.transition = extend({}, data));
// handle transition mode
if (mode === 'out-in') {
// return placeholder node and queue update when leave finishes
@ -6080,6 +6106,15 @@ Vue$2.prototype.$mount = function (
return this._mount(el, hydrating)
};
if (process.env.NODE_ENV !== 'production' &&
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" +
"See more tips at https://vuejs.org/guide/deployment.html"
);
}
// devtools global hook
/* istanbul ignore next */
setTimeout(function () {
@ -6090,8 +6125,8 @@ setTimeout(function () {
process.env.NODE_ENV !== 'production' &&
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent)
) {
console.log(
'Download the Vue Devtools for a better development experience:\n' +
console[console.info ? 'info' : 'log'](
'Download the Vue Devtools extension for a better development experience:\n' +
'https://github.com/vuejs/vue-devtools'
);
}

69
dist/vue.runtime.js

@ -1,5 +1,5 @@
/*!
* Vue.js v2.1.7
* Vue.js v2.1.8
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
@ -86,10 +86,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -1304,7 +1304,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}
@ -1793,9 +1793,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove$1(this.vm._watchers, this);
}
var i = this.deps.length;
@ -1933,6 +1932,14 @@ var computedSharedDefinition = {
function initComputed (vm, computed) {
for (var key in computed) {
/* istanbul ignore if */
if ("development" !== 'production' && key in vm) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
@ -3649,7 +3656,7 @@ Object.defineProperty(Vue$2.prototype, '$isServer', {
get: isServerRendering
});
Vue$2.version = '2.1.7';
Vue$2.version = '2.1.8';
/* */
@ -4476,6 +4483,8 @@ function createPatchFunction (backend) {
}
}
}
} else if (elm.data !== vnode.text) {
elm.data = vnode.text;
}
return true
}
@ -4487,7 +4496,7 @@ function createPatchFunction (backend) {
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
)
} else {
return _toString(vnode.text) === node.data
return node.nodeType === (vnode.isComment ? 8 : 3)
}
}
@ -5271,8 +5280,10 @@ function enter (vnode, toggleDisplay) {
var css = data.css;
var type = data.type;
var enterClass = data.enterClass;
var enterToClass = data.enterToClass;
var enterActiveClass = data.enterActiveClass;
var appearClass = data.appearClass;
var appearToClass = data.appearToClass;
var appearActiveClass = data.appearActiveClass;
var beforeEnter = data.beforeEnter;
var enter = data.enter;
@ -5302,6 +5313,7 @@ function enter (vnode, toggleDisplay) {
var startClass = isAppear ? appearClass : enterClass;
var activeClass = isAppear ? appearActiveClass : enterActiveClass;
var toClass = isAppear ? appearToClass : enterToClass;
var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;
var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;
var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;
@ -5316,6 +5328,7 @@ function enter (vnode, toggleDisplay) {
var cb = el._enterCb = once(function () {
if (expectsCSS) {
removeTransitionClass(el, toClass);
removeTransitionClass(el, activeClass);
}
if (cb.cancelled) {
@ -5348,9 +5361,10 @@ function enter (vnode, toggleDisplay) {
beforeEnterHook && beforeEnterHook(el);
if (expectsCSS) {
addTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
nextFrame(function () {
addTransitionClass(el, toClass);
removeTransitionClass(el, startClass);
addTransitionClass(el, activeClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5389,6 +5403,7 @@ function leave (vnode, rm) {
var css = data.css;
var type = data.type;
var leaveClass = data.leaveClass;
var leaveToClass = data.leaveToClass;
var leaveActiveClass = data.leaveActiveClass;
var beforeLeave = data.beforeLeave;
var leave = data.leave;
@ -5408,6 +5423,7 @@ function leave (vnode, rm) {
el.parentNode._pending[vnode.key] = null;
}
if (expectsCSS) {
removeTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveActiveClass);
}
if (cb.cancelled) {
@ -5440,9 +5456,10 @@ function leave (vnode, rm) {
beforeLeave && beforeLeave(el);
if (expectsCSS) {
addTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
nextFrame(function () {
addTransitionClass(el, leaveToClass);
removeTransitionClass(el, leaveClass);
addTransitionClass(el, leaveActiveClass);
if (!cb.cancelled && !userWantsControl) {
whenTransitionEnds(el, type, cb);
}
@ -5477,6 +5494,9 @@ var autoCssTransition = cached(function (name) {
enterClass: (name + "-enter"),
leaveClass: (name + "-leave"),
appearClass: (name + "-enter"),
enterToClass: (name + "-enter-to"),
leaveToClass: (name + "-leave-to"),
appearToClass: (name + "-enter-to"),
enterActiveClass: (name + "-enter-active"),
leaveActiveClass: (name + "-leave-active"),
appearActiveClass: (name + "-enter-active")
@ -5744,10 +5764,13 @@ var transitionProps = {
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String
appearActiveClass: String,
appearToClass: String
};
// in case the child is also an abstract component, e.g. <keep-alive>
@ -5791,6 +5814,10 @@ function hasParentTransition (vnode) {
}
}
function isSameChild (child, oldChild) {
return oldChild.key === child.key && oldChild.tag === child.tag
}
var Transition = {
name: 'transition',
props: transitionProps,
@ -5863,11 +5890,10 @@ var Transition = {
child.data.show = true;
}
if (oldChild && oldChild.data && oldChild.key !== key) {
if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
// replace old child transition data with fresh one
// important for dynamic transitions!
var oldData = oldChild.data.transition = extend({}, data);
var oldData = oldChild && (oldChild.data.transition = extend({}, data));
// handle transition mode
if (mode === 'out-in') {
// return placeholder node and queue update when leave finishes
@ -6078,6 +6104,15 @@ Vue$2.prototype.$mount = function (
return this._mount(el, hydrating)
};
if ("development" !== 'production' &&
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" +
"See more tips at https://vuejs.org/guide/deployment.html"
);
}
// devtools global hook
/* istanbul ignore next */
setTimeout(function () {
@ -6088,8 +6123,8 @@ setTimeout(function () {
"development" !== 'production' &&
inBrowser && !isEdge && /Chrome\/\d+/.test(window.navigator.userAgent)
) {
console.log(
'Download the Vue Devtools for a better development experience:\n' +
console[console.info ? 'info' : 'log'](
'Download the Vue Devtools extension for a better development experience:\n' +
'https://github.com/vuejs/vue-devtools'
);
}

6
dist/vue.runtime.min.js

File diff suppressed because one or more lines are too long

40
packages/vue-server-renderer/build.js

@ -209,10 +209,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -2052,6 +2052,8 @@ function bind$1 (el, dir) {
};
}
/* */
var baseDirectives = {
bind: bind$1,
cloak: noop
@ -2330,23 +2332,25 @@ function genChildren (el, checkSkip) {
}
}
// determine the normalzation needed for the children array.
// determine the normalization needed for the children array.
// 0: no normalization needed
// 1: simple normalization needed (possible 1-level deep nested array)
// 2: full nomralization needed
// 2: full normalization needed
function getNormalizationType (children) {
var res = 0;
for (var i = 0; i < children.length; i++) {
var el = children[i];
if (needsNormalization(el) ||
(el.if && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
return 2
res = 2;
break
}
if (maybeComponent(el) ||
(el.if && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
return 1
res = 1;
}
}
return 0
return res
}
function needsNormalization (el) {
@ -2718,8 +2722,11 @@ function genCheckboxModel (
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
addProp(el, 'checked',
"Array.isArray(" + value + ")" +
"?_i(" + value + "," + valueBinding + ")>-1" +
":_q(" + value + "," + trueValueBinding + ")"
"?_i(" + value + "," + valueBinding + ")>-1" + (
trueValueBinding === 'true'
? (":(" + value + ")")
: (":_q(" + value + "," + trueValueBinding + ")")
)
);
addHandler(el, 'change',
"var $$a=" + value + "," +
@ -3343,9 +3350,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove(this.vm._watchers, this);
}
var i = this.deps.length;
@ -3769,6 +3775,14 @@ var computedSharedDefinition = {
function initComputed (vm$$1, computed) {
for (var key in computed) {
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && key in vm$$1) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm$$1
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm$$1);
@ -5648,7 +5662,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}

2
packages/vue-server-renderer/package.json

@ -1,6 +1,6 @@
{
"name": "vue-server-renderer",
"version": "2.1.7",
"version": "2.1.8",
"description": "server renderer for Vue 2.0",
"main": "index.js",
"repository": {

40
packages/vue-template-compiler/build.js

@ -84,10 +84,10 @@ function isPrimitive (value) {
*/
function cached (fn) {
var cache = Object.create(null);
return function cachedFn (str) {
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
}
})
}
/**
@ -1927,6 +1927,8 @@ function bind$1 (el, dir) {
};
}
/* */
var baseDirectives = {
bind: bind$1,
cloak: noop
@ -2205,23 +2207,25 @@ function genChildren (el, checkSkip) {
}
}
// determine the normalzation needed for the children array.
// determine the normalization needed for the children array.
// 0: no normalization needed
// 1: simple normalization needed (possible 1-level deep nested array)
// 2: full nomralization needed
// 2: full normalization needed
function getNormalizationType (children) {
var res = 0;
for (var i = 0; i < children.length; i++) {
var el = children[i];
if (needsNormalization(el) ||
(el.if && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
return 2
res = 2;
break
}
if (maybeComponent(el) ||
(el.if && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
return 1
res = 1;
}
}
return 0
return res
}
function needsNormalization (el) {
@ -2567,8 +2571,11 @@ function genCheckboxModel (
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
addProp(el, 'checked',
"Array.isArray(" + value + ")" +
"?_i(" + value + "," + valueBinding + ")>-1" +
":_q(" + value + "," + trueValueBinding + ")"
"?_i(" + value + "," + valueBinding + ")>-1" + (
trueValueBinding === 'true'
? (":(" + value + ")")
: (":_q(" + value + "," + trueValueBinding + ")")
)
);
addHandler(el, 'change',
"var $$a=" + value + "," +
@ -3192,9 +3199,8 @@ Watcher.prototype.teardown = function teardown () {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed or is performing a v-for
// re-render (the watcher list is then filtered by v-for).
if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {
// if the vm is being destroyed.
if (!this.vm._isBeingDestroyed) {
remove(this.vm._watchers, this);
}
var i = this.deps.length;
@ -3618,6 +3624,14 @@ var computedSharedDefinition = {
function initComputed (vm, computed) {
for (var key in computed) {
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && key in vm) {
warn(
"existing instance property \"" + key + "\" will be " +
"overwritten by a computed property with the same name.",
vm
);
}
var userDef = computed[key];
if (typeof userDef === 'function') {
computedSharedDefinition.get = makeComputedGetter(userDef, vm);
@ -5497,7 +5511,7 @@ function assertProp (
}
for (var i = 0; i < type.length && !valid; i++) {
var assertedType = assertType(value, type[i]);
expectedTypes.push(assertedType.expectedType);
expectedTypes.push(assertedType.expectedType || '');
valid = assertedType.valid;
}
}

2
packages/vue-template-compiler/package.json

@ -1,6 +1,6 @@
{
"name": "vue-template-compiler",
"version": "2.1.7",
"version": "2.1.8",
"description": "template compiler for Vue 2.0",
"main": "index.js",
"repository": {

Loading…
Cancel
Save