extjs bbar 中怎么让按钮凸显出来 要看着是按钮的样子 不要鼠标放上去才知道是按钮
这个要改下ext-all.js了,你先在ext-all.js中找到Ext.Button = Ext.extend(Ext.BoxComponent, {
然后找到里面的
onMouseOut : function(b) {
var a = b.within(this.el) && b.target != this.el.dom;
//this.el.removeClass("x-btn-over"); //把这个注释了或者直接删掉
this.fireEvent("mouseout", this, b);
if (this.isMenuTriggerOut(b, a)) {
this.fireEvent("menutriggerout", this, this.menu, b)
}
},
最后在这个方法里,把刚注释的那句话添里面
initButtonEl : function(b, c) {
this.el = b;
this.setIcon(this.icon);
this.setText(this.text);
this.setIconClass(this.iconCls);
if (Ext.isDefined(this.tabIndex)) {
c.dom.tabIndex = this.tabIndex
}
if (this.tooltip) {
this.setTooltip(this.tooltip, true)
}
if (this.handleMouseEvents) {
this.mon(b, {
scope : this,
mouseover : this.onMouseOver,
mousedown : this.onMouseDown
})
}
this.el.addClass("x-btn-over"); //这里,添加刚才注释那句话
if (this.menu) {
this.mon(this.menu, {
scope : this,
show : this.onMenuShow,
hide : this.onMenuHide
})
}
if (this.repeat) {
var a = new Ext.util.ClickRepeater(b, Ext.isObject(this.repeat)
? this.repeat
: {});
this.mon(a, "click", this.onRepeatClick, this)
} else {
this.mon(b, this.clickEvent, this.onClick, this)
}
},
改完保存就哦了