javascript - EXT4.1 GridPanel 上的鼠标悬停

标签 javascript extjs mouseover gridpanel

我正在尝试将鼠标悬停在网格中的所有项目上。我该怎么办呢。 我对这个东西很陌生。 如果有人可以通过一个例子来解释那就太好了:)

最佳答案

您可以使用网格面板的 listeners 配置将事件监听器附加到网格面板的 itemmouseenter 事件上,如下所示:

Ext.create('Ext.grid.Panel', {
    //... other grid configs
    listeners: {
        itemmouseenter: function(gridview, record) {
            console.log('Mouse over on record:');
            console.log(record);
        }
    }
});

您应该熟悉在 ExtJS API 中查找内容,以找出哪些 ExtJS 类具有哪些您可以使用的配置、方法和事件。例如,可以找到 itemmouseenter 事件 here在 API 中。

关于javascript - EXT4.1 GridPanel 上的鼠标悬停,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11803277/

相关文章:

html - 如何使图像仅在我将鼠标悬停在其上时出现

javascript - Ext JS 无法获取要上传的文件

javascript - jQuery - 在 DOM 更改后悬停

javascript - 为什么我无法将这个 json 转换为字符串?

javascript - 遍历数组以将图像添加到 DOM

javascript - 分机号 : tpl config is ignoring html in Panel

javascript - 如何以编程方式更改 gridpanel 单元格的 css

javascript - 我们如何使用 `mouseover` 和 `mouseout` 事件?

javascript - 数字到等级字母

javascript - 没有 ng-repeat 的 Angular 过滤器列表