סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > קלט > קלט
מחלקה לקלט עם שדות אופציונליים.
Signature:
export declare class Input
יצרנים
מאפיינים
שיטות
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת 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. |"]]