From 33ae7361fde677f39bfbb0fea8fc97661e0375c2 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Tue, 23 Apr 2024 18:16:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=B1=87=E6=80=BB=E8=A1=A8=E5=BA=8F=E5=8F=B7=E5=88=97=E6=96=91?= =?UTF-8?q?=E9=A9=AC=E7=BA=B9=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-normal.ts | 7 +++++-- .../src/views/chart/components/js/panel/types/index.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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 98b1b73275..5a61f84f61 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 @@ -1,5 +1,5 @@ import { S2ChartView, S2DrawOptions } from '@/views/chart/components/js/panel/types/impl/s2' -import { S2Event, S2Options, TableSheet, TableColCell, ViewMeta } from '@antv/s2' +import { S2Event, S2Options, TableSheet, TableColCell, ViewMeta, TableDataCell } from '@antv/s2' import { parseJson } from '@/views/chart/components/js/util' import { formatterItem, valueFormatter } from '@/views/chart/components/js/formatter' import { copyContent, getCurrentField } from '@/views/chart/components/js/panel/common/common_table' @@ -128,6 +128,9 @@ export class TableNormal extends S2ChartView { } return new TableColCell(node, sheet, config) } + s2Options.dataCell = viewMeta => { + return new TableDataCell(viewMeta, viewMeta?.spreadsheet) + } } // tooltip this.configTooltip(s2Options) @@ -167,7 +170,7 @@ export class TableNormal extends S2ChartView { // hover const { showColTooltip } = customAttr.tableHeader if (showColTooltip) { - newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event)) + newChart.on(S2Event.COL_CELL_HOVER, event => this.showTooltip(newChart, event, meta)) } const { showTooltip } = customAttr.tableCell if (showTooltip) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/index.ts b/core/core-frontend/src/views/chart/components/js/panel/types/index.ts index b436d593e1..aeb78b933f 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/index.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/index.ts @@ -92,7 +92,7 @@ export abstract class AntVAbstractChartView extends AbstractChartView { limit: 1 } } - selectorDesc: EditorSelectorSpec = { + selectorSpec: EditorSelectorSpec = { 'misc-style-selector': { title: `${t('chart.size')}` }