blockly > Workspace > getVariableUsesById

Workspace.getVariableUsesById() 方法

v12:使用 Blockly.Workspace.getVariableMap().getVariableUsesById

查找给定变量的所有用法(通过 ID 标识)。

Signature:

getVariableUsesById(id: string): Block[];

参数

参数 类型 说明
id 字符串 要查找的变量的 ID。

返回

屏蔽[]

块用法数组。