我写了一个,但是不知道哪里不对啊?求指点,迷津- <div id="flexgrid"></div>
复制代码
这是ts:
- 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:Event) {
- var ht = that.cvPaging2.hitTest(e),
- r = ht.row;
- if (r != hoverRow) {
- if (hoverRow >= -1) {
- that.cvPaging2.rows[5].cssClass = 'redRow';
- console.info(123);
- }
- }
- })
复制代码
但是并没有出现鼠标进入后的改变颜色啊
css代码:- .redRow:not(.wj-state-selected) {
- background-color: red !important;
- color: black !important;
- }
复制代码 |