美文网首页
watch 监听多个值的变化

watch 监听多个值的变化

作者: 取个帅气的名字真好 | 来源:发表于2018-06-05 11:47 被阅读57次

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