report10.0决策报表单元格悬浮提示背景设置

请问report10.0决策报表单元格悬浮提示背景颜色怎么设置

image.png

image.png

补充

image.pngimage.png

image.png

FineReport luozhiwei 发布于 2022-2-18 09:46 (编辑于 2022-2-18 10:49)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共4回答
最佳回答
0
隐藏大佬Lv4见习互助
发布于2022-2-18 09:56

写个js修改背景颜色属性,看图1645149388(1).jpg

  • luozhiwei luozhiwei(提问者) 没有ID请问怎么设置,请看上面补充截图。。
    2022-02-18 10:07 
  • 隐藏大佬 隐藏大佬 回复 luozhiwei(提问者) class也是可以的 $(\"class或者ID\").css({\'background-color\':\'自己想要的颜色\'}); class名前面加. ID前面加#
    2022-02-18 10:10 
  • 隐藏大佬 隐藏大佬 回复 luozhiwei(提问者) 如果class名有空格,记得每个小字段前面加. 如fr bw p12就写.fr .bw .p12
    2022-02-18 10:12 
  • luozhiwei luozhiwei(提问者) 回复 隐藏大佬 不行,补充了截图,最后还是没实现。。
    2022-02-18 10:28 
  • 隐藏大佬 隐藏大佬 回复 luozhiwei(提问者) F12后点击左上的箭头,再点击你要悬浮显示内容的地方,截图给我看一下
    2022-02-18 10:29 
最佳回答
0
snrtuemcLv8专家互助
发布于2022-2-18 09:51(编辑于 2022-2-18 10:12)

报表块初始化事件,代码参考

setTimeout(function() {

var oldTitle = null;

$('td').bind('mouseover mouseout mousemove', function(event) {

var left = event.pageX;

var top = event.pageY;

var ele = event.target;

var title = ele.title;

var type = event.originalEvent.type;

if (type == 'mouseover') {

oldTitle = title;

ele.title = '';

console.log(title);

if (title.length != 0) {

var showEle = $('', {

text: title,

class: 'showTitleBox'

}).css({

position: 'absolute',

top: top + 10,

left: left,

border: '1px solid #00cccc', // 边框

borderRadius: '5px', // 边框圆角

background: "#00cccc", // 背景色

fontFamily: 'SimHei', // 字体

fontSize: '15px' // 字体大小

})

showEle.appendTo('body');

}

} else if (type == 'mouseout') {

ele.title = oldTitle;

$('.showTitleBox').remove();

} else if (type == 'mousemove') {

$('.showTitleBox').css({

top: top + 10,

left: left

})

}

})

}, 100)

=============

效果image.png

===========

JS修改内容提示框字体样式-https://help.fanruan.com/finereport/doc-view-3486.html

image.png

  • luozhiwei luozhiwei(提问者) 不行,可能是决策报表新自适应不适用
    2022-02-18 09:59 
  • snrtuemc snrtuemc 回复 luozhiwei(提问者) 新自适应不行,,,我的是没安装新自适应的
    2022-02-18 09:59 
最佳回答
0
yzm835275Lv4见习互助
发布于2022-3-3 15:10

image.pngimage.png我这个按照你这个截图弄的怎么没有效果

最佳回答
0
SczuoleiLv4见习互助
发布于2022-8-9 11:20(编辑于 2022-8-9 11:30)

你好,请问你解决了吗

  • 6关注人数
  • 904浏览人数
  • 最后回答于:2022-8-9 11:30
    请选择关闭问题的原因
    确定 取消
    返回顶部