Home  >  Article  >  WeChat Applet  >  Form Component_Detailed explanation of mini program form multi-line input box table

Form Component_Detailed explanation of mini program form multi-line input box table

php是最好的语言
php是最好的语言Original
2018-08-02 09:38:092473browse

Multi-line input box.

Attribute name type default value illustrate
value String Contents of the input box
placeholder String Placeholder when the input box is empty
placeholder-style String Specify the style of placeholder
placeholder-class String textarea-placeholder Specify the style class of placeholder
disabled Boolean false Whether to disable
maxlength Number 140 Maximum input length, when set to -1, there is no limit to the maximum length
auto-focus Boolean false Auto focus, pull up the keyboard.
focus Boolean false Get focus
auto-height Boolean false Whether to automatically increase the height. When setting auto-height, style.height does not take effect
fixed Boolean false If the textarea is in a position:fixed area, the specified attribute fixed needs to be displayed as true
cursor-spacing Number 0 Specify the distance between the cursor and the keyboard, in px. Take the minimum value of the distance between the textarea and the bottom and the distance specified by cursor-spacing as the distance between the cursor and the keyboard
bindfocus EventHandle Triggered when the input box is focused, event.detail = {value: value}
bindblur EventHandle Triggered when the input box loses focus, event.detail = {value: value}
bindlinechange EventHandle Called when the number of lines in the input box changes, event.detail = {height: 0, heightRpx: 0, lineCount: 0}
bindinput EventHandle When keyboard input occurs, the input event is triggered, event.detail = {value: value}, The return value of the bindinput processing function will not be reflected on the textarea
bindconfirm EventHandle When the click is completed, the confirm event is triggered, event.detail = {value: value}

Sample code: