แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > ContextMenuRegistry
ลายเซ็น:
export declare namespace ContextMenuRegistry
การแจงนับ
การแจงนับ |
คำอธิบาย |
ScopeType |
ตำแหน่งที่รายการเมนูนี้ควรแสดงผล ควรแสดงผลรายการในเมนูในหลายขอบเขตหรือไม่ เช่น ทั้งในบล็อกและพื้นที่ทำงาน ควรลงทะเบียนบล็อกและพื้นที่ทำงานสำหรับแต่ละขอบเขต |
อินเทอร์เฟซ
SDK โฆษณา B |
คำอธิบาย |
ContextMenuOption |
รายการเมนูตามที่ปรากฏไปยัง Contextmenu.js |
LegacyContextMenuOption |
ชุดย่อยของ ContextMenuOption ซึ่งตรงกับเอกสารแบบสาธารณะ ควรเลือก ContextMenuOption สำหรับโค้ดใหม่ |
RegistryItem |
รายการเมนูตามที่ป้อนในรีจิสทรี |
ขอบเขต |
พื้นที่ทำงาน/การบล็อกจริงที่กำลังแสดงเมนู ซึ่งจะส่งต่อไปยังฟังก์ชัน Callback และ displayText ที่ต้องอาศัยข้อมูลนี้ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-12 UTC
[null,null,["อัปเดตล่าสุด 2024-09-12 UTC"],[[["The `ContextMenuRegistry` namespace manages the registration and display of context menu items within Blockly workspaces."],["It defines enumerations like `ScopeType` to determine where menu items should appear (e.g., block, workspace)."],["Interfaces like `ContextMenuOption` and `RegistryItem` standardize the structure of menu items for both internal use and external registration."],["`LegacyContextMenuOption` provides compatibility with older code but using `ContextMenuOption` is recommended for new implementations."],["The `Scope` interface provides context-specific information about the workspace or block where the menu is displayed."]]],[]]