32. WeChat applet (component - form: button)

WeChat Mini Program (Component – ​​Form: Button)

(1) button button component

button button attribute button
insert image description here
insert image description here
size size attribute value
insert image description here
View the source code, analyze the default style of button and the small size button
insert image description here
insert image description here
, so it can be analyzed that the border of the button button is set by the pseudo-element button:after.
Therefore, if you want to remove the default border of the applet button, setting border:none for the button is invalid, and you can only remove the default border through pseudo-elements.

View the source code, small size button button style attribute
insert image description here
insert image description here
button type style type
insert image description here
insert image description here
whether the button plain is hollowed out whether
insert image description here
insert image description here
the button is disabled whether the button insert image description here
insert image description here
displays the loading icon
insert image description here
analyze the button to display the loading icon source code
insert image description here
::before implements the loading style, ::after implements the basic style of the button (solve 1px adaptation Question) insert image description here
Button WeChat openability
insert image description here
The WeChat applet has opened many ports to realize various functions, such as customer service conversation, forwarding, obtaining user information and mobile phone number, authorization page, feedback, etc.

open-type — Commonly used attribute values ​​for WeChat’s open capabilities. For space issues, see the insert image description here
button button hover class attribute in the next section for insert image description here
details. Comparison:
①view view component hover-start-time defaults to 50, hover-stay-time defaults to 400
②navigator navigation component hover-start- time defaults to 50, hover-stay-time defaults to 600

form-type triggers form submit/reset action insert image description here
form-type attribute valueinsert image description here

If you have any questions or questions, please leave a message to contact the editor! ! ! !

Thanks for visiting! ! !

Guess you like

Origin blog.csdn.net/weixin_45582846/article/details/107658583