From 9b1e0b6f0b9c54751693295877d524503d8ab58d Mon Sep 17 00:00:00 2001 From: wisonic Date: Tue, 20 Aug 2024 18:24:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E9=92=BB=E5=8F=96?= =?UTF-8?q?=20URL=20=E5=AD=97=E6=AE=B5=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/components/js/panel/charts/table/table-info.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 4de4f3690c..144635aaf8 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 @@ -127,7 +127,7 @@ export class TableInfo extends S2ChartView { const style = this.configStyle(chart) // 自适应列宽模式下,URL 字段的宽度固定为 120 if (customAttr.basicStyle.tableColumnMode === 'adapt') { - const urlFields = fields.filter(field => axisMap[field.dataeaseName]?.deType === 7) + const urlFields = fields.filter(field => field.deType === 7) style.colCfg.widthByFieldValue = urlFields?.reduce((p, n) => { p[n.chartShowName ?? n.name] = 120 return p @@ -162,8 +162,8 @@ export class TableInfo extends S2ChartView { } } s2Options.dataCell = viewMeta => { - const deType = axisMap[viewMeta.valueField]?.deType - if (deType === 7 && chart.showPosition !== 'dialog') { + const field = fields.filter(f => f.dataeaseName === viewMeta.valueField)?.[0] + if (field?.deType === 7 && chart.showPosition !== 'dialog') { return new ImageCell(viewMeta, viewMeta?.spreadsheet) } if (viewMeta.colIndex === 0 && s2Options.showSeriesNumber) {