# wx.showLoading(Object object)
Start from base library version 1.1.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Support, need to Mini Program base library version no less than 1.9.6
display loading Cue box. Active call wx.hideLoading To close the prompt
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
title | string | yes | Content of the prompt | |
mask | boolean | false | no | Whether to display transparent mask to prevent touch penetration |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# sample code
wx.showLoading({
title: 'Loading ',
})
setTimeout(function () {
wx.hideLoading()
}, 2000)
# Be careful
- wx.showLoading and wx.showToast Can only display one at a time
- wx.showLoading Should wx.hideLoading Paired use