You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

161 lines
2.5 KiB

.container {
background-color: #f0f0f0;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.chat-header {
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 0;
border-bottom: 1rpx solid #e8e8e8;
position: sticky;
top: 0;
z-index: 100;
width: 100%;
}
.header-back, .header-more {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: bold;
}
.header-info {
flex: 1;
text-align: center;
}
.header-name {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.chat-content {
flex: 1;
padding: 20rpx 20rpx 120rpx 20rpx; /* 增加底部padding,避免被输入框遮挡 */
overflow-y: auto;
}
.chat-messages {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.message-item {
display: flex;
align-items: flex-end;
gap: 16rpx;
max-width: 100%;
}
.message-item.other {
flex-direction: row;
}
.message-item.me {
flex-direction: row-reverse;
}
.avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
}
.avatar image {
width: 100%;
height: 100%;
}
.message-bubble {
max-width: 70%;
padding: 16rpx 24rpx;
border-radius: 20rpx;
position: relative;
}
.message-item.other .message-bubble {
background-color: #fff;
border-bottom-left-radius: 8rpx;
}
.message-item.me .message-bubble {
background-color: #92E3A9;
border-bottom-right-radius: 8rpx;
}
.message-content {
display: block;
font-size: 28rpx;
color: #333;
line-height: 1.5;
word-wrap: break-word;
}
.message-item.me .message-content {
color: #000;
}
.message-time {
display: block;
font-size: 22rpx;
color: #999;
text-align: right;
margin-top: 8rpx;
}
.chat-input-area {
background-color: #fff;
display: flex;
align-items: center;
padding: 16rpx 24rpx;
border-top: 1rpx solid #e8e8e8;
gap: 20rpx;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 100;
}
.message-input {
flex: 1;
background-color: #f5f5f5;
border-radius: 28rpx;
padding: 16rpx 24rpx;
font-size: 28rpx;
color: #333;
min-height: 56rpx;
max-height: 200rpx;
overflow-y: auto;
}
.send-button {
background-color: #FF6B81;
color: #fff;
font-size: 28rpx;
font-weight: bold;
padding: 16rpx 32rpx;
border-radius: 28rpx;
border: none;
min-width: 120rpx;
text-align: center;
line-height: normal;
height: auto;
}
.send-button:hover {
background-color: #FF526D;
}