diff --git a/packages/s2-core/src/facet/table-facet.ts b/packages/s2-core/src/facet/table-facet.ts index dc80e2ce5a..c26585d1a0 100644 --- a/packages/s2-core/src/facet/table-facet.ts +++ b/packages/s2-core/src/facet/table-facet.ts @@ -124,6 +124,7 @@ export class TableFacet extends FrozenFacet { } const { empty } = this.spreadsheet.options.placeholder!; + const { background } = this.spreadsheet.theme; const { icon, description } = this.spreadsheet.theme.empty; const { horizontalBorderWidth, @@ -148,6 +149,8 @@ export class TableFacet extends FrozenFacet { stroke: horizontalBorderColor, strokeWidth: horizontalBorderWidth, strokeOpacity: horizontalBorderColorOpacity, + fill: background?.color, + fillOpacity: background?.opacity ?? 1, }, }); @@ -173,6 +176,8 @@ export class TableFacet extends FrozenFacet { y: descY, }, }); + + this.emptyPlaceholderGroup.toFront(); } private getDataCellAdaptiveHeight(viewMeta: ViewMeta): number {