面板的数量取决于来自商店的数据数量,并且应该以上面显示的形式呈现,即两列
我的代码是
Ext.define('ConnectionsFeed.view.Communities',{
extend: 'Ext.container',
requires: 'ConnectionsFeed.store.Communities',
store: 'Communities',
alias: 'widget.communities',
layout: 'table',
initComponent: function(){
var x = this;
this.store.each(function(item){
x.add(new Ext.panel.Panel());
});
}
});
Ext.create('ConnectionsFeed.view.Communities',{
renderTo: Ext.getBody()
});
但收到以下错误
> Uncaught TypeError: Cannot read property 'isInstance' of undefined > ext-all.js:21 (anonymous function) ext-all.js:21 Ext.apply.doProcess > ext-all.js:21 (anonymous function) ext-all.js:21 Ext.apply.require > ext-all.js:21 (anonymous function) ext-all.js:21 Ext.apply.doProcess > ext-all.js:21 Ext.apply.doProcess ext-all.js:21 Ext.apply.process > ext-all.js:21 Ext.Class.c ext-all.js:21 Ext.ClassManager.create > ext-all.js:21 Ext.apply.define ext-all.js:21 (anonymous function)