Detailed description of the small program loading component instance, the small program loading
Loading is usually used to request network data. The hidden attribute is used to set whether to display the data.
Main attributes:
Wxml
<! ----> <Button type = "primary" bindtap = "listenerButton"> display loading </button> <! -- Hidden by default --> <loading hidden = "{hiddenLoading}"> loading </loading>
Js
Page ({data: {// text: "this is a Page" hiddenLoading: true},/*** listen to the button click event */listenerButton: function () {this. setData ({hiddenLoading :! This. data. hiddenLoading})}, onLoad: function (options) {// parameters of page initialization options for page Jump}, onReady: function () {// page rendering completed }, onShow: function () {// page display}, onHide: function () {// page hide}, onUnload: function () {// page close }})
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