你可以改变样本:app/simple/app/Viewport.js对此:
您将在Chrome控制台中收到此错误消息:
未捕获的TypeError:无法读取未定义的ext-all.js的属性'items':18 Ext.cmd.derive.getDockedItems
但如果你评论这个:
initComponent : function() {
this.callParent();
},
Run Code Online (Sandbox Code Playgroud)
一切都好.
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' …Run Code Online (Sandbox Code Playgroud) extjs ×1