wujingjing
2025-04-01 d5ef0fe419c0b3a83c3c73a63fb54353572a8103
src/components/chat/assistant/index.vue
@@ -156,12 +156,25 @@
               </div>
               <!-- #region ====================== ai 消息操作 ======================-->
               <div v-if="msg.content?.values && !isSharePage" class="absolute flex items-center right-0 mr-4 mt-2 space-x-2">
                  <div
                     class="flex items-center justify-center size-[15px]"
                     v-if="msg.content?.type === AnswerType.Text || msg.content?.type === AnswerType.Knowledge"
                  >
                  <div class="flex items-center justify-center size-[15px]" v-if="checkIsText(msg)">
                     <i class="p-2 ywifont ywicon-copy cursor-pointer hover:text-[#0284ff] hover:!text-[18px]" @click="copyClick(msg)" />
                  </div>
                  <el-tooltip v-if="checkIsText(msg)" effect="dark" :content="isItemSpeaking(msg) ? '暂停朗读' : '语音朗读'" placement="top">
                     <div v-if="isItemSpeaking(msg)" class="cursor-pointer flex items-center space-x-[1px]" @click="speechClick(msg)">
                        <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 class="w-[2px] h-[9px] bg-[#0284ff] animate-[soundWave_1.5s_ease-in-out_infinite_0.3s]"></div>
                        <div class="w-[2px] h-[6px] bg-[#0284ff] animate-[soundWave_1.5s_ease-in-out_infinite_0.4s]"></div>
                     </div>
                     <div v-else class="flex items-center justify-center size-[15px]">
                        <i
                           class="p-2 ywifont ywicon-shengyin cursor-pointer hover:text-[#0284ff] font-medium hover:!text-[18px]"
                           @click="speechClick(msg)"
                        />
                     </div>
                  </el-tooltip>
                  <template v-if="msg.content.errCode !== ErrorCode.Message">
                     <el-tooltip effect="dark" content="点赞" placement="top">
                        <div class="flex items-center justify-center size-[15px]">
@@ -311,6 +324,10 @@
   feedbackClick,
   fixQuestionClick,
   showFixQuestion,
   speechClick,
   isItemSpeaking,
   checkIsText,
} = useAssistantContentOpt({
   sendChatMessage,
});