From 26e2d14957500f4f738945d4c71d1288a72c85cb Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 03 三月 2025 10:22:22 +0800
Subject: [PATCH] attachFileList

---
 src/components/chat/components/ChatContainer.vue |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/components/chat/components/ChatContainer.vue b/src/components/chat/components/ChatContainer.vue
index 7bff6cc..2154a53 100644
--- a/src/components/chat/components/ChatContainer.vue
+++ b/src/components/chat/components/ChatContainer.vue
@@ -2,7 +2,7 @@
 	<div class="flex h-full">
 		<div class="flex flex-col h-full flex-auto relative">
 			<!-- 娑堟伅鍒楄〃鍖哄煙 -->
-			<div ref="chatListDom" class="relative h-full flex flex-col items-center overflow-y-auto" style="height: calc(100% - 50px)">
+			<div v-resize="updateChatWidth" ref="chatListDom" class="relative h-full flex flex-col items-center overflow-y-auto flex-auto">
 				<span
 					class="more-loading absolute text-blue-400 left-[50%] translate-x-[-50%] cursor-pointer w-10"
 					v-loading="moreIsLoading"
@@ -24,13 +24,9 @@
 			</div>
 
 			<!-- 杈撳叆鍖哄煙 -->
-			<div
-				class="sticky bottom-0 w-full px-6 pt-12 pb-6 bg-[rgb(247,248,250)] flex justify-center"
-				v-if="!isSharePage "
-			>
+			<div class="w-full px-6 pb-6 bg-[rgb(247,248,250)] flex justify-center z-[1] flex-0" v-if="!isSharePage">
 				<slot name="input-area" />
 			</div>
-
 		</div>
 
 		<slot name="drawer" />
@@ -39,23 +35,27 @@
 
 <script setup lang="ts">
 import { ref } from 'vue';
-import { useScrollToBottom } from '../hooks/useScrollToBottom';
+import { useScroll } from '../hooks/useScroll';
+import { useChatWidth } from '../hooks/useChatWidth';
 
 const props = defineProps<{
 	loading?: boolean;
 	moreIsLoading?: boolean;
 	isSharePage?: boolean;
-	chatWidth?: string;
 }>();
 
 const chatListDom = ref<HTMLDivElement>();
 
-const { scrollToBottom, isBottom } = useScrollToBottom({
+const { scrollToBottom, isBottom } = useScroll({
 	chatListDom,
 });
 
+const { updateChatWidth, chatWidth } = useChatWidth();
+
 defineExpose({
 	chatListDom,
+	scrollToBottom,
+	chatWidth,
 });
 </script>
 

--
Gitblit v1.9.3