title: Taro.hideLoading(option)

sidebar_label: hideLoading

Hides the loading prompt box

Reference

Type

  1. (option?: Option) => void

Parameters

Option

Property Type Required Description
complete (res: CallbackResult) => void No The callback function used when the API call completed (always executed whether the call succeeds or fails)
fail (res: CallbackResult) => void No The callback function for a failed API call
success (res: CallbackResult) => void No The callback function for a successful API call

Sample Code

  1. Taro.showLoading({
  2. title: 'loading',
  3. })
  4. setTimeout(function (){
  5. Taro.hideLoading()
  6. },2000)

API Support

API WeChat Mini-Program H5 React Native
Taro.hideLoading ✔️ ✔️ ✔️