'我有一个基类,其中声明了两个侦听器:
Ext.define('App.controls.CoWindow', {
extend: 'Ext.window.Window',
listeners: {
    show: {
        fn: function(win, opt){
            alert('opened from base class');
        },
        scope: this
    },
    close: {
        fn: function() {
            alert('closed from base class');
        }
    }
}
})
如果我声明一个扩展它的新类并配置侦听器,则不会调用祖先事件:
var procura = Ext.create('App.controls.CoWindowEx', {
            listeners: {
                close: {
                    fn:function() {
                        alert('closed from extending class');
                    }
                }
            }
        });
当我需要这两条消息时,我只会“从扩展类中关闭”。