12345678910111213141516171819202122232425262728293031323334 |
- import _ from 'lodash'
- import $ from 'jquery'
- export default function () {
- Ext.define('Yvan.MainTab', {
- extend: 'Ext.tab.Panel',
- xtype: 'maintab',
- constructor(config) {
- const self = this
- const newConfig = _.defaultsDeep({}, config, {
- listeners: {
- tabchange(tabPanel, newCard, oldCard, eOpts) {
- console.log('tabChange')
- $(window).trigger('tabChange', {
- tabPanel, newCard, oldCard, eOpts
- });
- if (typeof config.tabchange === 'function') {
- config.tabchange.apply(this, arguments)
- }
- }
- }
- })
- this.superclass.constructor.call(self, newConfig)
- },
- addScope() {
- }
- });
- }
|