From b50846067924c2a19a9738e20f547c75d41429dd Mon Sep 17 00:00:00 2001 From: wangdongbo <949818794@qq.com> Date: Wed, 11 Feb 2026 17:07:11 +0800 Subject: [PATCH 1/9] no message --- pages/message/chat.scss | 42 +++++++++++++++---------- pages/message/components/chat-input.vue | 5 +-- pages/message/index.vue | 38 +++++++++++++++------- 3 files changed, 55 insertions(+), 30 deletions(-) diff --git a/pages/message/chat.scss b/pages/message/chat.scss index 320ab16..d97865b 100644 --- a/pages/message/chat.scss +++ b/pages/message/chat.scss @@ -6,13 +6,16 @@ $text-color-sub: #999; $primary-color: #0877F1; .chat-page { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; display: flex; flex-direction: column; - height: 100vh; background-color: #f5f5f5; overflow: hidden; - position: relative; - width: 100%; + transition: padding-bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94); } /* 患者信息栏样式 - 固定在顶部 */ @@ -24,10 +27,8 @@ $primary-color: #0877F1; background: #fff; border-bottom: 1rpx solid #f0f0f0; padding: 20rpx 32rpx; - z-index: 100; - flex-shrink: 0; /* 防止被压缩 */ - width: 100%; - box-sizing: border-box; + z-index: 10; + flex-shrink: 0; } .patient-info-content { @@ -91,15 +92,15 @@ $primary-color: #0877F1; } .chat-content { - flex: 1; + position: fixed; + top: 100rpx; /* 患者信息栏高度,根据实际调整 */ + left: 0; + right: 0; + bottom: 120rpx; /* 输入框高度,根据实际调整 */ box-sizing: border-box; overflow-x: hidden; overflow-y: auto; - min-height: 0; - margin-top: 120rpx; - margin-bottom: 0; - position: relative; - z-index: 1; + transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94); } .chat-content-compressed { @@ -364,18 +365,24 @@ $primary-color: #0877F1; } .input-section { + position: fixed; + bottom: 0; + left: 0; + right: 0; background: #fff; border-top: 1rpx solid #e0e0e0; - position: relative; z-index: 200; - padding-bottom: env(safe-area-inset-bottom); flex-shrink: 0; + transform: translateZ(0); /* 开启硬件加速,提升性能 */ + transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94); + will-change: bottom; } .input-toolbar { display: flex; align-items: center; - padding: 16rpx 20rpx; + padding: 12rpx 20rpx; + padding-bottom: env(safe-area-inset-bottom); gap: 12rpx; } @@ -499,7 +506,8 @@ $primary-color: #0877F1; justify-content: flex-start; background: #fff; border-top: 1rpx solid #eee; - padding: 20rpx 0 40rpx 60rpx; + padding: 20rpx 0 20rpx 60rpx; + padding-bottom: env(safe-area-inset-bottom); gap: 40rpx 50rpx; flex-wrap: wrap; background-color: #f5f5f5; diff --git a/pages/message/components/chat-input.vue b/pages/message/components/chat-input.vue index fb83473..4cee741 100644 --- a/pages/message/components/chat-input.vue +++ b/pages/message/components/chat-input.vue @@ -1,5 +1,5 @@