In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use WeChat Mini Programs button component button". In daily operation, I believe many people have doubts about how to use WeChat Mini Programs button component button. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to use WeChat Mini Programs button component button". Next, please follow the editor to study!
Button
Button.
The default value of the attribute name type indicates the size of the minimum version of the sizeStringdefault button, the size of the typeStringdefault button, whether the style type of the plainBooleanfalse button is hollowed out, whether the background color is transparent disabledBooleanfalse, whether the loadingBooleanfalse name is disabled, whether the loading icon form-typeString is used for the component, clicking on the submit/reset event open-typeString Wechat opening ability 1.1.0hover-classStringbutton-hover of the component will trigger respectively the style class to be pressed by the button. There is no click state effect when hover-class= "none". How long does the click state occur after hover-start-timeNumber20 is held down? the click state retention time is valid when the hover-stay-timeNumber70 finger is released in milliseconds. When the session-fromStringopen-type= "contact" is in millisecond, the developer will receive an event push with this parameter when the user enters the session from this button. This parameter can be used to distinguish the source from which the user enters the customer service session. 1.4.0
BindgetuserinfoHandler
Handler
Valid when open-type= "getUserInfo": when the user clicks this button, the obtained user information will be returned. The value obtained from the detail of the return parameter is the same as wx.getUserInfo.
1.3.0
Note: button-hover defaults to {background-color:rgba; opacity:0.7;}
Valid values for size:
Value description defaultmini
Valid values for type:
Value description primarydefaultwarn
Valid values for form-type:
Value indicates that submit submits the form reset resets the form
Valid values for open-type:
The value indicates that the minimum version of contact opens the customer service session 1.1.0share to trigger user forwarding. It is recommended to read the guide 1.2.0getUserInfo to obtain user information before use. You can get the user letter 1.3.0 from the bindgetuserinfo callback.
Sample code:
/ * * wxss * * / * * modify button default click style class * * / .button-hover {background-color: red;} / * * add custom button click style class * * / .other-button-hover {background-color: blue } default primary warn Click to set the above button disabled property Click to set the above button plain property Click to set the above button loading property to enter the customer service session var types = ['default',' primary', 'warn'] var pageObject = {data: {defaultSize:' default', primarySize: 'default', warnSize:' default', disabled: false, plain: false, loading: false} SetDisabled: function (e) {this.setData ({disabled:! this.data.disabled})}, setPlain: function (e) {this.setData ({plain:! this.data.plain})}, setLoading: function (e) {this.setData ({loading:! this.data.loading})} for (var I = 0 I < types.length; + + I) {(function (type) {pageObject [type] = function (e) {var key = type + 'Size' var changedData = {} changedData [key] = this.data [key] = =' default'? 'mini':' default' this.setData (changedData)}}) (types [I])} Page (pageObject) this ends the study of "how to use the button component of WeChat Mini Programs", hoping to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.