标题用户多次点击调用接口,用防抖来解决。
<span class="ma-button-run" :class="{ disabled: isDisableTest }" title="运行(Ctrl+Q)" @click="doTest">
<a-icon type="caret-right" class="ma-icon ma-icon-run" />
</span>```
**方法**
doTest(){
if(!this.isSaveBut) return this.$message.warning('您没有测试此数据源的权限,请联系管理员添加权限!')
if(this.timeout){
clearTimeout(this.timeout)
}
this.timeout = setTimeout(() => {
bus.$emit('doTest')
}, 500);
},