From 7fb049d31d211d9599f07773501f8cebf9609a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=A0?= <2091066548@qq.com> Date: Thu, 11 Sep 2025 01:12:07 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=8D=B3=E5=88=BB=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E5=8C=BA=E5=9F=9F=EF=BC=8C=E5=92=8C=E9=A1=B6=E9=83=A8?= =?UTF-8?q?logo=E5=88=87=E6=8D=A2=EF=BC=8Chome=E9=A1=B5=E9=9D=A2=E7=9A=848?= =?UTF-8?q?0=E6=94=B9=E5=88=B050=E7=99=BE=E5=88=86=E4=B9=8B=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- src/components/InstantMessage.vue | 286 ++++++++++++++++-------------- src/views/Home.vue | 6 +- 3 files changed, 161 insertions(+), 133 deletions(-) diff --git a/index.html b/index.html index 30ff4fa..b3a57dc 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + 在线学习平台 diff --git a/src/components/InstantMessage.vue b/src/components/InstantMessage.vue index bd2ab98..bc55718 100644 --- a/src/components/InstantMessage.vue +++ b/src/components/InstantMessage.vue @@ -3,11 +3,7 @@
-

对话

- +

全部消息

@@ -19,7 +15,7 @@ >
-
{{ conversation.unreadCount }}
+
{{ conversation.name }}
@@ -43,29 +39,12 @@
- -
- - - -
+
{{ selectedConversation.name }}
-
@@ -83,7 +62,7 @@
{{ message.time }}
-
+
我
@@ -91,29 +70,34 @@
-
- - - -
- - +
+
+ + + +
+
+ {{ messageInput.length }}/500 + +
+
@@ -288,9 +272,10 @@ onMounted(() => { diff --git a/src/views/Home.vue b/src/views/Home.vue index 419d682..8b65447 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -701,12 +701,12 @@ const handleScroll = () => { documentHeight, scrollableHeight, scrollPercentage: scrollPercentage.toFixed(2) + '%', - shouldShow: scrollPercentage >= 80, + shouldShow: scrollPercentage >= 50, currentShow: showFixedButtons.value }) - // 当滚动超过80%时显示固定按钮组 - const shouldShow = scrollPercentage >= 80 + // 当滚动超过50%时显示固定按钮组 + const shouldShow = scrollPercentage >= 50 if (shouldShow !== showFixedButtons.value) { showFixedButtons.value = shouldShow console.log(shouldShow ? '🟢 显示固定按钮组' : '🔴 隐藏固定按钮组')