diff --git a/packages/vtable/src/scenegraph/group-creater/column-helper.ts b/packages/vtable/src/scenegraph/group-creater/column-helper.ts index 47df9a146..78d7f13d8 100644 --- a/packages/vtable/src/scenegraph/group-creater/column-helper.ts +++ b/packages/vtable/src/scenegraph/group-creater/column-helper.ts @@ -72,7 +72,7 @@ export function createComplexColumn( for (let j = rowStart; j <= rowEnd; j++) { const row = j; const define = cellType !== 'body' ? table.getHeaderDefine(col, row) : table.getBodyColumnDefine(col, row); - const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon; + const mayHaveIcon = cellType !== 'body' ? true : !!define?.icon || !!define?.tree; const headerStyle = table._getCellStyle(col, row); const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme; cellTheme.group.width = colWidth; diff --git a/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts b/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts index 19fe6d430..bde1a5ccc 100644 --- a/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts +++ b/packages/vtable/src/scenegraph/group-creater/progress/proxy.ts @@ -613,6 +613,9 @@ export class SceneProxy { if (row < rowStart || row > rowEnd) { return emptyGroup; } + if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) { + return emptyGroup; + } if (this.cellCache.get(col)) { const cacheCellGoup = this.cellCache.get(col); if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) { diff --git a/packages/vtable/src/scenegraph/layout/compute-row-height.ts b/packages/vtable/src/scenegraph/layout/compute-row-height.ts index 5481f8ffa..8932d5222 100644 --- a/packages/vtable/src/scenegraph/layout/compute-row-height.ts +++ b/packages/vtable/src/scenegraph/layout/compute-row-height.ts @@ -194,7 +194,8 @@ function computeTextHeight(col: number, row: number, table: BaseTableAPI): numbe let iconInlineFrontHeight = 0; const iconInlineEnd: ColumnIconOption[] = []; let iconInlineEndHeight = 0; - const mayHaveIcon = table.getCellType(col, row) !== 'body' ? true : !!table.getBodyColumnDefine(col, row)?.icon; + const define = table.getBodyColumnDefine(col, row); + const mayHaveIcon = table.getCellType(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree; if (mayHaveIcon) { const icons = table.getCellIcons(col, row); icons?.forEach(icon => {