MainTab.js 745 B

123456789101112131415161718192021222324252627
  1. Ext.define('Yvan.MainTab', {
  2. extend: 'Ext.tab.Panel',
  3. xtype: 'maintab',
  4. constructor(config) {
  5. const self = this
  6. const newConfig = _.defaultsDeep({}, config, {
  7. listeners: {
  8. tabchange(tabPanel, newCard, oldCard, eOpts) {
  9. console.log('tabChange')
  10. $(window).trigger('tabChange', {
  11. tabPanel, newCard, oldCard, eOpts
  12. });
  13. if (typeof config.tabchange === 'function') {
  14. config.tabchange.apply(this, arguments)
  15. }
  16. }
  17. }
  18. })
  19. this.superclass.constructor.call(self, newConfig)
  20. },
  21. addScope() {
  22. }
  23. });