diff --git a/src/pages/sparring/components/question.vue b/src/pages/sparring/components/question.vue index 886858e2..6d216f0b 100644 --- a/src/pages/sparring/components/question.vue +++ b/src/pages/sparring/components/question.vue @@ -171,6 +171,21 @@ deep: true, immediate: true }) + watch( + () => props.activeVoiceId, + (val) => { + if (val !== props.dataInfo.id) { + if (isPlaying.value) { + isPlaying.value = false + if (!talkUserVoiceObj.value) return + talkUserVoiceObj.value.pause() + } + } + }, { + deep: true, + immediate: true + } + )