From 67165e213d6820bc55a7f1c6999f0c61a61059c8 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 27 Aug 2024 14:26:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8-=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=97=B6=EF=BC=8C=E5=89=8D=E7=AB=AF=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8F=90=E7=A4=BA=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=8D=A2=E8=A1=8C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-style/components/TooltipSelector.vue | 3 ++- .../chart/components/js/panel/charts/map/flow-map.ts | 6 +----- .../components/js/panel/charts/map/symbolic-map.ts | 10 +++------- .../components/js/panel/charts/map/tooltip-carousel.ts | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/TooltipSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/TooltipSelector.vue index fc507c3b55..19dcfebf07 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/TooltipSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/TooltipSelector.vue @@ -193,7 +193,8 @@ watch( const state = reactive({ tooltipForm: { - tooltipFormatter: DEFAULT_TOOLTIP.tooltipFormatter + tooltipFormatter: DEFAULT_TOOLTIP.tooltipFormatter, + carousel: DEFAULT_TOOLTIP.carousel } as DeepPartial }) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/flow-map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/flow-map.ts index c35cb138dc..c4758a46a3 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/flow-map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/flow-map.ts @@ -6,7 +6,7 @@ import { L7Wrapper } from '@/views/chart/components/js/panel/types/impl/l7' import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common' -import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util' +import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util' import { deepCopy } from '@/utils/utils' import { GaodeMap } from '@antv/l7-maps' import { Scene } from '@antv/l7-scene' @@ -310,8 +310,4 @@ export class FlowMap extends L7ChartView { chart.customAttr.misc.flowMapConfig.lineConfig.mapLineAnimate = true return chart } - - protected setupOptions(chart: Chart, config: L7Config): L7Config { - return flow(this.configEmptyDataStrategy)(chart, config) - } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts index d02a0c8798..f24309b64b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/symbolic-map.ts @@ -6,7 +6,7 @@ import { L7Wrapper } from '@/views/chart/components/js/panel/types/impl/l7' import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common' -import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util' +import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util' import { deepCopy } from '@/utils/utils' import { GaodeMap } from '@antv/l7-maps' import { Scene } from '@antv/l7-scene' @@ -307,7 +307,7 @@ export class SymbolicMap extends L7ChartView { * @returns {string} */ buildTooltipContent = (tooltip, fieldData, showFields) => { - let content = '' + let content = `` if (tooltip.customContent) { content = tooltip.customContent showFields.forEach(field => { @@ -320,7 +320,7 @@ export class SymbolicMap extends L7ChartView { }
` }) } - return content + return content.replace(/\n/g, '
') } /** @@ -394,8 +394,4 @@ export class SymbolicMap extends L7ChartView { } return chart } - - protected setupOptions(chart: Chart, config: L7Config): L7Config { - return flow(this.configEmptyDataStrategy, this.configLabel)(chart, config) - } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts index 874135a490..598d34f090 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts @@ -553,7 +553,7 @@ export class CarouselManager { }
` }) } - return content + return content.replace(/\n/g, '
') } /** * 合并详情到 map