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 > IToolboxItem
Giao diện cho một mục trong hộp công cụ.
Chữ ký:
export interface IToolboxItem extends IFocusableNode
Mở rộng: IFocusableNode
Phương thức
Phương thức |
Mô tả |
dispose() |
Vứt bỏ mục hộp công cụ này. Không hoạt động theo mặc định. |
getClickTarget() |
Lấy phần tử HTML có thể nhấp vào. |
getDiv() |
Lấy div cho mục hộp công cụ. |
getId() |
Lấy giá trị nhận dạng duy nhất cho mục hộp công cụ này. |
getParent() |
Lấy phần tử mẹ nếu mục hộp công cụ được lồng. |
init() |
Khởi tạo mục hộp công cụ. Việc này bao gồm việc tạo DOM và cập nhật trạng thái của mọi mục dựa trên đối tượng thông tin. |
isCollapsible() |
Mục hộp công cụ có thể thu gọn hay không. |
isSelectable() |
Liệu có thể chọn mục hộp công cụ hay không. |
setVisible_(isVisible) |
Đặt xem danh mục có hiển thị hay không. Để một danh mục hiển thị, bạn cũng phải mở rộng danh mục mẹ của danh mụ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 `IToolboxItem` interface defines the structure and behavior of items within the Blockly toolbox."],["It provides methods for managing an item's lifecycle, including initialization, disposal, and interaction."],["Toolbox items can be clickable, have a visual representation (div), and may be nested within other items."],["Properties like visibility, selectability, and collapsibility are also managed through this interface."],["Each toolbox item has a unique identifier for easy reference and manipulation."]]],["The `IToolboxItem` interface defines the structure for items within a toolbox. Key methods include `dispose()` for cleanup, `getClickTarget()` and `getDiv()` to access the item's HTML, and `getId()` to retrieve its unique identifier. `getParent()` identifies nested items. `init()` initializes the item, `isCollapsible()` and `isSelectable()` determine item behavior. Finally, `setVisible_()` controls the visibility of the item. Each of the methods has a corresponding description.\n"]]