mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 20:20:04 +08:00
Merge pull request #13102 from dataease/pr@dev-v2@fix_table_adapt_transparent_line
fix(图表): 修复表格自适应模式下隐藏纵边框可能出现透明线条
This commit is contained in:
commit
f08b3dccc8
@ -264,7 +264,12 @@ export class TableInfo extends S2ChartView<TableSheet> {
|
||||
}, 0)
|
||||
const containerWidth = containerDom.getBoundingClientRect().width
|
||||
if (containerWidth <= totalWidthWithImg) {
|
||||
// 图库计算的布局宽度已经大于等于容器宽度,不需要再扩大,不处理
|
||||
// 图库计算的布局宽度已经大于等于容器宽度,不需要再扩大,但是需要处理非整数宽度值,不然会出现透明细线
|
||||
ev.colLeafNodes.reduce((p, n) => {
|
||||
n.width = Math.round(n.width)
|
||||
n.x = p
|
||||
return p + n.width
|
||||
}, 0)
|
||||
return
|
||||
}
|
||||
// 图片字段固定 120, 剩余宽度按比例均摊到其他字段进行扩大
|
||||
|
@ -265,7 +265,12 @@ export class TableNormal extends S2ChartView<TableSheet> {
|
||||
const containerWidth = containerDom.getBoundingClientRect().width
|
||||
const scale = containerWidth / ev.colsHierarchy.width
|
||||
if (scale <= 1) {
|
||||
// 图库计算的布局宽度已经大于等于容器宽度,不需要再扩大,不处理
|
||||
// 图库计算的布局宽度已经大于等于容器宽度,不需要再扩大,但是需要处理非整数宽度值,不然会出现透明细线
|
||||
ev.colLeafNodes.reduce((p, n) => {
|
||||
n.width = Math.round(n.width)
|
||||
n.x = p
|
||||
return p + n.width
|
||||
}, 0)
|
||||
return
|
||||
}
|
||||
const totalWidth = ev.colLeafNodes.reduce((p, n) => {
|
||||
|
Loading…
Reference in New Issue
Block a user