const { ccclass, requireComponent, menu, property } = cc._decorator; @ccclass @menu("Plug-in/Button/BlockDoubleClickButton") @requireComponent(cc.Button) export default class BlockDoubleClickButton extends cc.Component { //#region Lifecycle protected onEnable(): void { this.node.on("click", this.OnClickNode, this); } protected onDisable(): void { this.node.off("click", this.OnClickNode, this); } //#endregion //#region Event public OnClickNode(event: cc.Button, customEventData: any): void { this.getComponent(cc.Button).interactable = false; } //#endregion }