扩展一个
var myTabPanel = Ext.extend(Ext.TabPanel,{ initEvents : function(){
Ext.TabPanel.superclass.initEvents.call(this);
this.on('add', this.onAdd, this);
this.on('remove', this.onRemove, this);
this.strip.on('mousedown', this.onStripMouseDown, this);
this.strip.on('mouseover',this.onStripMouseOver,this);
this.strip.on('contextmenu', this.onStripContextMenu, this);
if(this.enableTabScroll){
this.strip.on('mousewheel', this.onWheel, this);
}
}
,onStripMouseOver : function(e){
e.preventDefault();
var t = this.findTargets(e);
if(t.item && t.item != this.activeTab){
this.setActiveTab(t.item);
}
}})Ext.onReady(function(){ var tabs = new myTabPanel({//......})});
var myTabPanel = Ext.extend(Ext.TabPanel,{ initEvents : function(){
Ext.TabPanel.superclass.initEvents.call(this);
this.on('add', this.onAdd, this);
this.on('remove', this.onRemove, this);
this.strip.on('mousedown', this.onStripMouseDown, this);
this.strip.on('mouseover',this.onStripMouseOver,this);
this.strip.on('contextmenu', this.onStripContextMenu, this);
if(this.enableTabScroll){
this.strip.on('mousewheel', this.onWheel, this);
}
}
,onStripMouseOver : function(e){
e.preventDefault();
var t = this.findTargets(e);
if(t.item && t.item != this.activeTab){
this.setActiveTab(t.item);
}
}})Ext.onReady(function(){ var tabs = new myTabPanel({//......})});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货