From c747160d70eecc44dfd1be1954d8de97077745c7 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 20 Feb 2025 13:57:47 +0800 Subject: [PATCH] =?UTF-8?q?style(=E5=9B=BE=E8=A1=A8):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE=E6=8F=90=E7=A4=BA=E5=9C=A8=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E7=9A=84=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/js/panel/common/common_antv.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts index a75d93acb4..7585882e13 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts @@ -36,6 +36,7 @@ import type { PickOptions } from '@antv/g2plot/lib/core/plot' import { defaults } from 'lodash-es' import { useI18n } from '@/hooks/web/useI18n' const { t: tI18n } = useI18n() +import { isMobile } from '@/utils/utils' export function getPadding(chart: Chart): number[] { if (chart.drill) { @@ -1369,7 +1370,7 @@ export function getTooltipContainer(id) { g2Tooltip.classList.add('g2-tooltip') // 最多半屏,鼠标移入可滚动 g2Tooltip.style.maxHeight = '50%' - g2Tooltip.style.maxWidth = '25%' + isMobile() ? (g2Tooltip.style.maxWidth = '50%') : (g2Tooltip.style.maxWidth = '25%') g2Tooltip.style.overflowY = 'auto' g2Tooltip.style.display = 'none' g2Tooltip.style.position = 'fixed'