1
1
/*!
2
- * Vue.js v2.3.0
2
+ * Vue.js v2.3.1
3
3
* (c) 2014-2017 Evan You
4
4
* Released under the MIT License.
5
5
*/
@@ -37,24 +37,24 @@ function isObject (obj) {
37
37
return obj !== null && typeof obj === 'object'
38
38
}
39
39
40
- var toString = Object . prototype . toString ;
40
+ var _toString = Object . prototype . toString ;
41
41
42
42
/**
43
43
* Strict object type check. Only returns true
44
44
* for plain JavaScript objects.
45
45
*/
46
46
function isPlainObject ( obj ) {
47
- return toString . call ( obj ) === '[object Object]'
47
+ return _toString . call ( obj ) === '[object Object]'
48
48
}
49
49
50
50
function isRegExp ( v ) {
51
- return toString . call ( v ) === '[object RegExp]'
51
+ return _toString . call ( v ) === '[object RegExp]'
52
52
}
53
53
54
54
/**
55
55
* Convert a value to a string that is actually rendered.
56
56
*/
57
- function _toString ( val ) {
57
+ function toString ( val ) {
58
58
return val == null
59
59
? ''
60
60
: typeof val === 'object'
@@ -415,9 +415,11 @@ function parsePath (path) {
415
415
}
416
416
}
417
417
418
+ /* */
419
+
418
420
var warn = noop ;
419
421
var tip = noop ;
420
- var formatComponentName ;
422
+ var formatComponentName = ( null ) ; // work around flow check
421
423
422
424
if ( process . env . NODE_ENV !== 'production' ) {
423
425
var hasConsole = typeof console !== 'undefined' ;
@@ -506,6 +508,8 @@ if (process.env.NODE_ENV !== 'production') {
506
508
} ;
507
509
}
508
510
511
+ /* */
512
+
509
513
function handleError ( err , vm , info ) {
510
514
if ( config . errorHandler ) {
511
515
config . errorHandler . call ( null , err , vm , info ) ;
@@ -1518,6 +1522,8 @@ function isType (type, fn) {
1518
1522
return false
1519
1523
}
1520
1524
1525
+ /* */
1526
+
1521
1527
var mark ;
1522
1528
var measure ;
1523
1529
@@ -1914,7 +1920,7 @@ function normalizeArrayChildren (children, nestedIndex) {
1914
1920
res . push . apply ( res , normalizeArrayChildren ( c , ( ( nestedIndex || '' ) + "_" + i ) ) ) ;
1915
1921
} else if ( isPrimitive ( c ) ) {
1916
1922
if ( isDef ( last ) && isDef ( last . text ) ) {
1917
- ( last ) . text += String ( c ) ;
1923
+ last . text += String ( c ) ;
1918
1924
} else if ( c !== '' ) {
1919
1925
// convert primitive to vnode
1920
1926
res . push ( createTextVNode ( c ) ) ;
@@ -1925,7 +1931,7 @@ function normalizeArrayChildren (children, nestedIndex) {
1925
1931
} else {
1926
1932
// default key for nested array children (likely generated by v-for)
1927
1933
if ( isDef ( c . tag ) && isUndef ( c . key ) && isDef ( nestedIndex ) ) {
1928
- c . key = "__vlist" + ( ( nestedIndex ) ) + "_" + i + "__" ;
1934
+ c . key = "__vlist" + nestedIndex + "_" + i + "__" ;
1929
1935
}
1930
1936
res . push ( c ) ;
1931
1937
}
@@ -3275,7 +3281,7 @@ function createFunctionalComponent (
3275
3281
var propOptions = Ctor . options . props ;
3276
3282
if ( isDef ( propOptions ) ) {
3277
3283
for ( var key in propOptions ) {
3278
- props [ key ] = validateProp ( key , propOptions , propsData ) ;
3284
+ props [ key ] = validateProp ( key , propOptions , propsData || { } ) ;
3279
3285
}
3280
3286
} else {
3281
3287
if ( isDef ( data . attrs ) ) { mergeProps ( props , data . attrs ) ; }
@@ -3604,7 +3610,7 @@ function _createElement (
3604
3610
// direct component options / constructor
3605
3611
vnode = createComponent ( tag , data , context , children ) ;
3606
3612
}
3607
- if ( vnode !== undefined ) {
3613
+ if ( isDef ( vnode ) ) {
3608
3614
if ( ns ) { applyNS ( vnode , ns ) ; }
3609
3615
return vnode
3610
3616
} else {
@@ -3618,7 +3624,7 @@ function applyNS (vnode, ns) {
3618
3624
// use default namespace inside foreignObject
3619
3625
return
3620
3626
}
3621
- if ( Array . isArray ( vnode . children ) ) {
3627
+ if ( isDef ( vnode . children ) ) {
3622
3628
for ( var i = 0 , l = vnode . children . length ; i < l ; i ++ ) {
3623
3629
var child = vnode . children [ i ] ;
3624
3630
if ( isDef ( child . tag ) && isUndef ( child . ns ) ) {
@@ -3902,7 +3908,7 @@ function renderMixin (Vue) {
3902
3908
// code size.
3903
3909
Vue . prototype . _o = markOnce ;
3904
3910
Vue . prototype . _n = toNumber ;
3905
- Vue . prototype . _s = _toString ;
3911
+ Vue . prototype . _s = toString ;
3906
3912
Vue . prototype . _l = renderList ;
3907
3913
Vue . prototype . _t = renderSlot ;
3908
3914
Vue . prototype . _q = looseEqual ;
@@ -4384,7 +4390,7 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
4384
4390
get : isServerRendering
4385
4391
} ) ;
4386
4392
4387
- Vue$3 . version = '2.3.0 ' ;
4393
+ Vue$3 . version = '2.3.1 ' ;
4388
4394
4389
4395
/* */
4390
4396
@@ -6187,7 +6193,7 @@ function updateDOMProps (oldVnode, vnode) {
6187
6193
// non-string values will be stringified
6188
6194
elm . _value = cur ;
6189
6195
// avoid resetting cursor position when value is the same
6190
- var strCur = cur == null ? '' : String ( cur ) ;
6196
+ var strCur = isUndef ( cur ) ? '' : String ( cur ) ;
6191
6197
if ( shouldUpdateValue ( elm , vnode , strCur ) ) {
6192
6198
elm . value = strCur ;
6193
6199
}
@@ -6639,24 +6645,23 @@ function enter (vnode, toggleDisplay) {
6639
6645
return
6640
6646
}
6641
6647
6642
- var ref = ( data ) ;
6643
- var css = ref . css ;
6644
- var type = ref . type ;
6645
- var enterClass = ref . enterClass ;
6646
- var enterToClass = ref . enterToClass ;
6647
- var enterActiveClass = ref . enterActiveClass ;
6648
- var appearClass = ref . appearClass ;
6649
- var appearToClass = ref . appearToClass ;
6650
- var appearActiveClass = ref . appearActiveClass ;
6651
- var beforeEnter = ref . beforeEnter ;
6652
- var enter = ref . enter ;
6653
- var afterEnter = ref . afterEnter ;
6654
- var enterCancelled = ref . enterCancelled ;
6655
- var beforeAppear = ref . beforeAppear ;
6656
- var appear = ref . appear ;
6657
- var afterAppear = ref . afterAppear ;
6658
- var appearCancelled = ref . appearCancelled ;
6659
- var duration = ref . duration ;
6648
+ var css = data . css ;
6649
+ var type = data . type ;
6650
+ var enterClass = data . enterClass ;
6651
+ var enterToClass = data . enterToClass ;
6652
+ var enterActiveClass = data . enterActiveClass ;
6653
+ var appearClass = data . appearClass ;
6654
+ var appearToClass = data . appearToClass ;
6655
+ var appearActiveClass = data . appearActiveClass ;
6656
+ var beforeEnter = data . beforeEnter ;
6657
+ var enter = data . enter ;
6658
+ var afterEnter = data . afterEnter ;
6659
+ var enterCancelled = data . enterCancelled ;
6660
+ var beforeAppear = data . beforeAppear ;
6661
+ var appear = data . appear ;
6662
+ var afterAppear = data . afterAppear ;
6663
+ var appearCancelled = data . appearCancelled ;
6664
+ var duration = data . duration ;
6660
6665
6661
6666
// activeInstance will always be the <transition> component managing this
6662
6667
// transition. One edge case to check is when the <transition> is placed
@@ -6788,18 +6793,17 @@ function leave (vnode, rm) {
6788
6793
return
6789
6794
}
6790
6795
6791
- var ref = ( data ) ;
6792
- var css = ref . css ;
6793
- var type = ref . type ;
6794
- var leaveClass = ref . leaveClass ;
6795
- var leaveToClass = ref . leaveToClass ;
6796
- var leaveActiveClass = ref . leaveActiveClass ;
6797
- var beforeLeave = ref . beforeLeave ;
6798
- var leave = ref . leave ;
6799
- var afterLeave = ref . afterLeave ;
6800
- var leaveCancelled = ref . leaveCancelled ;
6801
- var delayLeave = ref . delayLeave ;
6802
- var duration = ref . duration ;
6796
+ var css = data . css ;
6797
+ var type = data . type ;
6798
+ var leaveClass = data . leaveClass ;
6799
+ var leaveToClass = data . leaveToClass ;
6800
+ var leaveActiveClass = data . leaveActiveClass ;
6801
+ var beforeLeave = data . beforeLeave ;
6802
+ var leave = data . leave ;
6803
+ var afterLeave = data . afterLeave ;
6804
+ var leaveCancelled = data . leaveCancelled ;
6805
+ var delayLeave = data . delayLeave ;
6806
+ var duration = data . duration ;
6803
6807
6804
6808
var expectsCSS = css !== false && ! isIE9 ;
6805
6809
var userWantsControl = getHookArgumentsLength ( leave ) ;
@@ -6810,7 +6814,7 @@ function leave (vnode, rm) {
6810
6814
: duration
6811
6815
) ;
6812
6816
6813
- if ( process . env . NODE_ENV !== 'production' && explicitLeaveDuration != null ) {
6817
+ if ( process . env . NODE_ENV !== 'production' && isDef ( explicitLeaveDuration ) ) {
6814
6818
checkDuration ( explicitLeaveDuration , 'leave' , vnode ) ;
6815
6819
}
6816
6820
@@ -6847,7 +6851,7 @@ function leave (vnode, rm) {
6847
6851
}
6848
6852
// record leaving element
6849
6853
if ( ! vnode . data . show ) {
6850
- ( el . parentNode . _pending || ( el . parentNode . _pending = { } ) ) [ vnode . key ] = vnode ;
6854
+ ( el . parentNode . _pending || ( el . parentNode . _pending = { } ) ) [ ( vnode . key ) ] = vnode ;
6851
6855
}
6852
6856
beforeLeave && beforeLeave ( el ) ;
6853
6857
if ( expectsCSS ) {
0 commit comments