使用 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()
但这无济于事:(