Loading
显示加载页面的API
接口说明:
static show(params)
显示全屏游游动画 Loading 界面
参数
params JSON
params参数格式 {'tips':'tips message', 'needOffset':true, 'extOffset':30}
tips: loading 界面中间的tips,可选参数
needOffset: 可选参数,传 true 则会往下偏移导航栏的高度,不传则为默认值false,给隐藏了 native 导航栏的页面用
extOffset: 可选参数,额外的偏移高度,needOffset只往下偏移导航栏高度,此值可以再额外偏移一定高度
static hide()
隐藏全屏游游动画 Loading 界面
示例
Loading.show({'tips':'tips message'});
Loading.hide();
截图
static showMaskLoading()
显示背景半透明中间小youyou的全屏Loading界面
参数
params JSON
params参数格式 {'text':'提交中', 'cancelable':true}
text: loading 界面中间的text,可选参数
cancelable: 可选参数,传 true 中间游游可以点击取消,false 中间游游没有取消按钮,默认为true
cancelCallback Function
点击取消按钮时的回调,cancelable为true时有效
static hideMaskLoading()
隐藏背景半透明中间小youyou的全屏Loading界面
示例
Loading.showMaskLoading({'text':'提交中', 'cancelable':true},()=
>
{
alert('cancel');
});