定时器5秒之后,按钮可以再次点击
<el-button type="primary" @click="getInfo" :disabled="!isTrue">查询</el-button>
<script>
export default{
data(){
return {
isTrue:true,
}
},
methods: {
getInfo() {
this.isTrue = false,
setTimeout(() => {
this.tableData = this.newData;
this.isTrue = true;
}, 5000);
}
}
}
</script>