File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,9 @@ if (process.env.NODE_ENV !== 'production') {
140
140
141
141
ATTR_INVALID : function ( name ) {
142
142
warn (
143
- 'Mustache interpolation found in non-native attribute "' + name + '": ' +
143
+ 'Mustache interpolation found in vue-specific attribute "' + name + '": ' +
144
144
'attribute interpolation will be limited to native attributes only ' +
145
- 'in 1.0.0. Use v-bind for custom attributes and props.'
145
+ 'in 1.0.0. Use v-bind for vue directives and props.'
146
146
)
147
147
} ,
148
148
Original file line number Diff line number Diff line change @@ -20,25 +20,20 @@ var modelProps = {
20
20
'false-value' : '_falseValue'
21
21
}
22
22
23
+ // check for attribtues that prohibit interpolations
24
+ var 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 ) $ /
25
+
23
26
module . exports = {
24
27
25
28
priority : 850 ,
26
29
27
30
update : function ( value ) {
28
31
if ( this . arg ) {
29
-
30
32
if ( process . env . NODE_ENV !== 'production' ) {
31
- var attr = this . arg
32
- if ( ! (
33
- attr === 'class' ||
34
- / ^ d a t a - / . test ( attr ) ||
35
- ( attr === 'for' && 'htmlFor' in this . el ) ||
36
- _ . camelize ( attr ) in this . el
37
- ) ) {
38
- _ . deprecation . ATTR_INVALID ( attr )
33
+ if ( disallowedInterpAttrRE . test ( this . arg ) ) {
34
+ _ . deprecation . ATTR_INVALID ( this . arg )
39
35
}
40
36
}
41
-
42
37
this . setAttr ( this . arg , value )
43
38
} else if ( typeof value === 'object' ) {
44
39
// TODO no longer need to support object in 1.0.0
You can’t perform that action at this time.
0 commit comments