我正尝试在Vue中使用类似这样的东西:
props(){
debouncing: {type: Number, default: 0}
},
methods: {
clicked: _.debounce(function() {
this.$emit('click');
}, this.debouncing),
}但是,当设置了以下内容时,这将不起作用:debouncing = 4000
发布于 2019-01-09 04:20:47
感谢@RoyJ的评论:
computed:{
clicked(){
return _.debounce(this.click, this.debouncing)
}
},
methods:{
click(){
this.$emit('click');
},
}https://stackoverflow.com/questions/54098993
复制相似问题