使用computed 转换
computed: {
key() {
return this.query.key
}
},
然后监听computed 对应的变量即可:
watch: {
key: {
handler(newValue, oldValue) {
if (newValue !== oldValue) {
this.go2Query()
}
}
}
}
使用computed 转换
computed: {
key() {
return this.query.key
}
},
然后监听computed 对应的变量即可:
watch: {
key: {
handler(newValue, oldValue) {
if (newValue !== oldValue) {
this.go2Query()
}
}
}
}