功能优化

This commit is contained in:
2026-02-02 23:16:38 +08:00
parent 42567c457b
commit 409e976209
5 changed files with 76 additions and 62 deletions

View File

@@ -24,7 +24,11 @@
<!-- 音色选择 -->
<div class="section">
<h3>音色</h3>
<VoiceSelector ref="voiceSelectorRef" @select="handleVoiceSelect" />
<VoiceSelector
:synth-text="ttsText"
:speech-rate="speechRate"
@select="handleVoiceSelect"
/>
</div>
<!-- TTS 控制 -->
@@ -300,8 +304,6 @@ import FullWidthLayout from '@/layouts/components/FullWidthLayout.vue'
import { useIdentifyFaceController } from './hooks/useIdentifyFaceController'
const voiceStore = useVoiceCopyStore()
const voiceSelectorRef: any = ref(null)
const dragOver = ref(false)
// ==================== 初始化 Controller ====================
@@ -355,12 +357,6 @@ const {
onMounted(async () => {
await voiceStore.refresh()
// 设置VoiceSelector的试听文本和语速
if (voiceSelectorRef.value) {
voiceSelectorRef.value.setPreviewText(ttsText.value)
voiceSelectorRef.value.setPreviewSpeechRate(speechRate.value)
}
})
</script>