煎茶触摸 2:
这是我的商店定义
var incidentsJson = loadJson();
Ext.define("App.store.EventsFeed", {
extend: "Ext.data.Store",
requires: ['Ext.data.proxy.JsonP'],
config: {
listeners: {
beforeload: function() {
console.log('before store load');
return true;
},
load: function(store, records) {
console.log(' store loaded', records);
}
},
model: 'App.model.Incident',
autoLoad: true,
data: incidentsJson,
reader: {
type: 'json',
}
}
});
数据已加载,但load()
没有beforeload()
被调用,这是怎么回事?