How to use input components in WeChat Mini Programs
This article mainly shows you "how to use input components in WeChat Mini Programs", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "WeChat Mini Programs how to use input components" this article.
The frequency of input input box is also relatively high. If the style is wrapped on the outside, it will be defined by view. There are not many input attributes, so you need to test it yourself slowly. Try it.
Main attributes:
Wxml
Log in
Js
Page ({/ * initialization data * / data: {phone:', password:',}, / * monitor mobile phone number input * / listenerPhoneInput: function (e) {this.data.phone = e.detail.value;}, / * * listening password input * / listenerPasswordInput: function (e) {this.data.password = e.detail.value }, / * listen for login button * / listenerLogin: function () {/ / print revenue account and password console.log ('mobile number:', this.data.phone); console.log ('password is:', this.data.password) }, onLoad:function (options) {/ / parameters brought by page initialization options for page jump}, onReady:function () {/ / page rendering completed}, onShow:function () {/ / page display}, onHide:function () {/ / page hiding}, onUnload:function () {/ / page closed}})
Wxss
Input {padding-left: 10px; height: 44px;} .inputView {border: 2px solid red; border-radius: 40px; margin-left: 15px; margin-right: 15px; margin-top: 15pxX} these are all the contents of the article "how to use input components in WeChat Mini Programs". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!