研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >屏蔽 >数据
Block.data 属性
在块和 XML 之间往返的可选文本数据。没有任何影响。可以由第三方用于元信息。
Signature:
data: string | null;
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-22。
[null,null,["最后更新时间 (UTC):2024-08-22。"],[[["`data` is an optional property on Blockly blocks used to store arbitrary text data."],["This data is preserved when blocks are converted to and from XML, allowing for persistence."],["`data` has no inherent functionality within Blockly itself and is primarily intended for use by external tools or extensions."],["It can be used to store metadata, custom configurations, or any other information relevant to a specific block."]]],["The `Block.data` property is an optional string or null value associated with a block. It allows for storing text data that persists during XML serialization and deserialization. This property has no internal effect within the system, and it serves as a metadata container for external use by third-party developers. It enables additional information to be associated with blocks without impacting the core functionality.\n"]]