The toast component of the applet is described in detail.
The toast message prompt box can be used to prompt some information, such as a clear cache to give users a friendly prompt! Or, if you do not want to perform any operations on some requests, toast can also do this because other operations are invalid when toast is displayed.
Main attributes:
Wxml
<! -- Click button to trigger toast --> <button type = "primary" bindtap = "listenerButton"> Click Show toast </button> <! -- Display the toast message box for 3 seconds and bind the event --> <toast hidden = "{hiddenToast}" duration = "3000" bindchange = "toastHidden"> OK! </Toast>
Js
Page ({data: {// text: "this is a Page" hiddenToast: true},/*** listen to the button click event */listenerButton: function () {this. setData ({hiddenToast :! This. data. hiddenToast})},/*** process the business when toast displays the time */toastHidden: function () {this. setData ({hiddenToast: true})}, 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