tjh/merge #3
@@ -1514,25 +1514,6 @@ $radius-lg: 36rpx;
|
||||
min-width: 0;
|
||||
width: 0; /* 添加这个属性防止flex元素溢出 */
|
||||
|
||||
.message-nickname {
|
||||
font-size: 24rpx;
|
||||
color: $color-text-light;
|
||||
margin-bottom: 8rpx;
|
||||
letter-spacing: 0.5rpx;
|
||||
// 用户昵称右对齐,AI昵称左对齐
|
||||
&:not(.ai-message .message-nickname) {
|
||||
text-align: right;
|
||||
}
|
||||
// AI昵称专属样式 - 左移到气泡上方
|
||||
&.ai-nickname {
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
align-self: flex-start;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.message-bubble {
|
||||
padding: 24rpx 32rpx;
|
||||
max-width: 100%;
|
||||
@@ -1952,6 +1933,28 @@ $radius-lg: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 关键修复:拆分 .message-nickname 样式 ========== */
|
||||
.message-nickname {
|
||||
font-size: 24rpx;
|
||||
color: $color-text-light;
|
||||
margin-bottom: 8rpx;
|
||||
letter-spacing: 0.5rpx;
|
||||
}
|
||||
|
||||
/* 用户昵称:右对齐 */
|
||||
.user-message .message-nickname {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* AI 昵称:使用 .ai-nickname 类控制 */
|
||||
.ai-nickname {
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
align-self: flex-start;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
/* 用户消息特有样式 */
|
||||
.user-message {
|
||||
flex-direction: row-reverse;
|
||||
@@ -1963,19 +1966,19 @@ $radius-lg: 36rpx;
|
||||
|
||||
.message-bubble {
|
||||
background: #c4e0ff !important; /* 浅蓝色 */
|
||||
color: black !important;
|
||||
border-radius: 16rpx 16rpx 4rpx 16rpx; /* 右对齐气泡尖角适配 */
|
||||
box-shadow: 0 8rpx 20rpx rgba(196, 224, 255, 0.3) !important;
|
||||
border: none !important;
|
||||
/* ✅ 关键:允许内容撑开高度 */
|
||||
min-height: auto;
|
||||
height: auto;
|
||||
padding: 24rpx 32rpx; /* 保留内边距 */
|
||||
display: inline-block; /* 让宽度也随内容收缩(可选) */
|
||||
max-width: 80%; /* 防止过宽 */
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap; /* 保留用户输入的换行符 */
|
||||
line-height: 1.6;
|
||||
color: black !important;
|
||||
border-radius: 16rpx 16rpx 4rpx 16rpx; /* 右对齐气泡尖角适配 */
|
||||
box-shadow: 0 8rpx 20rpx rgba(196, 224, 255, 0.3) !important;
|
||||
border: none !important;
|
||||
/* ✅ 关键:允许内容撑开高度 */
|
||||
min-height: auto;
|
||||
height: auto;
|
||||
padding: 24rpx 32rpx; /* 保留内边距 */
|
||||
display: inline-block; /* 让宽度也随内容收缩(可选) */
|
||||
max-width: 80%; /* 防止过宽 */
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap; /* 保留用户输入的换行符 */
|
||||
line-height: 1.6;
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -2017,18 +2020,18 @@ $radius-lg: 36rpx;
|
||||
|
||||
.message-bubble {
|
||||
background: white !important; /* 白色 */
|
||||
color: black !important;
|
||||
border-radius: 16rpx 16rpx 16rpx 4rpx; /* 左对齐气泡尖角适配 */
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1) !important;
|
||||
border: 1rpx solid #e0e0e0 !important;
|
||||
color: black !important;
|
||||
border-radius: 16rpx 16rpx 16rpx 4rpx; /* 左对齐气泡尖角适配 */
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1) !important;
|
||||
border: 1rpx solid #e0e0e0 !important;
|
||||
min-height: auto;
|
||||
height: auto;
|
||||
padding: 24rpx 32rpx;
|
||||
display: inline-block;
|
||||
max-width: 80%;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.6;
|
||||
height: auto;
|
||||
padding: 24rpx 32rpx;
|
||||
display: inline-block;
|
||||
max-width: 80%;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.6;
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -2136,10 +2139,10 @@ $radius-lg: 36rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
text-align: center; /* 兼容多端文字居中 */
|
||||
white-space: nowrap; /* 强制文字单行横向显示 */
|
||||
line-height: 1; /* 重置行高,避免文字垂直偏移 */
|
||||
top:-10px;
|
||||
text-align: center; /* 兼容多端文字居中 */
|
||||
white-space: nowrap; /* 强制文字单行横向显示 */
|
||||
line-height: 1; /* 重置行高,避免文字垂直偏移 */
|
||||
top: -10px;
|
||||
|
||||
&.disabled {
|
||||
background-color: $color-primary-light;
|
||||
|
||||
Reference in New Issue
Block a user