sencha touch 2.3.1 list emptyText不显示

如图所示,有时候没有取到任何的数据。

那么我们就需要显示没有获取到内容这一类提示,显示内容通常通过emptyText这个属性来配置。

但是在sencha touch 2.3.1之中有可能会出问题,所以我们需要手动来进行设置,处理代码如下。

1             store.loadPage(1, {
2                 callback: function (records, operation, success) {
3                     if (records.length == 0) {
4                         list.setEmptyText('没有获取到内容');
5                     }
6                 },
7                 scope: this
8             });
原文地址:https://www.cnblogs.com/mlzs/p/3527289.html