watch和computed配合使用
watch:{
startValue: {
handler:function(newValue, oldValue) {
console.log(newValue,oldValue)
}
},
endValue:{
handler:function(newValue, oldValue) {
console.log(newValue,oldValue)
}
}
},
computed: {
startValue:function(){
//要监听的数据
return this.temInput[1].btnArray[1].template.html[7].value;
},
endValue:function(){
//要监听的数据
return this.temInput[1].btnArray[1].template.html[9].value;
}
}