Mini-program modal component details, mini-program modal
The modal pop-up box usually prompts some information, such as exiting the application, clearing the cache, and prompting you to modify the materials for submission.
Common attributes:
Wxml
<! -- Listen for button click events --> <button bindtap = "listenerButton" type = "primary"> modal </button> <! -- Pop-up box --> <modal title = "exit application" hidden = "{hiddenModal}" confirm-text = "and then look at" cancel-text = "exit" bindconfirm =" listenerConfirm "bindcancel =" listenerCancel "> are you sure you want to exit the Application? </modal>
Js
Page ({data: {// text: "this is a Page" hiddenModal: true}, listenerButton: function () {this. setData ({hiddenModal :! This. data. hiddenModal})}, listenerConfirm: function () {this. setData ({hiddenModal: true})}, listenerCancel: function () {this. setData ({hiddenModal: 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