Button
Button.
Example
js
bxml
bxss
Bug & Tip
tip
: button-hover Default is{background-color: rgba(0, 0, 0, 0.1) opacity: 0.7}tip
: Currently set form-type of button Object in the current component form Effective. Thus, will button Is encapsulated in a custom component, and form In addition to the custom component, the button of form-type Failure.
#
PropsName | Type | Description | Default |
---|---|---|---|
size | string | Button size | |
type | string | Style type of on | "default" |
plain | boolean | Whether the on is hollow, the background color is transparent | false |
disabled | boolean | Is it disabled? | false |
loading | boolean | Does the name come with loading icon | false |
hover-class | string | Specifies the style class for which the on is pressed. when hover-class="none" There is no click state effect | "button-hover" |
hover-stop-propagation | boolean | Specifies whether to prevent this node's ancestor from clicking | false |
hover-start-time | number | How long does it take to click, in milliseconds? | 20 |
hover-stay-time | number | Click hold time after finger release, in milliseconds | 70 |
form-type | FormType | Used for form Component, click separately to trigger form Component submit/reset event | |
open-type | OpenType | Mini Program open ability |
#
EventsName | Description |
---|---|
bindtap | The tap event handler of the button |
bindtapcapture | Trigger when button tap event capture phase, see more about DOM3-EVENTS |
bindtouchstart | The start event When touch the button |
bindopensetting | Callback after opening the authorization settings page, open type = openSetting |
bindgetuserprofile | When the user clicks the on, the user information will be returned, open-type."getuserprofile" is valid |
bindgetphonenumber | Gets the user's phone number callback, valid when open-type = getPhoneNumber |
bindgetemailaddress | Gets the user's email address callback |