1
1
/*!
2
- * Vue.js v2.5.8
2
+ * Vue.js v2.5.9
3
3
* (c) 2014-2017 Evan You
4
4
* Released under the MIT License.
5
5
*/
@@ -717,9 +717,9 @@ var VNode = function VNode (
717
717
this . elm = elm ;
718
718
this . ns = undefined ;
719
719
this . context = context ;
720
- this . functionalContext = undefined ;
721
- this . functionalOptions = undefined ;
722
- this . functionalScopeId = undefined ;
720
+ this . fnContext = undefined ;
721
+ this . fnOptions = undefined ;
722
+ this . fnScopeId = undefined ;
723
723
this . key = data && data . key ;
724
724
this . componentOptions = componentOptions ;
725
725
this . componentInstance = undefined ;
@@ -778,6 +778,9 @@ function cloneVNode (vnode, deep) {
778
778
cloned . isStatic = vnode . isStatic ;
779
779
cloned . key = vnode . key ;
780
780
cloned . isComment = vnode . isComment ;
781
+ cloned . fnContext = vnode . fnContext ;
782
+ cloned . fnOptions = vnode . fnOptions ;
783
+ cloned . fnScopeId = vnode . fnScopeId ;
781
784
cloned . isCloned = true ;
782
785
if ( deep ) {
783
786
if ( vnode . children ) {
@@ -2524,7 +2527,7 @@ function resolveSlots (
2524
2527
}
2525
2528
// named slots should only be respected if the vnode was rendered in the
2526
2529
// same context.
2527
- if ( ( child . context === context || child . functionalContext === context ) &&
2530
+ if ( ( child . context === context || child . fnContext === context ) &&
2528
2531
data && data . slot != null
2529
2532
) {
2530
2533
var name = child . data . slot ;
@@ -2744,7 +2747,10 @@ function mountComponent (
2744
2747
} ;
2745
2748
}
2746
2749
2747
- vm . _watcher = new Watcher ( vm , updateComponent , noop ) ;
2750
+ // we set this to vm._watcher inside the watcher's constructor
2751
+ // since the watcher's initial patch may call $forceUpdate (e.g. inside child
2752
+ // component's mounted hook), which relies on vm._watcher being already defined
2753
+ new Watcher ( vm , updateComponent , noop , null , true /* isRenderWatcher */ ) ;
2748
2754
hydrating = false ;
2749
2755
2750
2756
// manually mounted instance, call mounted on self
@@ -3031,9 +3037,13 @@ var Watcher = function Watcher (
3031
3037
vm ,
3032
3038
expOrFn ,
3033
3039
cb ,
3034
- options
3040
+ options ,
3041
+ isRenderWatcher
3035
3042
) {
3036
3043
this . vm = vm ;
3044
+ if ( isRenderWatcher ) {
3045
+ vm . _watcher = this ;
3046
+ }
3037
3047
vm . _watchers . push ( this ) ;
3038
3048
// options
3039
3049
if ( options ) {
@@ -3944,8 +3954,8 @@ function FunctionalRenderContext (
3944
3954
this . _c = function ( a , b , c , d ) {
3945
3955
var vnode = createElement ( contextVm , a , b , c , d , needNormalization ) ;
3946
3956
if ( vnode ) {
3947
- vnode . functionalScopeId = options . _scopeId ;
3948
- vnode . functionalContext = parent ;
3957
+ vnode . fnScopeId = options . _scopeId ;
3958
+ vnode . fnContext = parent ;
3949
3959
}
3950
3960
return vnode
3951
3961
} ;
@@ -3986,8 +3996,8 @@ function createFunctionalComponent (
3986
3996
var vnode = options . render . call ( null , renderContext . _c , renderContext ) ;
3987
3997
3988
3998
if ( vnode instanceof VNode ) {
3989
- vnode . functionalContext = contextVm ;
3990
- vnode . functionalOptions = options ;
3999
+ vnode . fnContext = contextVm ;
4000
+ vnode . fnOptions = options ;
3991
4001
if ( data . slot ) {
3992
4002
( vnode . data || ( vnode . data = { } ) ) . slot = data . slot ;
3993
4003
}
@@ -4822,7 +4832,7 @@ function pruneCacheEntry (
4822
4832
current
4823
4833
) {
4824
4834
var cached$$1 = cache [ key ] ;
4825
- if ( cached$$1 && cached$$1 !== current ) {
4835
+ if ( cached$$1 && ( ! current || cached$$1 . tag !== current . tag ) ) {
4826
4836
cached$$1 . componentInstance . $destroy ( ) ;
4827
4837
}
4828
4838
cache [ key ] = null ;
@@ -4973,7 +4983,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
4973
4983
}
4974
4984
} ) ;
4975
4985
4976
- Vue$3 . version = '2.5.8 ' ;
4986
+ Vue$3 . version = '2.5.9 ' ;
4977
4987
4978
4988
/* */
4979
4989
@@ -5572,7 +5582,7 @@ function createPatchFunction (backend) {
5572
5582
// of going through the normal attribute patching process.
5573
5583
function setScope ( vnode ) {
5574
5584
var i ;
5575
- if ( isDef ( i = vnode . functionalScopeId ) ) {
5585
+ if ( isDef ( i = vnode . fnScopeId ) ) {
5576
5586
nodeOps . setAttribute ( vnode . elm , i , '' ) ;
5577
5587
} else {
5578
5588
var ancestor = vnode ;
@@ -5586,7 +5596,7 @@ function createPatchFunction (backend) {
5586
5596
// for slot content they should also get the scopeId from the host instance.
5587
5597
if ( isDef ( i = activeInstance ) &&
5588
5598
i !== vnode . context &&
5589
- i !== vnode . functionalContext &&
5599
+ i !== vnode . fnContext &&
5590
5600
isDef ( i = i . $options . _scopeId )
5591
5601
) {
5592
5602
nodeOps . setAttribute ( vnode . elm , i , '' ) ;
@@ -6176,7 +6186,7 @@ function updateAttrs (oldVnode, vnode) {
6176
6186
// #4391: in IE9, setting type can reset value for input[type=radio]
6177
6187
// #6666: IE/Edge forces progress value down to 1 before setting a max
6178
6188
/* istanbul ignore if */
6179
- if ( ( isIE9 || isEdge ) && attrs . value !== oldAttrs . value ) {
6189
+ if ( ( isIE || isEdge ) && attrs . value !== oldAttrs . value ) {
6180
6190
setAttr ( elm , 'value' , attrs . value ) ;
6181
6191
}
6182
6192
for ( key in oldAttrs ) {
@@ -6216,6 +6226,23 @@ function setAttr (el, key, value) {
6216
6226
if ( isFalsyAttrValue ( value ) ) {
6217
6227
el . removeAttribute ( key ) ;
6218
6228
} else {
6229
+ // #7138: IE10 & 11 fires input event when setting placeholder on
6230
+ // <textarea>... block the first input event and remove the blocker
6231
+ // immediately.
6232
+ /* istanbul ignore if */
6233
+ if (
6234
+ isIE && ! isIE9 &&
6235
+ el . tagName === 'TEXTAREA' &&
6236
+ key === 'placeholder' && ! el . __ieph
6237
+ ) {
6238
+ var blocker = function ( e ) {
6239
+ e . stopImmediatePropagation ( ) ;
6240
+ el . removeEventListener ( 'input' , blocker ) ;
6241
+ } ;
6242
+ el . addEventListener ( 'input' , blocker ) ;
6243
+ // $flow-disable-line
6244
+ el . __ieph = true ; /* IE placeholder patched */
6245
+ }
6219
6246
el . setAttribute ( key , value ) ;
6220
6247
}
6221
6248
}
@@ -8830,7 +8857,8 @@ function parseHTML (html, options) {
8830
8857
var onRE = / ^ @ | ^ v - o n : / ;
8831
8858
var dirRE = / ^ v - | ^ @ | ^ : / ;
8832
8859
var forAliasRE = / ( .* ?) \s + (?: i n | o f ) \s + ( .* ) / ;
8833
- var forIteratorRE = / \( ( \{ [ ^ } ] * \} | [ ^ , ] * ) , ( [ ^ , ] * ) (?: , ( [ ^ , ] * ) ) ? \) / ;
8860
+ var forIteratorRE = / \( ( \{ [ ^ } ] * \} | [ ^ , { ] * ) , ( [ ^ , ] * ) (?: , ( [ ^ , ] * ) ) ? \) / ;
8861
+ var stripParensRE = / ^ \( | \) $ / g;
8834
8862
8835
8863
var argRE = / : ( .* ) $ / ;
8836
8864
var bindRE = / ^ : | ^ v - b i n d : / ;
@@ -9171,7 +9199,7 @@ function processFor (el) {
9171
9199
el . iterator2 = iteratorMatch [ 3 ] . trim ( ) ;
9172
9200
}
9173
9201
} else {
9174
- el . alias = alias ;
9202
+ el . alias = alias . replace ( stripParensRE , '' ) ;
9175
9203
}
9176
9204
}
9177
9205
}
0 commit comments