watch: {
firstName: function() {
this.count++
},
lasName: function() {
this.count++
},
fullName:function(){
this.count++
}
}
firstName: function() {
this.count++
},
lasName: function() {
this.count++
},
fullName:function(){
this.count++
}
}
2018-10-24
1.想要改变Hello为World,在Vue中不用操作dom,直接改变数据即可。
2.this.content:指Vue实例下data下面的变量
2.this.content:指Vue实例下data下面的变量
2018-10-24
也可以直接这样:
computed : {
fullName : function(){
return this.firstName + this.lastName
},
count : function(){
return this.firstName.length + this.lastName.length
}
},
computed : {
fullName : function(){
return this.firstName + this.lastName
},
count : function(){
return this.firstName.length + this.lastName.length
}
},
2018-10-17