showLoading 1.0.0+

显示灰色背景的 loading 提示框。该提示框不会主动隐藏。

提示

loading 的实现基于 toast,等同于iconloadingduration24小时的 toast。

多次弹出 toast/loading 时,后一个会立刻覆盖前一个。

输入

继承标准对象输入,扩展属性描述:

名称数据类型属性默认值描述
titlestringrequiredN/A内容,最多显示7个汉字长度的文本

输出

各callback参数均无额外属性

代码示例

  1. tt.showLoading({
  2. title: '请求中,请稍后...',
  3. success (res) {
  4. console.log(`${res}`);
  5. },
  6. fail (res) {
  7. console.log(`showLoading调用失败`);
  8. }
  9. });

已知问题

  • 尚未支持mask参数。

原文: https://developer.toutiao.com/docs/api/showLoading.html