Multiline input box. This component is Native component, please note the limitations.
Example
Code
Bug & Tip
tip: textarea of blur The event will be later than the tap Event, if needed in the button Click event acquisition textarea, can be used form of bindsubmit。tip: Modifying user input over multiple lines of text is not recommended, so textarea of bindinput Handler does not reflect the return value to the textarea Up.tip: If the keyboard height changes, the keyboardheightchange event may be triggered multiple times. Developers should ignore the same height value
Props
| Name | Type | Description | Default |
|---|---|---|---|
value | string | Enter the contents of the box | |
placeholder | string | Placeholder when input box is empty | |
disabled | boolean | Is it disabled? | false |
maxlength | number | Maximum input length, set to -1 Does not limit the maximum length | 140 |
auto-focus | boolean | Autofocus, pull up the keyboard. | false |
focus | boolean | Getting focus | false |
placeholder-class | string | Custom class name for placeholder jssdk > 4.33.0 | |
force | boolean | whether to force update the value of the textarea, default is false | false |
selection-start | number | -1 | |
selection-end | number | -1 | |
cursor | number | -1 | |
cursor-spacing | number | 0 | |
auto-height | boolean | whether to update the height of the textarea automaticly text overflow, default is false | false |
Events
| Name | Description |
|---|---|
bindinput | When keyboard input, triggers input Event, event.detail = {value, cursor, keyCode}, keyCode Is a key value and currently the tool does not support returning keyCode parameters. bindinput The return value of the handler is not reflected in the textarea on |
bindinputcapture | Trigger when textarea input event capture phase, see more about DOM3-EVENTS |
bindfocus | bindfocus Triggered when input box is focused,Argumentsdetail: value: string, height: number — height For keyboard height |
bindfocuscapture | Trigger when textarea focus event capture phase, see more about DOM3-EVENTS |
bindblur | Triggered when the input box loses focus, event. detail = {value, cursor} |
bindblurcapture | Trigger when textarea focus event capture phase, see more about DOM3-EVENTS |
bindlinechange | Called when the number of lines in the input box changes,Argumentsevent: detail: Object — detail = {height: 0, heightRpx: 0, lineCount: 0} |
Was this page helpful?
Last modified on