帆软报表添加鼠标悬置行 提示

鼠标悬至某行 下划线提示

效果:

代码:

模板 -->  web属性  --> 对应 填报、数据分析等类型 --> 下方添加事件 --> 加载结束  

$('.reportPane')[0].style.background = "#182f59";

var trs = $('.x-table tr');
trs.each(function(i, e) {
    if (i % 2 == 0) {
        e.style.backgroundColor = "#182f5b";
    } else {
        e.style.backgroundColor = "#0b1f44";
    }
    if(i == 1){
          e.style.backgroundImage = 'linear-gradient(120deg, #d4368d, #ff666c)';
     }
});


//var currentcell = contentPane.curLGP.currentTDCell;
//if (currentcell != undefined) {
//var currow = $('.x-table tr')[contentPane.curLGP.getTDRow(currentcell)];
//currow.style.backgroundColor = "#2f4b69";
//currow.style.borderStyle = "solid";
//currow.style.borderWidth = "3px";
//currow.style.borderColor = "#3881c6 #1e4570 #1e4570 #3881c6";
//};

//鼠标经过
$(".x-table tr").mousemove(function() {
    $(this).css("background-color", "#2f4b69");
    $(this).css("border-style", "solid");
    $(this).css("border-width", "3px");
    $(this).css("border-color", "#3881c6 #1e4570 #1e4570 #3881c6");
});
//鼠标点击
$(".x-table tr").mousedown(function() {
    $(this).css("background-color", "#2f4b69");
    $(this).css("border-style", "solid");
    $(this).css("border-width", "3px");
    $(this).css("border-color", "#3881c6 #1e4570 #1e4570 #3881c6");
});
//鼠标离开
$(".x-table tr").mouseout(function() {
    var i = $(this).context.rowIndex;
    $(this).css("border", "none");
    if (i % 2 == 0) {
        $(this).css("background-color", "#182f5b");
    } else {
        $(this).css("background-color", "#0b1f44");
    }
});

猜你喜欢

转载自blog.csdn.net/hzp666/article/details/115318499