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 0aebd92bc3..d308a2b251 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 @@ -302,11 +302,14 @@ export class TableInfo extends S2ChartView { } action(param) }) + // 合并的单元格直接复用数据单元格的事件 + newChart.on(S2Event.MERGED_CELLS_CLICK, e => newChart.emit(S2Event.DATA_CELL_CLICK, e)) // tooltip const { show } = tooltip if (show) { newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta)) newChart.on(S2Event.DATA_CELL_HOVER, event => this.showTooltip(newChart, event, meta)) + newChart.on(S2Event.MERGED_CELLS_HOVER, event => this.showTooltip(newChart, event, meta)) } // header resize newChart.on(S2Event.LAYOUT_RESIZE_COL_WIDTH, ev => resizeAction(ev)) diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts index 4a4d0bd930..cbd8c005aa 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts @@ -75,6 +75,7 @@ export abstract class S2ChartView

extends AntVAbstractCha let field switch (cell.cellType) { case 'dataCell': + case 'mergedCell': if (meta.valueField === SERIES_NUMBER_FIELD) { content = meta.fieldValue.toString() break