diff --git a/src/pages/index/components/question.vue b/src/pages/index/components/question.vue index a8acce04..79177816 100644 --- a/src/pages/index/components/question.vue +++ b/src/pages/index/components/question.vue @@ -225,6 +225,23 @@ // },200) // } } + + watch( + () => props.activeVoiceId, + (val) => { + if (val !== props.dataInfo.id) { + if (isPlaying.value) { + isPlaying.value = false + if (!talkVoiceObj.value) return + talkVoiceObj.value.pause() + } + } + }, { + deep: true, + immediate: true + } + ) +