From 533507e4ae3cf220105d8b6a358685aec37d45d4 Mon Sep 17 00:00:00 2001 From: cc <94575594@qq.com> Date: Thu, 16 Apr 2026 15:57:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(speaking-evaluation):=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E5=90=AC=E8=AF=BB=E8=AF=84=E6=B5=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84=E4=B8=8E=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构了组件的脚本部分,优化状态管理与函数组织 - 统一管理TTS合成与播放逻辑,提升代码可维护性 - 优化ASR语音识别流程,增加错误处理和状态反馈 - 改进AI评测接口调用及结果解析逻辑,确保稳定性 - 清理录音和播放资源,防止内存泄漏 - 重新编排模板结构,提升交互体验和代码可读性 - 优化样式细节,增强界面一致性和响应式表现 --- src/views/SpeakingEvaluation.vue | 371 ++++++++++++++++++++++++++++++- 1 file changed, 359 insertions(+), 12 deletions(-) diff --git a/src/views/SpeakingEvaluation.vue b/src/views/SpeakingEvaluation.vue index 04e66c5..daf57da 100644 --- a/src/views/SpeakingEvaluation.vue +++ b/src/views/SpeakingEvaluation.vue @@ -1,5 +1,5 @@ @@ -638,11 +716,7 @@ onUnmounted(() => { error: asrStatus === 'error', }" :disabled="!currentWord || isEvaluating" - @mousedown="startRecording" - @mouseup="stopRecording" - @mouseleave="isRecording && stopRecording()" - @touchstart.prevent="startRecording" - @touchend.prevent="stopRecording" + @click="toggleRecording" >