แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > ComponentManager > addCapability
เมธอด ComponentManager.addCapability()
เพิ่มความสามารถให้กับคอมโพเนนต์ที่ลงทะเบียนไว้ซึ่งมีอยู่แล้ว
ลายเซ็น:
addCapability<T>(id: string, capability: string | Capability<T>): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
id |
สตริง |
รหัสของคอมโพเนนต์ที่จะเพิ่มความสามารถ |
ความสามารถ |
สตริง | ความสามารถ<T> |
ความสามารถในการเพิ่ม |
การคืนสินค้า:
เป็นโมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-29 UTC
[null,null,["อัปเดตล่าสุด 2024-08-29 UTC"],[[["The `ComponentManager.addCapability()` method allows adding a new capability to an existing registered component."],["It requires the component's ID and the capability (as a string or `Capability` object) as input."],["This method doesn't return any value and modifies the component directly."]]],["The `addCapability` method of `ComponentManager` adds a capability to an existing component. It takes two parameters: `id`, a string representing the component's ID, and `capability`, which can be either a string or a `Capability\u003cT\u003e` object. This method modifies the component to include the specified capability. The method doesn't return any value.\n"]]