非常感谢您的解答,我发现您推荐的这个wijmo的鼠标事件并不符合我的需求,我想要的是表格每一个行移入和移出时发生变化,发现当鼠标没有移出表格时,很难再一次触发鼠标移入和移出事件。请问是我写的有问题还是这个表格不具备这个功能呢?- that.cvPaging2 = new wjcGrid.FlexGrid('#flexgrid', {
- autoGenerateColumns: false,
- columns: [
- { header: '编号', binding: 'id' ,width:60},
- { header: '编码', binding: 'code' },
- { header: '岗位', binding: 'name', },
- { header: '描述', binding: 'description', width: '*' },
- { header: ' ', binding: ' ', width: 30 },
- ],
- itemsSource: this.dataSvc.getData(),
- });
- var hoverRow = -1;
- that.cvPaging2.hostElement.addEventListener('mouseenter', function (e: MouseEventInit) {
- var ht = that.cvPaging2.hitTest(e),
- r = ht.row;
- console.log(r);
- if (r != hoverRow) {
- that.cvPaging2.rows[r].cssClass = 'test';
- console.info(that.cvPaging2.rows[r], 123);
- hoverRow= r ;
- }
- })
复制代码 |