yangyin
2024-11-08 b5e920831f3e2ea94c809b0dd99f08c16d9feceb
src/components/chat/components/playBar/PlayBar.vue
@@ -116,6 +116,7 @@
         :isHome="isHome"
         ref="commonPhrasesRef"
         @updateCommonChatInput="updateCommonChatInput"
      />
   </div>
</template>
@@ -207,6 +208,7 @@
onClickOutside(tipEleRef, () => {
   triggerShow.value = false;
});
const inputText = (text) => {
   nextTick(() => {
      setTimeout(() => {
@@ -438,11 +440,10 @@
//#region ====================== 当前应用场景 ======================
const currentGroupTypeIsShow = computed(() => !!activeGroupType.value);
const groupTypeClick = (item) => {
   activeGroupType.value = item;
   inputRef.value.focus();
   commonPhrasesRef.value.getCommonPhrases();
};
// 关闭当前 groupType 面板
@@ -453,18 +454,31 @@
//#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;
   }
   isShowPhrase.value = false;
});
// 常用语功能输入框更新
const updateCommonChatInput = (val) => {
   inputValue.value = val;
   isShowPhrase.value = false;
};
watch(setCommonQuestionInfo, (val) => {
   if (!props.isHome) {
      let obj = {
         id: val?.historyId,
         title: val?.content.values,
         question: val?.content.values,
      };
      commonPhrasesRef.value.commonChatByUser(obj);
      isShowPhrase.value = true;