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.
chặn > blockRendering > RenderInfo > addInput_
Thêm một phần tử đầu vào vào hàng đang hoạt động (nếu cần) và ghi lại loại dữ liệu đầu vào trên hàng.
Chữ ký:
protected addInput_(input: Input, activeRow: Row): void;
Tham số
Thông số |
Loại |
Mô tả |
input |
Input |
Giá trị đầu vào để ghi thông tin về. |
activeRow |
Hàng |
Hàng hiện đang được điền. |
Trường hợp trả lại hàng:
void
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.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eaddInput_\u003c/code\u003e method is used within the Blockly block rendering process to manage the visual representation of block inputs.\u003c/p\u003e\n"],["\u003cp\u003eIt specifically adds an input element to the current row being rendered and stores information about the input type.\u003c/p\u003e\n"],["\u003cp\u003eThis method is crucial for correctly positioning and displaying inputs within a block's visual structure during rendering.\u003c/p\u003e\n"]]],["The `addInput_()` method, part of `RenderInfo`, adds an input element to a row being actively built. It records the input's type on that row. This method accepts two parameters: the `Input` itself and the `Row` it's being added to. Its role is to populate a specified row with information regarding the provided input. The method does not return a value.\n"],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [RenderInfo](./blockly.blockrendering_namespace.renderinfo_class.md) \\\u003e [addInput_](./blockly.blockrendering_namespace.renderinfo_class.addinput__1_method.md)\n\nblockRendering.RenderInfo.addInput_() method\n--------------------------------------------\n\nAdd an input element to the active row, if needed, and record the type of the input on the row.\n\n**Signature:** \n\n protected addInput_(input: Input, activeRow: Row): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------|--------------------------------------------|\n| input | [Input](./blockly.input_class.md) | The input to record information about. |\n| activeRow | [Row](./blockly.blockrendering_namespace.row_class.md) | The row that is currently being populated. |\n\n**Returns:**\n\nvoid"]]