Ext.extend 메소드를 사용하여 확장 된 ExtJS 구성 요소 (Window, DataView 등)가 거의 없습니다. 확장 기능에 몇 가지 추가 속성을 추가하고 싶습니다. 이러한 구성 요소를 구성 요소에 어떻게 추가합니까?사용자 정의 ExtJs 구성 요소의 사용자 정의 특성
ExWindow = Ext.extend(Ext.Window,{
border:false,
initComponent: function() {
// Component Configuration...
var config = {
height: 500,
width: 500,
items: [{
xtype: 'simplepanel'
}]
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
ExWindow.superclass.initComponent.apply(this, arguments);
},
onRender:function() {
ExWindow.superclass.onRender.apply(this, arguments);
}
});
일부 코드를 포함하지 않는 한 onRender 재정의를 포함 할 필요가 없습니다. –