computed + watch
computed: {
address() {
const { price1, price2} = this
return { price1, price2}
}
},
watch: {
'address'(e){
//你要处理的内容
console.log(e.price1)
console.log(e.price2)
}
}
computed + watch
computed: {
address() {
const { price1, price2} = this
return { price1, price2}
}
},
watch: {
'address'(e){
//你要处理的内容
console.log(e.price1)
console.log(e.price2)
}
}
本文标题:watch 监听多个值的变化
本文链接:https://www.haomeiwen.com/subject/uospsftx.html
网友评论