@import "../../../../themes/t.cell.scss"; @import "../../common.scss"; .consult-wrapper { padding-bottom: 180rpx; &.consult-ended { padding-bottom: 0; } } .message-content { display: flex; justify-content: center; align-items: flex-start; // 改为 flex-start,避免影响内部元素 // min-height: 72rpx; font-size: 28rpx; color: #333; // Markdown 内容样式 .markdown-content { width: 100%; word-wrap: break-word; word-break: break-all; white-space: normal; line-height: 1.5; font-size: 28rpx; display: block; // 确保是块级元素 // 加粗和斜体样式 - 现在使用 span 标签 // span 标签默认就是行内元素,不需要额外设置 span { display: inline !important; white-space: normal !important; line-height: inherit !important; margin: 0 !important; padding: 0 !important; vertical-align: baseline; float: none !important; clear: none !important; } // 代码块样式 pre { background-color: #f5f5f5; padding: 16rpx; border-radius: 8rpx; overflow-x: auto; margin: 16rpx 0; } code { background-color: #f5f5f5; padding: 4rpx 8rpx; border-radius: 4rpx; font-family: 'Courier New', monospace; font-size: 24rpx; } pre code { background-color: transparent; padding: 0; } // 列表样式 ul { margin: 16rpx 0; padding-left: 40rpx; } li { margin: 8rpx 0; list-style-type: disc; // 确保列表项内的加粗文字不会换行 span { display: inline !important; } } // 换行处理 br { line-height: 1.5; } } } .message-image { width: 200rpx; height: 200rpx; border-radius: 16rpx; display: block; } .input-panel { position: fixed; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; padding: 16rpx 24rpx; box-sizing: border-box; z-index: 10; // 使用更平滑的过渡,避免位置变化时的跳动 transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94); will-change: bottom; } .chat-card { --avatar-size: 42px; .image-message, .text-message { max-width: calc(90% - var(--avatar-size)) !important; border-radius: 0px 10px 10px 10px !important; background-color: white; overflow: hidden; } &.right { .image-message, .text-message { border-radius: 10px 0px 10px 10px !important; } } } .action-bar { display: flex; justify-content: center; align-items: center; margin-bottom: 12rpx; gap: 24rpx; } .action-btn { display: inline-flex; align-items: center; padding: 0 24rpx; height:80rpx; line-height: 80rpx; border-radius: 12rpx; font-size: 30rpx; } .action-btn.secondary { color: black; } .action-btn.danger { color: #1d6ff6; } .action-text { margin-left: 8rpx; } .input-row { display: flex; align-items: flex-end; gap: 16rpx; } .text-input { flex: 1; width: 60% !important; min-height: 80rpx; max-height: 200rpx; padding: 12rpx 20rpx; background: #ffffff; border-radius: 12rpx; border: 1rpx solid #e6e6e6; color: #333333; font-size: 28rpx; line-height: 1.9; box-sizing: border-box; // 超过 max-height 后显示滚动条 overflow-y: scroll !important; overflow-x: hidden; // 启用平滑滚动(iOS 和部分 Android 支持) -webkit-overflow-scrolling: touch; // 平滑过渡,让高度变化更自然(类似微信) // 使用适中的过渡时间和缓动函数,平衡响应速度和平滑度 transition: height 0.2s ease-out; // 确保内容可以滚动和换行 word-wrap: break-word; word-break: break-all; // 优化滚动行为,避免突然跳动 scroll-behavior: smooth; } .send-btn { padding: 0 24rpx; height: 80rpx; line-height: 80rpx; background: #1d6ff6; color: #ffffff; border-radius: 12rpx; font-size: 28rpx; flex-shrink: 0; } .media-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: #ffffff; border-radius: 8rpx; padding: 0 20rpx; flex-shrink: 0; height:80rpx; margin: 0 5rpx; } .media-text { color: #1d6ff6; font-size: 24rpx; margin-top: 2rpx; } /* 系统消息样式 */ .system-wrapper { display: flex; flex-direction: column; align-items: center; margin: 6px 0; .title { padding: 4px 12px; font-size: 12px; color: #999999; border-radius: 5px; } .date { font-size: 12px; color: #999; margin-bottom: 6px; } } .chat-box { padding: 15rpx 0 15rpx 30rpx !important; }