blockly > 变量 > allUsedVarModels
Variables.allUsedVarModels() 函数
查找工作区中正在使用的所有用户创建的变量。供发电机使用。
如需获取工作区中所有变量的列表(包括未使用的变量),请调用 getAllVariables。
Signature:
export declare function allUsedVarModels(ws: Workspace): IVariableModel<IVariableState>[];
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| ws | Workspace | 用于搜索变量的工作区。 |
返回:
IVariableModel<IVariableState>[]
变量模型数组。