From e9dc37aaa8aa323a79898bf7bd4f0124933d4c0d Mon Sep 17 00:00:00 2001 From: duanhao Date: Tue, 12 Aug 2025 18:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E5=AF=86=E5=9B=A2=E4=BD=93=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LinkPrediction/socialGroups/components/detailNode.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/views/LinkPrediction/socialGroups/components/detailNode.vue b/src/views/LinkPrediction/socialGroups/components/detailNode.vue index caed2a7..8537004 100644 --- a/src/views/LinkPrediction/socialGroups/components/detailNode.vue +++ b/src/views/LinkPrediction/socialGroups/components/detailNode.vue @@ -222,6 +222,8 @@ watch( // 添加时间点点击事件处理函数 const handleTimePointClick = (timeStr) => { + pause() + const time = new Date(timeStr) currentTime.value = time const ratio = (time.getTime() - startTimeMs) / totalDuration @@ -321,6 +323,12 @@ const trackStyle = computed(() => { onUnmounted(() => { document.removeEventListener("pointermove", () => {}) document.removeEventListener("pointerup", () => {}) + // 清理计时器 + if (playTimer) { + pause() + clearInterval(playTimer) + playTimer = null + } }) let chart = null