From ed7e8a776896b260534d7cfe42100e1b80dd9f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=8C=E7=B3=96=E5=8C=85=E5=AD=90?= Date: Tue, 28 Apr 2026 23:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=92=AD=E6=94=BE=E5=99=A8?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E8=BF=9B=E5=BA=A6=E5=9B=BE=E6=A0=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B7=B3=E5=8F=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot --- src/views/api/aplayer/vue-aplayer.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/api/aplayer/vue-aplayer.vue b/src/views/api/aplayer/vue-aplayer.vue index db2ef32..1172036 100644 --- a/src/views/api/aplayer/vue-aplayer.vue +++ b/src/views/api/aplayer/vue-aplayer.vue @@ -13,7 +13,7 @@
(null) const internalMusic = ref(props.music) const isPlaying = ref(false) +const isSeeking = ref(false) const wasPlayingBeforeSeeking = ref(false) const isMobile = /mobile/i.test(window.navigator.userAgent) const playStat = reactive({ @@ -258,6 +259,7 @@ const currentMusic = computed({ const currentTheme = computed(() => selfAdaptingTheme.value || currentMusic.value.theme || props.theme) const isFloatMode = computed(() => props.float && !isMobile) +const thumbnailPlaying = computed(() => isPlaying.value || (isSeeking.value && wasPlayingBeforeSeeking.value)) const floatStyleObj = computed(() => { return { transform: `translate(${floatOffsetLeft.value}px, ${floatOffsetTop.value}px)`, @@ -408,6 +410,7 @@ function onProgressDragBegin(value: number) { if (!media) return wasPlayingBeforeSeeking.value = isPlaying.value + isSeeking.value = true pause() if (!isNaN(media.duration)) { @@ -429,6 +432,9 @@ function onProgressDragging(value: number) { function onProgressDragEnd() { if (wasPlayingBeforeSeeking.value) { thenPlay() + } else { + isSeeking.value = false + wasPlayingBeforeSeeking.value = false } } @@ -502,10 +508,15 @@ function onSelectSong(song: PlayerMusicItem) { function onAudioPlay() { isPlaying.value = true + isSeeking.value = false + wasPlayingBeforeSeeking.value = false } function onAudioPause() { isPlaying.value = false + if (!isSeeking.value) { + wasPlayingBeforeSeeking.value = false + } } function onAudioWaiting() {