290 lines
5.0 KiB
CSS
290 lines
5.0 KiB
CSS
/* 消息项样式 */
|
|
.chat-message {
|
|
margin-bottom: 20px;
|
|
animation: fadeInUp 0.3s ease-out;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* 消息卡片 */
|
|
.message-card {
|
|
max-width: 85%;
|
|
word-wrap: break-word;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-left: auto;
|
|
margin-right: 15px;
|
|
/* 用户消息离右边远一点 */
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-right: auto;
|
|
margin-left: 15px;
|
|
/* AI响应离左边远一点 */
|
|
}
|
|
|
|
.message-card.assistant .ant-card {
|
|
background-color: #a4e2ad;
|
|
}
|
|
|
|
.message-card.assistant .ant-card .ant-card-body {
|
|
background-color: #a4e2ad;
|
|
}
|
|
|
|
/* Card组件圆角调整 */
|
|
.message-card .ant-card {
|
|
border-radius: 20px !important;
|
|
/* 增加圆角度 */
|
|
}
|
|
|
|
.message-card .ant-card .ant-card-body {
|
|
border-radius: 20px !important;
|
|
/* 确保body也有圆角 */
|
|
min-height: 20px !important;
|
|
/* 设置最小高度 */
|
|
padding: 12px 16px !important;
|
|
/* 调整内边距 - 减少上下内边距 */
|
|
display: block !important;
|
|
/* 改为block布局,移除flex */
|
|
line-height: 1.4 !important;
|
|
/* 减少行高 */
|
|
}
|
|
|
|
/* 流式文本效果 */
|
|
.streaming-text {
|
|
position: relative;
|
|
}
|
|
|
|
.streaming-text::after {
|
|
content: '';
|
|
/* 移除光标 */
|
|
animation: blink 1s infinite;
|
|
color: #1890ff;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
@keyframes blink {
|
|
|
|
0%,
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
|
|
51%,
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* 消息动画 */
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* 响应指示器 */
|
|
.responding-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #6b7280;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 反馈按钮容器 */
|
|
.feedback-buttons {
|
|
margin-top: 12px;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* 消息反馈按钮 */
|
|
.message-feedback {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.message-copy-btn {
|
|
color: #52c41a !important;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.message-copy-btn:hover {
|
|
color: #00684a !important;
|
|
background: rgba(0, 104, 74, 0.1) !important;
|
|
}
|
|
|
|
.message-copy-btn.copied {
|
|
color: #00684a !important;
|
|
}
|
|
|
|
.feedback-actions-right {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.message-feedback .ant-btn {
|
|
color: #8c8c8c;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.message-feedback .ant-btn:hover {
|
|
color: #52c41a;
|
|
background: rgba(24, 144, 255, 0.1);
|
|
}
|
|
|
|
.message-feedback .feedback-active-like {
|
|
color: #52c41a !important;
|
|
}
|
|
|
|
.message-feedback .feedback-active-like:hover {
|
|
color: #52c41a !important;
|
|
background: rgba(82, 196, 26, 0.1);
|
|
}
|
|
|
|
.message-feedback .feedback-active-dislike {
|
|
color: #ff4d4f !important;
|
|
}
|
|
|
|
.message-feedback .feedback-active-dislike:hover {
|
|
color: #ff4d4f !important;
|
|
background: rgba(255, 77, 79, 0.1);
|
|
}
|
|
|
|
/* 建议问题 */
|
|
.suggested-questions {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.question-button {
|
|
margin-bottom: 8px;
|
|
margin-right: 8px;
|
|
white-space: normal;
|
|
height: auto;
|
|
padding: 8px 12px;
|
|
text-align: left;
|
|
border: 1px solid #d1d5db;
|
|
background: #f9fafb;
|
|
color: #374151;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.question-button:hover {
|
|
border-color: #1890ff;
|
|
background: #f0f9ff;
|
|
color: #1890ff;
|
|
}
|
|
|
|
/* 消息时间戳 */
|
|
.message-timestamp {
|
|
font-size: 12px;
|
|
color: #9ca3af;
|
|
margin-top: 8px;
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* 消息图片 */
|
|
.message-images {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.message-images .ant-image {
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 1200px) {
|
|
.message-card {
|
|
max-width: 90%;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-left: 20px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.message-card {
|
|
max-width: 95%;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-left: 15px;
|
|
}
|
|
|
|
.message-card .ant-card .ant-card-body {
|
|
padding: 10px 14px !important;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.feedback-buttons {
|
|
margin-top: 8px;
|
|
gap: 6px;
|
|
}
|
|
|
|
.question-button {
|
|
padding: 6px 10px;
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.message-card {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.message-card .ant-card .ant-card-body {
|
|
padding: 8px 12px !important;
|
|
font-size: 13px;
|
|
line-height: 1.3 !important;
|
|
}
|
|
|
|
.message-timestamp {
|
|
font-size: 11px;
|
|
margin-top: 6px;
|
|
gap: 8px;
|
|
}
|
|
|
|
.suggested-questions {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.question-button {
|
|
margin-bottom: 6px;
|
|
margin-right: 6px;
|
|
padding: 5px 8px;
|
|
font-size: 12px;
|
|
}
|
|
} |