File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
test/unit/specs/directives Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ module.exports = {
93
93
el . hasAttribute ( 'value' ) ||
94
94
( el . tagName === 'TEXTAREA' && el . value . trim ( ) )
95
95
) {
96
- this . _initValue = el . value
96
+ this . _initValue = number
97
+ ? _ . toNumber ( el . value )
98
+ : el . value
97
99
}
98
100
} ,
99
101
Original file line number Diff line number Diff line change @@ -370,11 +370,12 @@ if (_.inBrowser) {
370
370
data : {
371
371
test : 1
372
372
} ,
373
- template : '<input v-model="test" number>'
373
+ template : '<input v-model="test" value="2" number>'
374
374
} )
375
- el . firstChild . value = 2
376
- trigger ( el . firstChild , 'input' )
377
375
expect ( vm . test ) . toBe ( 2 )
376
+ el . firstChild . value = 3
377
+ trigger ( el . firstChild , 'input' )
378
+ expect ( vm . test ) . toBe ( 3 )
378
379
} )
379
380
380
381
it ( 'IE9 cut and delete' , function ( done ) {
You can’t perform that action at this time.
0 commit comments