From 1476d27514874e9c95002451a81878bd9bec8382 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期六, 14 十二月 2024 15:36:53 +0800 Subject: [PATCH] 多轮对话 --- src/components/chat/components/playBar/PlayBar.vue | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/chat/components/playBar/PlayBar.vue b/src/components/chat/components/playBar/PlayBar.vue index 67fb6fa..77c605e 100644 --- a/src/components/chat/components/playBar/PlayBar.vue +++ b/src/components/chat/components/playBar/PlayBar.vue @@ -65,8 +65,8 @@ class="absolute rounded-md bg-white border border-solid border-gray-400 py-2 z-10" :style="{ left: popUpPosition.left + 'px', bottom: popUpPosition.bottom + 'px' }" > - <div class="font-bold text-sm text-nowrap overflow-hidden text-ellipsis max-w-80 mb-1 px-2">Ctrl+鏁板瓧蹇嵎杈撳叆</div> - <div class="text-gray-400 text-sm text-nowrap overflow-hidden text-ellipsis max-w-80 mb-1 px-2">{{ inputValue }}</div> + <div class="font-bold text-nowrap overflow-hidden text-ellipsis max-w-80 mb-1 px-2">Ctrl+鏁板瓧蹇嵎杈撳叆</div> + <div class="text-gray-400 text-nowrap overflow-hidden text-ellipsis max-w-80 mb-1 px-2">{{ inputValue }}</div> <div class="max-w-96 flex flex-col"> <div class="hover:bg-gray-300 py-2 cursor-pointer px-5 text-nowrap overflow-hidden text-ellipsis" @@ -74,7 +74,7 @@ :key="index" @click="similarClick(item)" > - <span class="text-sm text-gray-500 pr-1.5">{{ index + 1 }}</span> + <span class="text-gray-500 pr-1.5">{{ index + 1 }}</span> <template v-if="sentenceSplitMap?.[item.question]"> <template v-for="part in sentenceSplitMap[item.question]"> <span v-if="part.isKeyword" class="text-blue-400 font-bold cursor-pointer">{{ part.partStr }}</span> @@ -104,10 +104,18 @@ v-if="inputValue" > </el-button> - <el-button title="鍙戦��" class="cursor-pointer" link @click="emits('sendClick')"> - <div class="send"> - <img src="/static/images/wave/QueryImg.png" /> - </div> + <el-button class="cursor-pointer" link > + <el-tooltip v-if="isTalking" placement="top" content="鍋滄鐢熸垚"> + <div class="size-[36px] rounded-full flex-center border-2 border-solid border-black text-black" @click="emits('stopGenClick')"> + <span class="ywifont ywicon-jieshu"></span> + </div> + </el-tooltip> + + <el-tooltip v-else placement="top" content="鍙戦��"> + <div class="size-[36px] rounded-full bg-black flex-center" @click="emits('sendClick')"> + <img src="/static/images/wave/QueryImg.png" /> + </div> + </el-tooltip> </el-button> </div> </div> @@ -141,7 +149,7 @@ import VoicePage from './voicePage/VoicePage.vue'; import { getMetricsNames, querySimilarityHistory } from '/@/api/ai/chat'; import { activeGroupType, groupTypeList, groupTypeMapIcon } from '/@/stores/chatRoom'; -const emits = defineEmits(['sendClick', 'showUpChatClick', 'showDownChatClick']); +const emits = defineEmits(['sendClick', 'showUpChatClick', 'showDownChatClick','stopGenClick']); const props = defineProps({ isTalking: Boolean, isHome: Boolean, @@ -218,9 +226,6 @@ }); const clearTextarea = () => { inputValue.value = ''; - if (inputRef.value) { - inputRef.value.value = ''; - } }; const inputText = (text) => { nextTick(() => { -- Gitblit v1.9.3