11/*!
2- * Vue.js v2.1.7
2+ * Vue.js v2.1.8
33 * (c) 2014-2016 Evan You
44 * Released under the MIT License.
55 */
@@ -82,10 +82,10 @@ function isPrimitive (value) {
8282 */
8383function cached ( fn ) {
8484 var cache = Object . create ( null ) ;
85- return function cachedFn ( str ) {
85+ return ( function cachedFn ( str ) {
8686 var hit = cache [ str ] ;
8787 return hit || ( cache [ str ] = fn ( str ) )
88- }
88+ } )
8989}
9090
9191/**
@@ -1300,7 +1300,7 @@ function assertProp (
13001300 }
13011301 for ( var i = 0 ; i < type . length && ! valid ; i ++ ) {
13021302 var assertedType = assertType ( value , type [ i ] ) ;
1303- expectedTypes . push ( assertedType . expectedType ) ;
1303+ expectedTypes . push ( assertedType . expectedType || '' ) ;
13041304 valid = assertedType . valid ;
13051305 }
13061306 }
@@ -1791,9 +1791,8 @@ Watcher.prototype.teardown = function teardown () {
17911791 if ( this . active ) {
17921792 // remove self from vm's watcher list
17931793 // this is a somewhat expensive operation so we skip it
1794- // if the vm is being destroyed or is performing a v-for
1795- // re-render (the watcher list is then filtered by v-for).
1796- if ( ! this . vm . _isBeingDestroyed && ! this . vm . _vForRemoving ) {
1794+ // if the vm is being destroyed.
1795+ if ( ! this . vm . _isBeingDestroyed ) {
17971796 remove$1 ( this . vm . _watchers , this ) ;
17981797 }
17991798 var i = this . deps . length ;
@@ -1933,6 +1932,14 @@ var computedSharedDefinition = {
19331932
19341933function initComputed ( vm , computed ) {
19351934 for ( var key in computed ) {
1935+ /* istanbul ignore if */
1936+ if ( process . env . NODE_ENV !== 'production' && key in vm ) {
1937+ warn (
1938+ "existing instance property \"" + key + "\" will be " +
1939+ "overwritten by a computed property with the same name." ,
1940+ vm
1941+ ) ;
1942+ }
19361943 var userDef = computed [ key ] ;
19371944 if ( typeof userDef === 'function' ) {
19381945 computedSharedDefinition . get = makeComputedGetter ( userDef , vm ) ;
@@ -3651,7 +3658,7 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
36513658 get : isServerRendering
36523659} ) ;
36533660
3654- Vue$3 . version = '2.1.7 ' ;
3661+ Vue$3 . version = '2.1.8 ' ;
36553662
36563663/* */
36573664
@@ -4478,6 +4485,8 @@ function createPatchFunction (backend) {
44784485 }
44794486 }
44804487 }
4488+ } else if ( elm . data !== vnode . text ) {
4489+ elm . data = vnode . text ;
44814490 }
44824491 return true
44834492 }
@@ -4489,7 +4498,7 @@ function createPatchFunction (backend) {
44894498 vnode . tag . toLowerCase ( ) === ( node . tagName && node . tagName . toLowerCase ( ) )
44904499 )
44914500 } else {
4492- return _toString ( vnode . text ) === node . data
4501+ return node . nodeType === ( vnode . isComment ? 8 : 3 )
44934502 }
44944503 }
44954504
@@ -5273,8 +5282,10 @@ function enter (vnode, toggleDisplay) {
52735282 var css = data . css ;
52745283 var type = data . type ;
52755284 var enterClass = data . enterClass ;
5285+ var enterToClass = data . enterToClass ;
52765286 var enterActiveClass = data . enterActiveClass ;
52775287 var appearClass = data . appearClass ;
5288+ var appearToClass = data . appearToClass ;
52785289 var appearActiveClass = data . appearActiveClass ;
52795290 var beforeEnter = data . beforeEnter ;
52805291 var enter = data . enter ;
@@ -5304,6 +5315,7 @@ function enter (vnode, toggleDisplay) {
53045315
53055316 var startClass = isAppear ? appearClass : enterClass ;
53065317 var activeClass = isAppear ? appearActiveClass : enterActiveClass ;
5318+ var toClass = isAppear ? appearToClass : enterToClass ;
53075319 var beforeEnterHook = isAppear ? ( beforeAppear || beforeEnter ) : beforeEnter ;
53085320 var enterHook = isAppear ? ( typeof appear === 'function' ? appear : enter ) : enter ;
53095321 var afterEnterHook = isAppear ? ( afterAppear || afterEnter ) : afterEnter ;
@@ -5318,6 +5330,7 @@ function enter (vnode, toggleDisplay) {
53185330
53195331 var cb = el . _enterCb = once ( function ( ) {
53205332 if ( expectsCSS ) {
5333+ removeTransitionClass ( el , toClass ) ;
53215334 removeTransitionClass ( el , activeClass ) ;
53225335 }
53235336 if ( cb . cancelled ) {
@@ -5350,9 +5363,10 @@ function enter (vnode, toggleDisplay) {
53505363 beforeEnterHook && beforeEnterHook ( el ) ;
53515364 if ( expectsCSS ) {
53525365 addTransitionClass ( el , startClass ) ;
5366+ addTransitionClass ( el , activeClass ) ;
53535367 nextFrame ( function ( ) {
5368+ addTransitionClass ( el , toClass ) ;
53545369 removeTransitionClass ( el , startClass ) ;
5355- addTransitionClass ( el , activeClass ) ;
53565370 if ( ! cb . cancelled && ! userWantsControl ) {
53575371 whenTransitionEnds ( el , type , cb ) ;
53585372 }
@@ -5391,6 +5405,7 @@ function leave (vnode, rm) {
53915405 var css = data . css ;
53925406 var type = data . type ;
53935407 var leaveClass = data . leaveClass ;
5408+ var leaveToClass = data . leaveToClass ;
53945409 var leaveActiveClass = data . leaveActiveClass ;
53955410 var beforeLeave = data . beforeLeave ;
53965411 var leave = data . leave ;
@@ -5410,6 +5425,7 @@ function leave (vnode, rm) {
54105425 el . parentNode . _pending [ vnode . key ] = null ;
54115426 }
54125427 if ( expectsCSS ) {
5428+ removeTransitionClass ( el , leaveToClass ) ;
54135429 removeTransitionClass ( el , leaveActiveClass ) ;
54145430 }
54155431 if ( cb . cancelled ) {
@@ -5442,9 +5458,10 @@ function leave (vnode, rm) {
54425458 beforeLeave && beforeLeave ( el ) ;
54435459 if ( expectsCSS ) {
54445460 addTransitionClass ( el , leaveClass ) ;
5461+ addTransitionClass ( el , leaveActiveClass ) ;
54455462 nextFrame ( function ( ) {
5463+ addTransitionClass ( el , leaveToClass ) ;
54465464 removeTransitionClass ( el , leaveClass ) ;
5447- addTransitionClass ( el , leaveActiveClass ) ;
54485465 if ( ! cb . cancelled && ! userWantsControl ) {
54495466 whenTransitionEnds ( el , type , cb ) ;
54505467 }
@@ -5479,6 +5496,9 @@ var autoCssTransition = cached(function (name) {
54795496 enterClass : ( name + "-enter" ) ,
54805497 leaveClass : ( name + "-leave" ) ,
54815498 appearClass : ( name + "-enter" ) ,
5499+ enterToClass : ( name + "-enter-to" ) ,
5500+ leaveToClass : ( name + "-leave-to" ) ,
5501+ appearToClass : ( name + "-enter-to" ) ,
54825502 enterActiveClass : ( name + "-enter-active" ) ,
54835503 leaveActiveClass : ( name + "-leave-active" ) ,
54845504 appearActiveClass : ( name + "-enter-active" )
@@ -5746,10 +5766,13 @@ var transitionProps = {
57465766 type : String ,
57475767 enterClass : String ,
57485768 leaveClass : String ,
5769+ enterToClass : String ,
5770+ leaveToClass : String ,
57495771 enterActiveClass : String ,
57505772 leaveActiveClass : String ,
57515773 appearClass : String ,
5752- appearActiveClass : String
5774+ appearActiveClass : String ,
5775+ appearToClass : String
57535776} ;
57545777
57555778// in case the child is also an abstract component, e.g. <keep-alive>
@@ -5793,6 +5816,10 @@ function hasParentTransition (vnode) {
57935816 }
57945817}
57955818
5819+ function isSameChild ( child , oldChild ) {
5820+ return oldChild . key === child . key && oldChild . tag === child . tag
5821+ }
5822+
57965823var Transition = {
57975824 name : 'transition' ,
57985825 props : transitionProps ,
@@ -5865,11 +5892,10 @@ var Transition = {
58655892 child . data . show = true ;
58665893 }
58675894
5868- if ( oldChild && oldChild . data && oldChild . key !== key ) {
5895+ if ( oldChild && oldChild . data && ! isSameChild ( child , oldChild ) ) {
58695896 // replace old child transition data with fresh one
58705897 // important for dynamic transitions!
5871- var oldData = oldChild . data . transition = extend ( { } , data ) ;
5872-
5898+ var oldData = oldChild && ( oldChild . data . transition = extend ( { } , data ) ) ;
58735899 // handle transition mode
58745900 if ( mode === 'out-in' ) {
58755901 // return placeholder node and queue update when leave finishes
@@ -6080,6 +6106,15 @@ Vue$3.prototype.$mount = function (
60806106 return this . _mount ( el , hydrating )
60816107} ;
60826108
6109+ if ( process . env . NODE_ENV !== 'production' &&
6110+ inBrowser && typeof console !== 'undefined' ) {
6111+ console [ console . info ? 'info' : 'log' ] (
6112+ "You are running Vue in development mode.\n" +
6113+ "Make sure to turn on production mode when deploying for production.\n" +
6114+ "See more tips at https://vuejs.org/guide/deployment.html"
6115+ ) ;
6116+ }
6117+
60836118// devtools global hook
60846119/* istanbul ignore next */
60856120setTimeout ( function ( ) {
@@ -6090,8 +6125,8 @@ setTimeout(function () {
60906125 process . env . NODE_ENV !== 'production' &&
60916126 inBrowser && ! isEdge && / C h r o m e \/ \d + / . test ( window . navigator . userAgent )
60926127 ) {
6093- console . log (
6094- 'Download the Vue Devtools for a better development experience:\n' +
6128+ console [ console . info ? 'info' : ' log' ] (
6129+ 'Download the Vue Devtools extension for a better development experience:\n' +
60956130 'https://github.com/vuejs/vue-devtools'
60966131 ) ;
60976132 }
@@ -7542,6 +7577,8 @@ function bind$2 (el, dir) {
75427577 } ;
75437578}
75447579
7580+ /* */
7581+
75457582var baseDirectives = {
75467583 bind : bind$2 ,
75477584 cloak : noop
@@ -7820,23 +7857,25 @@ function genChildren (el, checkSkip) {
78207857 }
78217858}
78227859
7823- // determine the normalzation needed for the children array.
7860+ // determine the normalization needed for the children array.
78247861// 0: no normalization needed
78257862// 1: simple normalization needed (possible 1-level deep nested array)
7826- // 2: full nomralization needed
7863+ // 2: full normalization needed
78277864function getNormalizationType ( children ) {
7865+ var res = 0 ;
78287866 for ( var i = 0 ; i < children . length ; i ++ ) {
78297867 var el = children [ i ] ;
78307868 if ( needsNormalization ( el ) ||
78317869 ( el . if && el . ifConditions . some ( function ( c ) { return needsNormalization ( c . block ) ; } ) ) ) {
7832- return 2
7870+ res = 2 ;
7871+ break
78337872 }
78347873 if ( maybeComponent ( el ) ||
78357874 ( el . if && el . ifConditions . some ( function ( c ) { return maybeComponent ( c . block ) ; } ) ) ) {
7836- return 1
7875+ res = 1 ;
78377876 }
78387877 }
7839- return 0
7878+ return res
78407879}
78417880
78427881function needsNormalization ( el ) {
@@ -8141,8 +8180,11 @@ function genCheckboxModel (
81418180 var falseValueBinding = getBindingAttr ( el , 'false-value' ) || 'false' ;
81428181 addProp ( el , 'checked' ,
81438182 "Array.isArray(" + value + ")" +
8144- "?_i(" + value + "," + valueBinding + ")>-1" +
8145- ":_q(" + value + "," + trueValueBinding + ")"
8183+ "?_i(" + value + "," + valueBinding + ")>-1" + (
8184+ trueValueBinding === 'true'
8185+ ? ( ":(" + value + ")" )
8186+ : ( ":_q(" + value + "," + trueValueBinding + ")" )
8187+ )
81468188 ) ;
81478189 addHandler ( el , 'change' ,
81488190 "var $$a=" + value + "," +
0 commit comments