From d0ad1fe73fba893df9cced26edda46f6ae8c62da Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 19 Jun 2025 15:59:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BF=AE=E5=A4=8Dtool?= =?UTF-8?q?tips=E8=BD=AE=E6=92=AD=E5=AF=BC=E8=87=B4tab=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E7=9A=84tooltips=E6=98=BE=E7=A4=BA=E5=8F=A0=E5=8A=A0?= =?UTF-8?q?=E9=97=AE=E9=A2=98#16271?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/de-tabs/Component.vue | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index b0218d9b42..f1aa098a4b 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -171,6 +171,7 @@ import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapsho import { useI18n } from '@/hooks/web/useI18n' import { imgUrlTrans } from '@/utils/imgUtils' import Board from '@/components/de-board/Board.vue' +import ChartCarouselTooltip from '@/views/chart/components/js/g2plot_tooltip_carousel' const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() const { tabMoveInActiveId, bashMatrixInfo, editMode, mobileInPc } = storeToRefs(dvMainStore) @@ -269,6 +270,23 @@ const svgInnerActiveEnable = itemName => { ) } +// tooltips 轮播会影响tab 展示 +const viewToolTipsChange = () => { + element.value.propValue?.forEach(tabItem => { + const tMethod = + editableTabsValue.value === tabItem.name + ? ChartCarouselTooltip.resume + : ChartCarouselTooltip.paused + tabItem.componentData?.forEach(componentItem => { + tMethod(componentItem.id) + if (componentItem.component === 'Group') + componentItem.propValue.forEach(groupItem => { + tMethod(groupItem.id) + }) + }) + }) +} + const handleMouseEnter = () => { state.hoverFlag = true } @@ -624,6 +642,12 @@ watch( } ) +watch( + () => editableTabsValue.value, + () => { + viewToolTipsChange() + } +) const initCarousel = () => { carouselTimer && clearInterval(carouselTimer) carouselTimer = null @@ -656,12 +680,14 @@ onMounted(() => { eventBus.on('onTabMoveOut-' + element.value.id, componentMoveOut) eventBus.on('onTabSortChange-' + element.value.id, reShow) } - currentInstance = getCurrentInstance() initCarousel() nextTick(() => { groupSizeStyleAdaptor(element.value) }) + setTimeout(() => { + viewToolTipsChange() + }, 1000) }) onBeforeUnmount(() => { if (['canvas', 'canvasDataV', 'edit'].includes(showPosition.value) && !mobileInPc.value) {