From 40a68e3c1f70a23fa376cd46c9149127eb3498a5 Mon Sep 17 00:00:00 2001 From: hwj Date: Wed, 15 Apr 2026 09:27:13 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E7=94=98=E7=89=B9=E5=9B=BEtoolti?= =?UTF-8?q?p=E9=9A=90=E8=97=8F=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/components/ScheduleGanttPanel.vue | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/views/mes/components/ScheduleGanttPanel.vue b/src/views/mes/components/ScheduleGanttPanel.vue index 79cc0e64..bb19e14c 100644 --- a/src/views/mes/components/ScheduleGanttPanel.vue +++ b/src/views/mes/components/ScheduleGanttPanel.vue @@ -209,7 +209,26 @@ const buildPreviewGanttData = (scheduleList: any[]) => { return { data: tasks, links } } +const cleanupTaskTooltips = () => { + const tooltipsExt = (gantt.ext as any)?.tooltips + const tooltip = tooltipsExt?.tooltip + if (tooltipsExt?.detach) { + tooltipsExt.detach('.gantt_task_line') + tooltipsExt.detach('.gantt_task_content') + } + if (tooltip?.hide) { + tooltip.hide() + } + const node = tooltip?.getNode?.() + if (node) { + node.style.display = 'none' + node.style.visibility = 'hidden' + node.style.opacity = '0' + } +} + const destroyGantt = () => { + cleanupTaskTooltips() ganttEventIds.value.forEach((eventId) => gantt.detachEvent(eventId)) ganttEventIds.value = [] gantt.clearAll()