我试图显示一个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();
}怎么了?
发布于 2014-11-24 16:02:53
您可能在content中没有一个HTML。
我已经取代了
busyInd = new WL.BusyIndicator('content', {text : 'Loading...'});使用
busyInd = new WL.BusyIndicator(null, {text : 'Loading...'});我能看到繁忙的指示灯。
我还向content添加了一个带有HTML的DIV,它也能工作。
在实际设备或模拟器/模拟器中进行测试时,不需要ID参数,因为它使用本机繁忙指示符。在MBS中进行测试时,需要ID参数,因为使用了web繁忙指示符,并且必须将其锚定到现有元素(或null)。
https://stackoverflow.com/questions/27108412
复制相似问题