We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a66ece commit 3d17807Copy full SHA for 3d17807
src/compiler/compile.js
@@ -615,6 +615,17 @@ function compileDirectives (attrs, options) {
615
value = textParser.tokensToExp(tokens)
616
arg = name
617
pushDir('bind', publicDirectives.bind, true)
618
+ // warn against mixing mustaches with v-bind
619
+ if (process.env.NODE_ENV !== 'production') {
620
+ if (name === 'class' && Array.prototype.some.call(attrs, function (attr) {
621
+ return attr.name === ':class' || attr.name === 'v-bind:class'
622
+ })) {
623
+ _.warn(
624
+ name + '="' + rawValue + '": Do not mix mustache interpolation ' +
625
+ 'and v-bind for "class" on the same element. Use one or the other.'
626
+ )
627
+ }
628
629
} else
630
631
// special attribute: transition
0 commit comments