監聽事件
一個組件可以監聽多個事件,比如
Ext.create('Ext.Button', {
renderTo: Ext.getBody(),
text: 'My Button',
listeners: {
mouseover: function () {//鼠標放上去調用hide()方法
this.hide(); //hide也是默認方法,可以重寫
},
hide: function () {
// 1 秒後顯示