From b9d28bd6af15026741099c25a6e72fe947ad3772 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期四, 10 四月 2025 17:31:50 +0800
Subject: [PATCH] 修改数字人对话

---
 src/components/chat/components/ChatContainer.vue |   30 ++++++++++++++++++++++--------
 1 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/src/components/chat/components/ChatContainer.vue b/src/components/chat/components/ChatContainer.vue
index 0116a0d..404af42 100644
--- a/src/components/chat/components/ChatContainer.vue
+++ b/src/components/chat/components/ChatContainer.vue
@@ -22,12 +22,17 @@
 					<i class="ywifont ywicon-xiangxiajiantou !text-[20px]" />
 				</div>
 			</div>
-			<div v-show="digitalHumanIsShow" v-loading="humanIsLoading" class="absolute right-28 bottom-[250px] w-[303.75px] h-[540px]">
-				<span class="ywifont ywicon-guanbi text-[20px] cursor-pointer absolute top-2 right-2 z-[1]" @click="closeDigitalHuman"></span>
+			<div
+				v-show="digitalHumanIsShow"
+				v-loading="humanIsLoading"
+				class="absolute right-0 bottom-0 z-[2]"
+				:style="{ width: digitalHumanWidth, height: `calc(${digitalHumanWidth} * 16 / 9)` }"
+			>
+				<span class="ywifont ywicon-guanbi text-[20px] cursor-pointer absolute top-7 right-7 z-[1]" @click="closeDigitalHuman"></span>
 				<div class="duix-container h-full w-full"></div>
 			</div>
 
-			<div v-if="!digitalHumanIsShow" class="absolute right-28 bottom-[250px]">
+			<div v-if="!digitalHumanIsShow" class="absolute right-[24px] bottom-[100px] z-[2]">
 				<el-tooltip content="鏁板瓧浜�" placement="top">
 					<div
 						class="flex items-center justify-center size-[38px] cursor-pointer hover:text-[#0284ff] border rounded-full hover:bg-[#f6f7f9] shadow bg-white"
@@ -64,19 +69,28 @@
 import { onActivated, onDeactivated, ref } from 'vue';
 import { useChatWidth } from '../hooks/useChatWidth';
 import { useScroll } from '../hooks/useScroll';
-import emitter from '/@/utils/mitt';
+import type { QuestionLifecycle } from '../types';
 import { useDigitalHuman } from './playBar/hook/useDigitalHuman';
-
+import emitter from '/@/utils/mitt';
 const props = defineProps<{
 	loading?: boolean;
 	moreIsLoading?: boolean;
 	isSharePage?: boolean;
 }>();
 
+const emit = defineEmits<{
+	autoSendMessage: [string, QuestionLifecycle];
+}>();
+
 const chatListDom = ref<HTMLDivElement>();
-const { openDigitalHuman, isHumanTalking, humanIsLoading,digitalHumanIsShow, closeDigitalHuman } = useDigitalHuman({
-	container: '.duix-container',
-});
+const { openDigitalHuman, isHumanTalking, humanIsLoading, digitalHumanIsShow, closeDigitalHuman, digitalHumanWidth } = useDigitalHuman(
+	{
+		container: '.duix-container',
+		autoSendMessage: (question: string, lifecycleCall?: QuestionLifecycle) => {
+			emit('autoSendMessage', question, lifecycleCall);
+		},
+	}
+);
 const { scrollToBottom, isBottom } = useScroll({
 	chatListDom,
 });

--
Gitblit v1.9.3