From 2867e176c57b5645d7bd82819873c82477326015 Mon Sep 17 00:00:00 2001 From: wisonic Date: Thu, 17 Apr 2025 15:02:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E9=80=89=E4=B8=AD=E5=8D=95=E4=B8=AA=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E5=A4=8D=E5=88=B6=E9=94=99=E8=AF=AF=20#15836?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/common/common_table.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts index 091763a8ce..d920548b8e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts @@ -1077,7 +1077,14 @@ export function copyContent(s2Instance: SpreadSheet, event, fieldMeta) { if (cells.length === 1) { const curCell = cells[0] if (cell.getMeta().id === curCell.id) { - copyString(cellMeta.value + '', true) + const cellMeta = cell.getMeta() + const value = cellMeta.data?.[cellMeta.valueField] + const metaObj = find(fieldMeta, m => m.field === cellMeta.valueField) + let fieldVal = value?.toString() + if (metaObj) { + fieldVal = metaObj.formatter(value) + } + copyString(fieldVal, true) } s2Instance.interaction.clearState() return