From 0647fd26414fc8a3ab077d355f50da6e3e36ad63 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期三, 15 一月 2025 17:40:57 +0800
Subject: [PATCH] 实现原本功能

---
 src/components/chat/components/ChatContainer.vue |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/components/chat/components/ChatContainer.vue b/src/components/chat/components/ChatContainer.vue
index 3b6f022..c24d1e8 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" style="height: calc(100% - 50px)">
 				<span
 					class="more-loading absolute text-blue-400 left-[50%] translate-x-[-50%] cursor-pointer w-10"
 					v-loading="moreIsLoading"
@@ -36,12 +36,12 @@
 <script setup lang="ts">
 import { ref } from 'vue';
 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>();
@@ -50,9 +50,12 @@
 	chatListDom,
 });
 
+const { updateChatWidth, chatWidth } = useChatWidth();
+
 defineExpose({
 	chatListDom,
 	scrollToBottom,
+	chatWidth,
 });
 </script>
 

--
Gitblit v1.9.3