extjs4 继承类使用initComponet 和constructor
IndexPage=Ext.define('IndexPage',{extend:'Ext.Viewport',center:Ext.create('Ext.TabPanel',{id:'MainTab',region:'center',autoScroll:true,items:{title:'标题',html:'首页'}}),//initComponent: function() {// var me = this;// Ext.applyIf(me,{// layout:'border',// items:[this.center]// });// me.callParent(arguments);// }constructor:function(){IndexPage.superclass.constructor.call(this,{layout:'border', items:[this.center]})}})