IBM Worklight 6.0 – 无法更改默认的WL.BusyIndicator文本
我测试了WL.BusyIndicator,如下面的代码:
busyIndicator = new WL.BusyIndicator('content', { text : 'saving' }); busyIndicator.show(); setTimeout(function() { busyIndicator.hide(); }, 3000);
信息中心表示BusyIndicator选项可以在Android环境中获得“文本” 。
我可以看到我的Android模拟器(v4.0.4 / v4.1.2 / v4.2.2)上显示的BusyIndicator,但文本默认为’正在加载’…
注意:在iOS中也会发生同样的情况。
我的Worklight Studio版本是:6.0.0.201307241843
请尝试以下代码:
function wlCommonInit(){ WL.ClientMessages.loading = "Hello world :)"; var busyInd = new WL.BusyIndicator('content'); busyInd.show(); setTimeout(function () { busyInd.hide(); }, 3000); }
请注意,我正在使用WL.ClientMessages.loading
来设置消息,而不是将带有text
键的对象传递给构造函数。
我不得不查看Busy Indicator代码以找出错误,我将打开一个缺陷。 谢谢你报道这个。