diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 42a61e6..ac730d1 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -4184,9 +4184,18 @@ _handleStreamError(msg) { } /* #ifdef H5 */ - /* H5 用户消息气泡加大内边距,文字大小保持不变 */ - .user-message .message-bubble { - padding: 36rpx 60rpx !important; + /* H5 用户【纯文字】消息气泡: 气泡要明显比文字大(与小程序一致) + - 内边距加大 -> 气泡比文字大, 文字与气泡边缘留出间距 + - 宽度 auto + inline-block -> 气泡宽度贴着内容, 不拉满整行 + - 只调整气泡自身, 气泡内文字字号不变 + - 用 :not() 排除图片/配文/文件/视频/音频气泡, 避免影响它们原有的紧凑样式 */ + .user-message .message-content .message-bubble:not(.user-image-bubble):not(.image-caption-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) { + padding: 10rpx 30rpx !important; + border-radius: 16rpx !important; + display: inline-block !important; + width: auto !important; + max-width: 100% !important; + text-align: left !important; } /* #endif */ @@ -4975,10 +4984,25 @@ _handleStreamError(msg) { } } - /* 用户消息气泡: 保持浅灰气泡 + 加大内边距(文字大小不变), 覆盖上面的 padding:0 */ - .user-message .message-content .message-bubble { - padding: 36rpx 60rpx !important; + /* 用户消息气泡: 覆盖上面的 padding:0 + - H5: 气泡要明显比文字大(与小程序一致), 只改气泡, 不改文字字号; + 用 :not() 排除图片/配文/文件/视频/音频气泡 + - 小程序: 保持原有浅灰气泡 + 加大内边距(不动) */ + /* #ifdef H5 */ + .user-message .message-content .message-bubble:not(.user-image-bubble):not(.image-caption-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) { + padding: 20rpx 40rpx !important; + border-radius: 16rpx !important; + display: inline-block !important; + width: auto !important; + max-width: 100% !important; + text-align: left !important; } + /* #endif */ + /* #ifndef H5 */ + .user-message .message-content .message-bubble { + padding: 20rpx 40rpx !important; + } + /* #endif */ } } }