| | |
| | | </div> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip v-if="isSupportSpeech" placement="top" content="语音输入"> |
| | | <el-tooltip v-if="isSupportSpeech" placement="top" :content="recordState.isRecording ? '停止语音输入' : '语音输入'"> |
| | | <div class="cursor-pointer size-[24px] relative !z-10 rounded flex-center hover:bg-[#f2f2f2]" @click="speechClick"> |
| | | <div v-if="recordState.isRecording" class="cursor-pointer flex items-center space-x-[1px]"> |
| | | <div v-if="recordState.isRecording" class="cursor-pointer flex items-center space-x-[1px]"> |
| | | <div class="w-[2px] h-[6px] bg-[#0284ff] animate-[soundWave_1.5s_ease-in-out_infinite]"></div> |
| | | <div class="w-[2px] h-[9px] bg-[#0284ff] animate-[soundWave_1.5s_ease-in-out_infinite_0.1s]"></div> |
| | | <div class="w-[2px] h-[12px] bg-[#0284ff] animate-[soundWave_1.5s_ease-in-out_infinite_0.2s]"></div> |
| | |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip v-else placement="top" content="发送"> |
| | | <div class="size-[38px] rounded-full bg-black flex-center" @click="emits('sendClick')"> |
| | | <div class="size-[38px] rounded-full bg-black flex-center" @click="sendClick"> |
| | | <img src="/static/images/wave/QueryImg.png" /> |
| | | </div> |
| | | </el-tooltip> |
| | |
| | | msgList: Array, |
| | | }); |
| | | |
| | | const sendClick = () => { |
| | | if (recordState.isRecording) { |
| | | cancelRecording(); |
| | | } |
| | | emits('sendClick'); |
| | | }; |
| | | |
| | | const voicePageIsShow = defineModel('voicePageIsShow', { |
| | | type: Boolean, |
| | | default: false, |
| | |
| | | } |
| | | }; |
| | | |
| | | const { isSupportSpeech, startRecording, stopRecording, recordState } = useSpeech({ |
| | | const { isSupportSpeech, startRecording, stopRecording, recordState, cancelRecording } = useSpeech({ |
| | | inputText: inputValue, |
| | | }); |
| | | |