研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >blockRendering >ConstantProvider >setComponentConstants_
blockRendering.ConstantProvider.setComponentConstants_() 方法
通过主题的组件样式设置常量。
Signature:
protected setComponentConstants_(theme: Theme): void;
参数
返回:
void
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["The `setComponentConstants_` method is used to initialize constants for rendering block components based on the provided theme."],["It takes a `Theme` object as input, which contains style information for the workspace."],["This method is protected, meaning it's primarily intended for internal use within the `ConstantProvider` class."],["The method updates the `ConstantProvider`'s internal constants, ensuring rendered blocks reflect the current theme's style."]]],[]]