แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > FieldDropdown > onItemSelected_
เมธอด FieldDropdown.onItemSelected_()
จัดการการเลือกรายการในเมนูแบบเลื่อนลง
ลายเซ็น:
protected onItemSelected_(menu: Menu, menuItem: MenuItem): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
เมนู |
เมนู |
คลิกคอมโพเนนต์เมนูแล้ว |
menuItem |
MenuItem |
MenuItem ที่เลือกภายในเมนู |
การคืนสินค้า:
เป็นโมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-10 UTC
[null,null,["อัปเดตล่าสุด 2024-09-10 UTC"],[[["The `onItemSelected_` method is called when a user selects an item from a FieldDropdown's menu."],["It receives the `Menu` and selected `MenuItem` as input, allowing developers to react to the user's choice."],["This method is intended for internal use and doesn't return any value."]]],["The `onItemSelected_` method within the `FieldDropdown` class handles dropdown menu item selection. It receives two parameters: `menu`, representing the clicked `Menu` component, and `menuItem`, representing the selected `MenuItem` within that menu. This method processes the specific `MenuItem` choice and performs actions based on the selection within a `FieldDropdown`, it does not return a value.\n"]]