From 8a4ecc513f2b9eba183938e053fa776fee19b342 Mon Sep 17 00:00:00 2001 From: Klein <11241686+Klein422@user.noreply.gitee.com> Date: Tue, 13 Aug 2024 21:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=A1=86=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mixi-ui/src/views/demo/Room.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Mixi-ui/src/views/demo/Room.vue b/Mixi-ui/src/views/demo/Room.vue index 9326ba4..4db1a5a 100644 --- a/Mixi-ui/src/views/demo/Room.vue +++ b/Mixi-ui/src/views/demo/Room.vue @@ -28,7 +28,7 @@
-
+
@@ -51,6 +51,7 @@ import { storage } from '@/util/storage'; import messageComponent from '@/components/room/messageComponent.vue'; let invite = ref(false) let inviteEmail = ref([]) +let chatScrollBox = ref() onMounted(() => { for (let i = 0; i < 20; i++)inviteEmail.value[i] = '' }) @@ -109,6 +110,9 @@ socket.onmessage((event: any) => { messageArray.value.push(msg) console.log(messageArray.value) }) + setTimeout(()=>{ + chatScrollBox.value.scrollTop = chatScrollBox.value.scrollHeight; + },100) }) socket.init()