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

冷不防 2022-11-14 14:50 546阅读 0赞

鼠标悬至某行 下划线提示

效果:

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2h6cDY2Ng_size_16_color_FFFFFF_t_70

代码:

模板 —> 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”);
}
});

发表评论

表情:
评论列表 (有 0 条评论,546人围观)

还没有评论,来说两句吧...

相关阅读