Mini Program (14) button component details, mini program button
The button is one of the most common components.
Main attributes:
Wxml
<! -- Button default style, click event --> <button type = "defaule" bindtap = "clickButton"> Defalut </button> <! -- Original color, not clickable status, loading status --> <button type = "primary" disabled = "true" loading = "true"> Primary </button> <button type = "warn"> warn </button>
Js
Page ({data: {// text: "This is a Page"},/*** button click event listener */clickButton: function (e) {// print all information about the clicked object console. log (e) ;}, onLoad: function (options) {// parameters brought about by PAGE initialization options for page Jump}, onReady: function () {// page rendering complete}, onShow: function () {// page display}, onHide: function () {// page hiding}, onUnload: function () {// page closed }})
Related Articles:
Hello WeApp icon component
Window text Component switch component
Tabss component action-sheet
Application lifecycle button Component modal component
Page lifecycle checkbox component toast component
Modular Details form component details loading component
Data Binding input component navigator component
View component picker component audio component
Scroll-view component radio component video component
Swiper component slider component Image component