This commit is contained in:
qumeng039@126.com 2025-08-15 16:13:11 +08:00
commit ea1d6d90b1
2 changed files with 22 additions and 2 deletions

View File

@ -25,7 +25,7 @@
:key="point.id"
class="timeline-point-wrapper"
:style="{ left: `${pointPositions[point.id]}%` }"
@click="store.setActiveTimePoint(point.id)"
@click="handleTimePointClick(point.id)"
>
<el-tooltip
class="timePoint-box-item"
@ -62,6 +62,11 @@
import { ref, defineExpose, watch, computed } from "vue"
import { useKeyNodeStore2 } from "@/store/keyNodeStore2"
// stopAutomaticPlay
const props = defineProps({
stopAutomaticPlay: { type: Function, required: true }
})
import BridgeCommunityGraph from "./graph/bridgeCommunityGraph.vue"
import DetailCommunityGraph from "./graph/detailCommunityGraph.vue"
@ -164,6 +169,13 @@ const trackStyle = computed(() => {
})
defineExpose({ highlightNode })
//
const handleTimePointClick = (pointId) => {
//
props.stopAutomaticPlay()
//
store.setActiveTimePoint(pointId)
}
</script>
<style scoped lang="less">

View File

@ -37,7 +37,7 @@
</div>
<div class="middle-container">
<div class="graph">
<GraphPanel ref="graphPanelRef" />
<GraphPanel ref="graphPanelRef" :stopAutomaticPlay="stopAutomaticPlay" />
</div>
<div class="postList">
<PostDynamics :posts="store.posts" @handle:openDialog="handleOpenPostDialog" />
@ -94,6 +94,14 @@ const handleOpenPostDialog = (post) => {
store.openPostDetail(post)
}
//
const stopAutomaticPlay = () => {
if (timer) {
clearInterval(timer)
timer = null
}
}
let timer = null
const automaticPlay = () => {
let index = 1