为组件添加事件的例子: initEvents : function() { 1,使用属性,仅限于拥有该属性的组件 tooltip : { 2,使用鼠标事件,同时也应该注册相应的鼠标out事件 onMouseOver : function() { 3.1 第一种方式 3.2 第二种方式
Ext.ux.TextField.superclass.initEvents.call(this);
this.el.on("mouseover", this.onMouseOver, this);
},
title : this.fieldLabel,
text : this.maxLengthText
},
Ext.QuickTips.register(Ext.apply({
target : this.el.dom.id
}, this.tooltip));
new Ext.ToolTip({
target : this.el.dom.id,
title : this.fieldLabel,
html : this.maxLengthText,
trackMouse : true
});
}
添加提示信息 tooltip
最新推荐文章于 2022-03-02 18:21:44 发布