2

我有一个应用程序,其中有大约 1000 条记录要显示在 localstore 的 sencha 列表中。如果我尝试一次性填充所有数据,则刷新列表需要很长时间(大约 1 分钟)。

现在我想加载包含初始 20 条记录的列表,然后它应该在用户向下滚动时加载下一个 20。当用户滚动到列表末尾时如何捕获事件?

4

2 回答 2

4

这是Secncha Doc网站的摘录

Ext.create('Ext.dataview.List', {
    config: {
        plugins: [
            {
                xclass: 'Ext.plugin.PullRefresh',
                pullRefreshText: 'Pull to refresh...'
            },
            {
                xclass: 'Ext.plugin.ListPaging',
                autoPaging: true
            }
        ],

        itemTpl: '<div class="item">{title}</div>',
        store: 'Items'
    }
});

从我这里我添加而不是 xclass: '' 你也可以使用 xtype: 'listpaging'。它也有效...

干杯,奥列格

PS。如果仍然不清楚,请在此处粘贴您的代码片段...

于 2012-08-30T13:23:13.963 回答
0

要添加到 oleg sencha 不会分页,即您的分页逻辑必须在服务器端,插件只会将页面参数增加 1,这可以在商店的 ajaxProxy 中的 pageParam 配置中进行配置

于 2012-09-06T12:03:52.197 回答