嗨我試圖更改單元格文本到圖像當我itemmouseenter(鼠標懸停)網格行。ExtJS itemmouseenter(鼠標懸停)網格行並將單元格文本更改爲圖像
我有一個事件監聽器是這樣的:
itemmouseenter: function(me, record, item, index, e, eOpts) {
var store = this.getStore();
var rowIndex = index;
store.getAt(rowIndex).set('name', '<img src="http://sstatic.net/stackoverflow/img/icon-16.png" />');
}
事實上,它改變了文字到圖像,但它不能變回原來的文本。
我的目標就像css懸停效果。有任何建議可以做到這一點嗎?
感謝
太棒了!這種方式好多了 –