如何在ExtJS中更改LoadMask文本

时间:2012-08-31 09:00:22

标签: extjs extjs4 extjs-mvc

有没有办法全局更改ExtJS 4.1 MVC应用程序上的Ext.LoadMask.msg

4 个答案:

答案 0 :(得分:1)

它应该与

一起使用
// changing the msg text below will affect the LoadMask
Ext.define("Ext.locale.##.view.AbstractView", {
    override: "Ext.view.AbstractView",
    msg: "Loading data..."
});

大多数情况。在onReady()函数之后/内调用此函数。将##设置为您的语言环境

答案 1 :(得分:1)

Ext.define("Ext.locale.de.view.AbstractView", {
override: "Ext.view.AbstractView",
loadingText: "Uebertrage Daten..." });

这适合我。

答案 2 :(得分:0)

在onReady函数中添加如下内容:

if (Ext.LoadMask) {
    Ext.apply(Ext.LoadMask.prototype, {
        msg: 'Загрузка...'
    });
}

或者在你的语言环境中这样。**文件:

Ext.define("Ext.locale.**.LoadMask", {
    override: "Ext.LoadMask",
    msg: "Загрузка..."
});

答案 3 :(得分:-1)

var myMask = new Ext.LoadMask(myPanel, {msg:"Please wait..."});
myMask.show();

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.LoadMask