File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,13 @@ if (process.env.NODE_ENV !== 'production') {
213
213
'The global "interpolate" config will be deprecated in 1.0.0. Use "v-pre" ' +
214
214
'on elements that should be skipped by the template compiler.'
215
215
)
216
+ } ,
217
+
218
+ LITERAL : function ( ) {
219
+ warn (
220
+ 'Literal directives will be deprecated in 1.0.0. Just add quotes if ' +
221
+ 'you want to pass a literal string to the directive.'
222
+ )
216
223
}
217
224
218
225
}
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ Directive.prototype._bind = function () {
71
71
this . el . removeAttribute ( 'bind-' + name )
72
72
} else if ( name === 'on' ) {
73
73
this . el . removeAttribute ( 'on-' + this . arg )
74
- } else if ( name === 'transition' ) {
75
- this . el . removeAttribute ( name )
74
+ } else if ( name === 'transition' || name === 'el' ) {
75
+ this . el . removeAttribute ( this . arg ? 'bind-' + name : name )
76
76
}
77
77
}
78
78
if ( typeof def === 'function' ) {
@@ -134,6 +134,16 @@ Directive.prototype._bind = function () {
134
134
Directive . prototype . _checkDynamicLiteral = function ( ) {
135
135
var expression = this . expression
136
136
if ( expression && this . isLiteral ) {
137
+
138
+ if ( process . env . NODE_ENV !== 'production' ) {
139
+ if ( this . name !== 'el' &&
140
+ this . name !== 'ref' &&
141
+ this . name !== 'transition' &&
142
+ this . name !== 'component' ) {
143
+ _ . deprecation . LITERAL ( )
144
+ }
145
+ }
146
+
137
147
var tokens = textParser . parse ( expression )
138
148
if ( tokens ) {
139
149
var exp = textParser . tokensToExp ( tokens )
You can’t perform that action at this time.
0 commit comments