qq_24534807
qq_24534807
2016-10-17 03:25
采纳率: 34.5%
浏览 2.1k
已采纳

ext 鼠标悬浮事件 mouseover

求大神帮忙看看下面代码,应该怎么修改
mouseover : function(e) {
var index = grid
.getView()
.findRowIndex(e.getTarget());
return grid.getView().getRow(index).style.backgroundColor = 'row-bg-critical';
}
(这是写在grid的listeners的,后面是自己写的样式,求大神帮忙,刚接触ext,菜鸟一枚)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • showbo
    已采纳

    gridpanel么有mouseover事件吧。。数据行是itemmouseenter:http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.grid.Panel-event-itemmouseenter

     itemmouseenter( this, record, item, index, e, eOpts )
    Fires when the mouse enters an item.
    
    Available since: 4.0.0
    
    Parameters
    this : Ext.view.View
    record : Ext.data.Model
    The record that belongs to the item
    item : HTMLElement
    The item's element
    index : Number
    The item's index
    e : Ext.EventObject
    The raw event object
    eOpts : Object
    The options object passed to Ext.util.Observable.addListener.
    
    点赞 评论

相关推荐