Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
blockly > Trình đơn
Một lớp trình đơn cơ bản.
Chữ ký:
export declare class Menu
Hàm khởi tạo
Hàm dựng |
Đối tượng sửa đổi |
Mô tả |
(constructor)() |
|
Tạo một thực thể Trình đơn mới. |
Thuộc tính
Thuộc tính |
Đối tượng sửa đổi |
Loại |
Mô tả |
openingCoords |
|
Toạ độ | null |
Toạ độ của sự kiện pointerdown đã khiến trình đơn này mở ra. Dùng để ngăn sự kiện pointerup do một lượt nhấp đơn giản kích hoạt ngay một mục trong trình đơn. |
Phương thức
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["The `Menu` class in Blockly provides a basic structure for creating menus within the Blockly editor."],["It includes properties like `openingCoords` to track the mouse event that triggered the menu opening and methods like `dispose` and `render` for managing the menu's lifecycle and appearance."],["The constructor initializes a new `Menu` instance, while properties and methods offer control over its behavior and interactions."]]],["The `Menu` class provides a basic menu structure. Key actions include constructing a new `Menu` instance, which is done via the constructor. The class has a `openingCoords` property to track the coordinates of the initiating mouse event. It includes methods to `dispose` of the menu and `render` it, which involves creating the necessary DOM elements.\n"]]