blockly > dialog > setConfirm

dialog.setConfirm() 函数

设置在调用 Blockly.dialog.confirm() 时要运行的函数。

Signature:

export declare function setConfirm(confirmFunction?: (message: string, callback: (result: boolean) => void) => void): void;

参数

参数 类型 说明
confirmFunction (message: string, callback: (result: boolean) => void) => void (可选)要运行的函数,或为 undefined 以恢复默认实现。

返回

void