In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "Mini Program form multi-line input box table how to achieve", the article explains the content is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in-depth, together to study and learn "Mini Program form multi-line input box table how to achieve" it!
Multiline input box.
Attribute name type default value description valueString
Enter the contents of the box placeholderString
Placeholder placeholder-styleString when the input box is empty
Specify the style of placeholder placeholder-classStringtextarea-placeholder specifies whether the style class disabledBooleanfalse of placeholder disables the maximum input length of maxlengthNumber140, sets it to-1 without limiting the maximum length auto-focusBooleanfalse autofocus, and pulls up the keyboard. FocusBooleanfalse gets whether the focus auto-heightBooleanfalse increases automatically. When setting auto-height, style.height does not take effect fixedBooleanfalse if the textarea is in an area of position:fixed, you need to display the specified attribute fixed specifies the distance between the cursor and the keyboard (in px) for truecursor-spacingNumber0. Take the minimum distance from the bottom of textarea and the distance specified by cursor-spacing as the distance between the cursor and the keyboard bindfocusEventHandle
Triggered when the input box is focused, event.detail = {value: value} bindblurEventHandle
Triggered when the input box loses focus, event.detail = {value: value} bindlinechangeEventHandle
Called when the number of rows in the input box changes, event.detail = {height: 0, heightRpx: 0, lineCount: 0} bindinputEventHandle
When typing on the keyboard, the input event is triggered, event.detail = {value: value}, and the return value of the bindinput handler is not reflected in the bindconfirmEventHandle on the textarea.
When you click finish, the confirm event is triggered, event.detail = {value: value}
Sample code:
Make the input box get focus submission / / textarea.jsPage ({data: {height: 20, focus: false}, bindButtonTap: function () {this.setData ({focus: true})}, bindTextAreaBlur: function (e) {console.log (e.detail.value)}, bindFormSubmit: function (e) {console.log (e.detail.value.textarea)}})
Bug & Tip
Bug: Wechat version 6.3.30 the position of the newly added textarea in autofocus was miscalculated when the list was rendered.
The blur event of tip:textarea is later than the tap event on the page. If you need to get the textarea in the click event of button, you can use form's bindsubmit.
Tip: it is not recommended to modify the user's input on multiline text, so the bindinput handler of textarea does not reflect the return value to textarea.
The tip:textarea component is a native component created by the client, and its level is the highest.
Tip: do not use textarea components in scroll-view.
Tip:css animation is not valid for textarea components.
Thank you for your reading, the above is the "Mini Program form multi-line input box table how to achieve" the content, after the study of this article, I believe you on the Mini Program form multi-line input box table how to achieve this problem have a deeper understanding, the specific use of the need for everyone to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.