你可以改变样本: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'
}, {
flex : 1,
sortable : false,
text : 'haha',
dataIndex : 'pars'
}]
}]
});
Run Code Online (Sandbox Code Playgroud)
小智 2
1-尝试用父母的论点来调用,如下所示:
.
.
.
,initComponent : function() {
this.callParent(arguments);
},
.
.
.
Run Code Online (Sandbox Code Playgroud)
或者调用超类:
.
.
,initComponent : function() {
this.callSuper(arguments);
},
.
.
.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7868 次 |
| 最近记录: |