0

使用 PullToRefresh sencha touch 2 插件刷新列表时,我需要设置启动参数 (operation.setStart(1))。

我可以在 onJsonpstoreBeforeLoad 函数中做到这一点,因为这个函数解析operation参数对象

onJsonpstoreBeforeLoad: function(store, operation, eOpts) {
    /* some before load operations */
    var startIndex = operation.getStart();

    /* increase the value of the start-index by one */
    operation.setStart(startIndex+1);
}

但是在 PullToRefresh 插件的“刷新”功能中,它只解析plugin参数,但我需要获取operation才能使用 setStart()

....
refreshFn: function(plugin) {
    console.log(Ext.data.Operation);
}, ....

有谁知道如何获得当前的操作?我可以使用商店/代理,plugin.getParent()但这无济于事:(

4

1 回答 1

1

你可以打电话

plugin.up();

希望这有帮助!!

于 2012-10-29T09:55:33.883 回答