From d11280d353ddd8daf8bfcdd2d3fe711114ee7597 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期五, 22 十一月 2024 11:11:13 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test --- src/components/chat/components/playBar/PlayBar.vue | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/chat/components/playBar/PlayBar.vue b/src/components/chat/components/playBar/PlayBar.vue index c5fffa0..a009436 100644 --- a/src/components/chat/components/playBar/PlayBar.vue +++ b/src/components/chat/components/playBar/PlayBar.vue @@ -2,7 +2,7 @@ <div class="playInput hl_input rounded-[22px] input-border input-shadow"> <!-- 搴旂敤鍦烘櫙 --> <div class="application-scenarios absolute bottom-[114%] left-4"> - <div class="flex-items-center space-x-2"> + <div class="flex-items-center space-x-2" :class="isHome ? 'set-next-group-type' : ''"> <div class="border border-gray-400 border-solid h-8 flex-items-center px-3 py-2 rounded-2xl cursor-pointer space-x-1 hover:bg-[#cae3ff]" :class="{ 'bg-[#c5e0ff]': activeGroupType === item, '!text-[#1c86ff]': activeGroupType === item }" @@ -95,7 +95,7 @@ <img src="/static/images/wave/HeadImg.png" class="set-img-icon box-border" /> </el-button> --> - <el-button title="鍙戦��" :disabled="isTalking" class="cursor-pointer" link @click="emits('sendClick')"> + <el-button title="鍙戦��" class="cursor-pointer" link @click="emits('sendClick')"> <div class="send"> <img src="/static/images/wave/QueryImg.png" /> </div> @@ -116,7 +116,6 @@ :isHome="isHome" ref="commonPhrasesRef" @updateCommonChatInput="updateCommonChatInput" - /> </div> </template> @@ -125,7 +124,6 @@ import { onClickOutside } from '@vueuse/core'; import type { InputInstance } from 'element-plus'; import { ElMessage } from 'element-plus'; -import _ from 'lodash'; import getCaretCoordinates from 'textarea-caret'; import { computed, nextTick, ref, toRefs, watch } from 'vue'; import InfoDetail from './InfoDetail.vue'; @@ -133,6 +131,7 @@ import VoicePage from './voicePage/VoicePage.vue'; import { getMetricsNames, querySimilarityHistory } from '/@/api/ai/chat'; import { activeGroupType, groupTypeList, groupTypeMapIcon } from '/@/stores/chatRoom'; +import { sortBy } from 'lodash-es'; const emits = defineEmits(['sendClick', 'showUpChatClick', 'showDownChatClick']); const props = defineProps({ isTalking: Boolean, @@ -156,7 +155,7 @@ type: String, }); -const tipIsShow = computed(() => !!inputValue.value.trim() && similarList.value?.length > 0 && triggerShow.value); +const tipIsShow = computed(() => !!inputValue.value?.trim() && similarList.value?.length > 0 && triggerShow.value); const triggerShow = ref(false); const inputRef = ref<InputInstance>(null); @@ -316,7 +315,7 @@ }; // 鎸� startIndex 鎺掑簭锛屾秷闄ゅ郊姝や箣闂撮噸鍚堝厓绱� - sentenceMatchList = _.sortBy(sentenceMatchList, (item) => item.startIndex).filter((value, index, array) => { + sentenceMatchList = sortBy(sentenceMatchList, (item) => item.startIndex).filter((value, index, array) => { if (nextIsMerge) { checkNextIsMerge(value, index, array); return false; @@ -454,20 +453,20 @@ //#region ====================== 甯哥敤璇姛鑳� ====================== const commonPhrasesRef = ref(null); -const isMessageBoxVisible = ref(false); // 甯哥敤璇姛鑳界偣鍑� const commonPhrasesClick = () => { isShowPhrase.value = true; }; // 鍖哄煙鍏抽棴甯哥敤璇姛鑳介潰鏉� -onClickOutside(commonPhrasesRef, () => { - const messageBoxElement = document.querySelector('.el-message-box'); - if (messageBoxElement) { - isMessageBoxVisible.value = true; - return; +onClickOutside( + commonPhrasesRef, + () => { + isShowPhrase.value = false; + }, + { + ignore: ['.el-message-box'], } - isShowPhrase.value = false; -}); +); // 甯哥敤璇姛鑳借緭鍏ユ鏇存柊 const updateCommonChatInput = (val) => { inputValue.value = val; -- Gitblit v1.9.3