将组件初始化完成后执行的代码可以放置在initComponent模板方法中,代码如下:
Ext.define('PandaTestComponent',{
extend: 'Ext.panel.Panel',
//初始化组件后执行的代码
initComponent: function (){
console.log('initComponent called');
this.callParent(arguments);
}
});
Ext.create('PandaTestComponent',{
renderTo: Ext.getBody(),
title: 'PandaTest',
})
标签:初始化,initComponent,代码,Ext,组件,PandaTestComponent,ExtJS
From: https://www.cnblogs.com/cqpanda/p/16994606.html