File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ module.exports = {
86
86
var modelProp = modelProps [ attr ]
87
87
if ( modelProp ) {
88
88
this . el [ modelProp ] = value
89
+ // update v-model if present
90
+ var model = this . el . __v_model
91
+ if ( model ) {
92
+ model . listener ( )
93
+ }
89
94
}
90
95
}
91
96
}
Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ module.exports = {
27
27
return val
28
28
}
29
29
30
- this . on ( 'change' , function ( ) {
30
+ this . listener = function ( ) {
31
31
self . set ( self . getValue ( ) )
32
- } )
32
+ }
33
+ this . on ( 'change' , this . listener )
33
34
34
35
if ( el . checked ) {
35
36
this . _initValue = this . getValue ( )
Original file line number Diff line number Diff line change @@ -27,15 +27,16 @@ module.exports = {
27
27
this . multiple = el . hasAttribute ( 'multiple' )
28
28
29
29
// attach listener
30
- this . on ( 'change' , function ( ) {
30
+ this . listener = function ( ) {
31
31
var value = getValue ( el , self . multiple )
32
32
value = self . number
33
33
? _ . isArray ( value )
34
34
? value . map ( _ . toNumber )
35
35
: _ . toNumber ( value )
36
36
: value
37
37
self . set ( value )
38
- } )
38
+ }
39
+ this . on ( 'change' , this . listener )
39
40
40
41
// check initial value (inline selected attribute)
41
42
checkInitialValue . call ( this )
You can’t perform that action at this time.
0 commit comments