From 1b2b8541dafa7cda0803c966609f70045b52b790 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Fri, 22 Aug 2025 20:53:42 +1000 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=9E=E6=8E=A5=E6=AD=8C=E8=AF=8D?= =?UTF-8?q?=E4=B8=8E=E5=AE=9E=E9=99=85=E6=92=AD=E6=94=BE=E8=BF=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ScrollingLyrics.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ScrollingLyrics.vue b/src/components/ScrollingLyrics.vue index 2c198ab..f89f8ce 100644 --- a/src/components/ScrollingLyrics.vue +++ b/src/components/ScrollingLyrics.vue @@ -90,6 +90,7 @@ import { onMounted, ref, watch, nextTick, computed, onUnmounted } from 'vue' import axios from 'axios' import gsap from 'gsap' import { usePlayQueueStore } from '../stores/usePlayQueueStore' +import { usePlayState } from '../stores/usePlayState' import { debugLyrics } from '../utils/debug' // 类型定义 @@ -108,6 +109,7 @@ interface GapLine { } const playQueueStore = usePlayQueueStore() +const playState = usePlayState() // 响应式数据 const parsedLyrics = ref<(LyricsLine | GapLine)[]>([]) @@ -482,7 +484,7 @@ function getGapDotOpacities(line: GapLine) { const duration = line.duration ?? 0 if (duration <= 0) return [0.3, 0.3, 0.3] // 当前播放时间 - const now = playQueueStore.currentTime + const now = playState.playProgress // gap 起止时间 const start = line.time // 计算进度 @@ -498,7 +500,7 @@ function getGapDotOpacities(line: GapLine) { // 监听播放时间变化 watch( - () => playQueueStore.currentTime, + () => playState.playProgress, (time) => { const newIndex = findCurrentLineIndex(time)