1 Ext.override(Ext.TabPanel, {
2 initEvents : function(){
3 Ext.TabPanel.superclass.initEvents.call(this);
4 this.on('add', this.onAdd, this);
5 this.on('remove', this.onRemove, this);
6
7 this.strip.on('mousedown', this.onStripMouseDown, this);
8 this.strip.on('contextmenu', this.onStripContextMenu, this);
9 this.strip.on('dblclick', this.onTitleDbClick, this);
10 if(this.enableTabScroll){
11 this.strip.on('mousewheel', this.onWheel, this);
12 }
13 },
14 onTitleDbClick:function(e,target,o){
15 var t = this.findTargets(e);
16 if (t.item.fireEvent('beforeclose', t.item) !== false && t.item.closable!==false) {
17 t.item.fireEvent('close', t.item);
18 this.remove(t.item);
19 }
20 }
21 });

 

相关文章:

  • 2022-02-10
  • 2021-08-27
  • 2021-04-18
  • 2022-12-23
  • 2021-09-11
  • 2022-02-10
猜你喜欢
  • 2021-11-05
  • 2021-10-08
  • 2022-01-19
  • 2022-12-23
  • 2022-02-10
  • 2022-02-28
相关资源
相似解决方案