React 频繁点击

// isClick默认是true

const { isClick} = this.state;

if (isClick) {

this.setState({ isClick: false });

// 处理事件

setTimeout(function () { that.setState({ isClick: true }) }, 1000);

}

评论

暂无评论