File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,11 @@ p._bind = function (def) {
9191 watcher . addCb ( update )
9292 }
9393 this . _watcher = watcher
94- this . update ( watcher . value )
94+ if ( this . _initValue != null ) {
95+ watcher . set ( this . _initValue )
96+ } else {
97+ this . update ( watcher . value )
98+ }
9599 }
96100 this . _bound = true
97101}
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ module.exports = {
1010 }
1111 _ . on ( el , 'change' , this . listener )
1212 if ( el . checked ) {
13- // watcher is not set up yet
14- this . vm . $set ( this . expression , el . checked )
13+ this . _initValue = el . checked
1514 }
1615 } ,
1716
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ module.exports = {
1010 }
1111 _ . on ( el , 'change' , this . listener )
1212 if ( el . checked ) {
13- // watcher is not set up yet
14- this . vm . $set ( this . expression , el . value )
13+ this . _initValue = el . value
1514 }
1615 } ,
1716
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ function checkInitialValue () {
124124 }
125125 }
126126 if ( initValue ) {
127- this . vm . $set ( this . expression , initValue )
127+ this . _initValue = initValue
128128 }
129129}
130130
Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ module.exports = {
9999 el . hasAttribute ( 'value' ) ||
100100 ( el . tagName === 'TEXTAREA' && el . value . trim ( ) )
101101 ) {
102- // watcher is not set up yet
103- this . vm . $set ( this . expression , el . value )
102+ this . _initValue = el . value
104103 }
105104 } ,
106105
You can’t perform that action at this time.
0 commit comments