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') {
213213 'The global "interpolate" config will be deprecated in 1.0.0. Use "v-pre" ' +
214214 'on elements that should be skipped by the template compiler.'
215215 )
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+ )
216223 }
217224
218225 }
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ Directive.prototype._bind = function () {
7171 this . el . removeAttribute ( 'bind-' + name )
7272 } else if ( name === 'on' ) {
7373 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 )
7676 }
7777 }
7878 if ( typeof def === 'function' ) {
@@ -134,6 +134,16 @@ Directive.prototype._bind = function () {
134134Directive . prototype . _checkDynamicLiteral = function ( ) {
135135 var expression = this . expression
136136 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+
137147 var tokens = textParser . parse ( expression )
138148 if ( tokens ) {
139149 var exp = textParser . tokensToExp ( tokens )
You can’t perform that action at this time.
0 commit comments