bạn có thể thay đổi mẫu: app/simple/app/Viewport.js
này:ExtJS 4.1: Vậy lạ lỗi: lỗi chưa gặp: Không thể đọc thuộc 'mục' không xác định
bạn sẽ nhận được lỗi này trong Chrome console:
Uncaught TypeError: Cannot read property 'items' of undefined ext-all.js:18 Ext.cmd.derive.getDockedItems
Nhưng nếu bạn nhận xét điều này:
initComponent : function() {
this.callParent();
},
Mọi thứ đều ổn.
Ext.define('AM.view.Viewport', {
extend : 'Ext.container.Viewport',
layout: 'border',
items : [{
border : false,
region : 'north',
xtype : 'progressbar',
text : 'Ready',
height : 20
}, {
region : 'west',
xtype : 'userlist',
width:300
}, {
region : 'center',
xtype : 'treepanel',
initComponent : function() {
this.callParent();
},
columns : [{
xtype : 'treecolumn',
sortable : false,
width : 200,
text : 'lala',
dataIndex : 'text'
}, {
flex : 1,
sortable : false,
text : 'haha',
dataIndex : 'pars'
}]
}]
});