方法1:
Ext.onReady(function() {
var p = new Ext.ux.MyPanel({
renderTo : document.body
});
});
Ext.ux.MyPanel = Ext.extend(Ext.Panel, {
initComponent : function() {
Ext.apply(this, {
width : 200,
height : 200,
items : [{
xtype : 'label',
id : 'mylabel1',
html : 'Label 1',
listeners : {
render : function() {//渲染后添加click事件
Ext.fly(this.el).on('click',
function(e, t) {
/