จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
blockly > การทำให้เป็นอนุกรม > บล็อก > BlockSerializer บันทึก
Serialization.blocks.BlockSerializer.save()
ทำให้บล็อกของพื้นที่ทำงานที่ระบุเป็นอนุกรม
ลายเซ็น:
save(workspace: Workspace): {
languageVersion: number;
blocks: State[];
} | null;
พารามิเตอร์
| พารามิเตอร์ |
ประเภท |
คำอธิบาย |
| พื้นที่ทำงาน |
พื้นที่ทำงาน |
พื้นที่ทำงานที่จะช่วยคุณบล็อก |
การคืนสินค้า:
{ languageVersion: number; block: State[];
} | ค่าว่าง
สถานะการบล็อกของพื้นที่ทำงาน หรือค่าว่างหากไม่มีการบล็อก
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],["The `save` method, part of `BlockSerializer`, serializes blocks within a specified `Workspace`. It takes a `Workspace` as input and returns either an object containing the `languageVersion` and an array of `State` objects representing the blocks, or `null` if no blocks are present. This method essentially captures the current state of blocks in a workspace for storage or transfer.\n"]]