computed: {
fullAddress: {
get: function(){
return this.simpleAddress+"/"+this.detailedAddress;
},
set: function(newValue){
var addresses=newValue.split("/");
this.simpleAddress=addresses[0];
this.detailedAddress=addresses[1];
}
}
}
其中fullAddress为一个计算属性,当其发生变化时,会更新simpleAddress和detailedAddress这2个属性值