Skip to content

Commit 68cc93c

Browse files
committed
fix: Unfiltered special characters in voice playback
1 parent bd90011 commit 68cc93c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
</div>
100100
</template>
101101
<script setup lang="ts">
102-
import { nextTick, onMounted, ref } from 'vue'
102+
import { nextTick, onMounted, ref, onBeforeUnmount } from 'vue'
103103
import { useRoute } from 'vue-router'
104104
import { copyClick } from '@/utils/clipboard'
105105
import applicationApi from '@/api/application'
@@ -489,7 +489,7 @@ class AudioManage {
489489
// text 处理成纯文本
490490
text = markdownToPlainText(text)
491491
const split = smartSplit(
492-
props.data.answer_text,
492+
text,
493493
{
494494
0: 20,
495495
1: 50,
@@ -526,6 +526,11 @@ onMounted(() => {
526526
}
527527
})
528528
})
529+
onBeforeUnmount(() => {
530+
if (audioManage.value) {
531+
audioManage.value.pause()
532+
}
533+
})
529534
</script>
530535
<style lang="scss" scoped>
531536
@media only screen and (max-width: 430px) {

0 commit comments

Comments
 (0)