File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function Compiler (vm, options) {
49
49
50
50
// initialize element
51
51
var el = compiler . el = compiler . setupElement ( options )
52
- log ( '\nnew VM instance:' , el . tagName , '\n' )
52
+ log ( '\nnew VM instance: ' + el . tagName + '\n' )
53
53
54
54
// set compiler properties
55
55
compiler . vm = el . vue_vm = vm
@@ -399,7 +399,7 @@ CompilerProto.compile = function (node, root) {
399
399
compiler . compileNode ( node )
400
400
}
401
401
402
- } else if ( nodeType === 3 ) { // text node
402
+ } else if ( nodeType === 3 && config . interpolate ) { // text node
403
403
404
404
compiler . compileTextNode ( node )
405
405
@@ -438,7 +438,7 @@ CompilerProto.compileNode = function (node) {
438
438
this . bindDirective ( directive )
439
439
}
440
440
}
441
- } else {
441
+ } else if ( config . interpolate ) {
442
442
// non directive attribute, check interpolation tags
443
443
exp = TextParser . parseAttr ( attr . value )
444
444
if ( exp ) {
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var prefix = 'v',
17
17
silent : false ,
18
18
enterClass : 'v-enter' ,
19
19
leaveClass : 'v-leave' ,
20
+ interpolate : true ,
20
21
attrs : { } ,
21
22
22
23
get prefix ( ) {
Original file line number Diff line number Diff line change 1
1
var config = require ( './config' ) ,
2
2
attrs = config . attrs ,
3
3
toString = ( { } ) . toString ,
4
- join = [ ] . join ,
5
4
win = window ,
6
5
console = win . console ,
7
6
timeout = win . setTimeout ,
@@ -167,21 +166,21 @@ var utils = module.exports = {
167
166
/**
168
167
* log for debugging
169
168
*/
170
- log : function ( ) {
169
+ log : function ( msg ) {
171
170
if ( config . debug && console ) {
172
- console . log ( join . call ( arguments , ' ' ) )
171
+ console . log ( msg )
173
172
}
174
173
} ,
175
174
176
175
/**
177
176
* warnings, traces by default
178
177
* can be suppressed by `silent` option.
179
178
*/
180
- warn : function ( ) {
179
+ warn : function ( msg ) {
181
180
if ( ! config . silent && console ) {
182
- console . warn ( join . call ( arguments , ' ' ) )
183
- if ( config . debug ) {
184
- console . trace ( )
181
+ console . warn ( msg )
182
+ if ( config . debug && console . trace ) {
183
+ console . trace ( msg )
185
184
}
186
185
}
187
186
} ,
You can’t perform that action at this time.
0 commit comments