@@ -5,13 +5,12 @@ import vStyle from '../internal/style'
5
5
const xlinkNS = 'http://www.w3.org/1999/xlink'
6
6
const xlinkRE = / ^ x l i n k : /
7
7
8
- // these input element attributes should also set their
9
- // corresponding properties
10
- const inputProps = {
11
- value : 1 ,
12
- checked : 1 ,
13
- selected : 1
14
- }
8
+ // check for attributes that prohibit interpolations
9
+ const disallowedInterpAttrRE = / ^ v - | ^ : | ^ @ | ^ ( i s | t r a n s i t i o n | t r a n s i t i o n - m o d e | d e b o u n c e | t r a c k - b y | s t a g g e r | e n t e r - s t a g g e r | l e a v e - s t a g g e r ) $ /
10
+
11
+ // these attributes should also set their corresponding properties
12
+ // because they only affect the initial state of the element
13
+ const attrWithPropsRE = / ^ ( v a l u e | c h e c k e d | s e l e c t e d | m u t e d ) $ /
15
14
16
15
// these attributes should set a hidden property for
17
16
// binding v-model to object values
@@ -21,9 +20,6 @@ const modelProps = {
21
20
'false-value' : '_falseValue'
22
21
}
23
22
24
- // check for attributes that prohibit interpolations
25
- const disallowedInterpAttrRE = / ^ v - | ^ : | ^ @ | ^ ( i s | t r a n s i t i o n | t r a n s i t i o n - m o d e | d e b o u n c e | t r a c k - b y | s t a g g e r | e n t e r - s t a g g e r | l e a v e - s t a g g e r ) $ /
26
-
27
23
export default {
28
24
29
25
priority : 850 ,
@@ -90,7 +86,11 @@ export default {
90
86
handleObject : vStyle . handleObject ,
91
87
92
88
handleSingle ( attr , value ) {
93
- if ( inputProps [ attr ] && attr in this . el ) {
89
+ if (
90
+ ! this . descriptor . interp &&
91
+ attrWithPropsRE . test ( attr ) &&
92
+ attr in this . el
93
+ ) {
94
94
this . el [ attr ] = attr === 'value'
95
95
? value == null // IE9 will set input.value to "null" for null...
96
96
? ''
0 commit comments