From fc5d025d2dfdeb411a49c25916e3cb772053e1b1 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 4 Dec 2024 15:32:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=B7=B3=E8=BD=AC=E5=BC=B9=E6=A1=86=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/components/ChartComponentS2.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index 80d8cfa725..1e1d231008 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -26,9 +26,9 @@ import ChartError from '@/views/chart/components/views/components/ChartError.vue import { defaultsDeep, cloneDeep, debounce } from 'lodash-es' import { BASE_VIEW_CONFIG } from '../../editor/util/chart' import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle' -import { deepCopy, isISOMobile } from '@/utils/utils' +import { deepCopy, isISOMobile, isMobile } from '@/utils/utils' import { useEmitt } from '@/hooks/web/useEmitt' -import { trackBarStyleCheck } from '@/utils/canvasUtils' +import { isDashboard, trackBarStyleCheck } from '@/utils/canvasUtils' import { type SpreadSheet } from '@antv/s2' import { parseJson } from '../../js/util' @@ -93,6 +93,7 @@ const props = defineProps({ }) const emit = defineEmits(['onPointClick', 'onChartClick', 'onDrillFilters', 'onJumpClick']) +const dataVMobile = !isDashboard() && isMobile() const { view, showPosition, scale, terminal, drillLength, suffixId } = toRefs(props) @@ -359,8 +360,14 @@ const action = param => { top: param.y + 10 } trackBarStyleCheck(props.element, barStyleTemp, props.scale, trackMenu.value.length) - state.trackBarStyle.left = barStyleTemp.left + 'px' - state.trackBarStyle.top = barStyleTemp.top + 'px' + if (dataVMobile) { + state.trackBarStyle.left = barStyleTemp.left + 40 + 'px' + state.trackBarStyle.top = barStyleTemp.top + 70 + 'px' + } else { + state.trackBarStyle.left = barStyleTemp.left + 'px' + state.trackBarStyle.top = barStyleTemp.top + 'px' + } + viewTrack.value.trackButtonClick() } } @@ -671,6 +678,7 @@ const tablePageClass = computed(() => { class="track-bar" :style="state.trackBarStyle" @trackClick="trackClick" + :is-data-v-mobile="dataVMobile" @mousemove="mouseMove" />