我试图显示一个BusyIndicator,但是当我运行该项目时却没有显示。这是我的main.js:
var busyInd;
function wlCommonInit() {
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});
mostraDialogo(true);
}
function mostraDialogo(on) {
if (on)
busyInd.show();
else
busyInd.hide();
}
怎么了?
您content
的HTML中可能没有ID。
我已经更换了
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});
和
busyInd = new WL.BusyIndicator(null, {text : 'Loading...'});
而且我可以看到繁忙指示器。
我还在content
HTML中添加了一个ID为ID的DIV ,它也可以正常工作。
在实际设备或模拟器/仿真器中进行测试时,不需要ID参数,因为它使用本机繁忙指示器。在MBS中进行测试时,因为使用了Web繁忙指示器,所以ID参数是必需的,并且必须将其锚定到现有元素(或为null)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句