연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
차단 > 입력 > 입력
선택적 필드가 있는 입력 클래스입니다.
서명:
export declare class Input
생성자
속성
메서드
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003einputs.Input\u003c/code\u003e class in Blockly manages inputs with optional fields for blocks, handling their properties and connections.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add, remove, and modify fields within the input, as well as control its alignment and visibility.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to customize block inputs by specifying field types, connections, and other attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe class also offers methods to manage connections to other blocks, including setting compatibility and shadow blocks.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [inputs](./blockly.inputs_namespace.md) \\\u003e [Input](./blockly.inputs_namespace.input_class.md)\n\ninputs.Input class\n------------------\n\nClass for an input with optional fields.\n\n**Signature:** \n\n export declare class Input \n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------------------|-----------|------------------------------------------------|\n| [(constructor)(name, sourceBlock)](./blockly.inputs_namespace.input_class._constructor__1_constructor.md) | | Constructs a new instance of the `Input` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-----------------------------------------------------------------------------|------------|-------------------------------------------------------------|------------------------------------------------------|\n| [align](./blockly.inputs_namespace.input_class.align_property.md) | | [Align](./blockly.inputs_namespace.align_enum.md) | Alignment of input's fields (left, right or centre). |\n| [connection](./blockly.inputs_namespace.input_class.connection_property.md) | | [Connection](./blockly.connection_class.md) \\| null | |\n| [fieldRow](./blockly.inputs_namespace.input_class.fieldrow_property.md) | | [Field](./blockly.field_class.md)\\[\\] | |\n| [name](./blockly.inputs_namespace.input_class.name_property.md) | | string | |\n| [type](./blockly.inputs_namespace.input_class.type_property.md) | `readonly` | [inputTypes](./blockly.inputs_namespace.inputtypes_enum.md) | |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|-----------------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [appendField(field, opt_name)](./blockly.inputs_namespace.input_class.appendfield_1_method.md) | | Add a field (or label from string), and all prefix and suffix fields, to the end of the input's field row. |\n| [dispose()](./blockly.inputs_namespace.input_class.dispose_1_method.md) | | Sever all links to this input. |\n| [getShadowDom()](./blockly.inputs_namespace.input_class.getshadowdom_1_method.md) | | Returns the XML representation of the connection's shadow block. |\n| [getSourceBlock()](./blockly.inputs_namespace.input_class.getsourceblock_1_method.md) | | Get the source block for this input. |\n| [init()](./blockly.inputs_namespace.input_class.init_1_method.md) | | Initialize the fields on this input. |\n| [insertFieldAt(index, field, opt_name)](./blockly.inputs_namespace.input_class.insertfieldat_1_method.md) | | Inserts a field (or label from string), and all prefix and suffix fields, at the location of the input's field row. |\n| [isVisible()](./blockly.inputs_namespace.input_class.isvisible_1_method.md) | | Gets whether this input is visible or not. |\n| [makeConnection(type)](./blockly.inputs_namespace.input_class.makeconnection_1_method.md) | `protected` | Constructs a connection based on the type of this input's source block. Properly handles constructing headless connections for headless blocks and rendered connections for rendered blocks. |\n| [removeField(name, opt_quiet)](./blockly.inputs_namespace.input_class.removefield_1_method.md) | | Remove a field from this input. |\n| [setAlign(align)](./blockly.inputs_namespace.input_class.setalign_1_method.md) | | Change the alignment of the connection's field(s). |\n| [setCheck(check)](./blockly.inputs_namespace.input_class.setcheck_1_method.md) | | Change a connection's compatibility. |\n| [setShadowDom(shadow)](./blockly.inputs_namespace.input_class.setshadowdom_1_method.md) | | Changes the connection's shadow block. |"]]