watch:{} 与 this.$watch() 一样
this.$watch() 的使用(这里可以放在Vue生命周期钩子里):this.$wath('query', (newQuery) => {this.$emit('query', newQuery)})watch:{}的使用(一个方法):watch:{query(newQuery){this.$emit('query', ...
·
this.$watch() 的使用(这里可以放在Vue生命周期钩子里):
this.$watch('query', (newQuery) => {
this.$emit('query', newQuery)
})
watch:{}的使用(一个方法):
watch:{
query(newQuery){
this.$emit('query', newQuery)
}
}
更多推荐
已为社区贡献5条内容
所有评论(0)