封鎖 >封鎖 >資料
Block.data 屬性
選用的文字資料,可在區塊和 XML 之間來回往返。沒有影響 第三方可能會使用中繼資訊做為中繼資訊。
Signature:
data: string | null;
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間: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"]]