diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts index 682f46f46b..302f15eaca 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts @@ -264,7 +264,12 @@ export class TableInfo extends S2ChartView { }, 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, 剩余宽度按比例均摊到其他字段进行扩大 diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts index 5758f045d5..78cbb8e97e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts @@ -265,7 +265,12 @@ export class TableNormal extends S2ChartView { 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) => {