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             });

 

相关文章:

  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-09-24
  • 2022-02-25
  • 2021-10-02
  • 2021-06-21
猜你喜欢
  • 2021-06-30
  • 2021-08-09
  • 2022-01-12
  • 2021-12-24
  • 2021-08-21
  • 2021-06-15
  • 2021-09-11
相关资源
相似解决方案