例如:
data() { return { a: false, b: false, } }
解决
computed:{ combined(){ return this.a && this.b } } watch:{ combined(value){ if (value) //do something } }
例如:
data() { return { a: false, b: false, } }
computed:{ combined(){ return this.a && this.b } } watch:{ combined(value){ if (value) //do something } }