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.
 
 

182 lines
2.8 KiB

.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
background-color: #f5f5f5;
padding-top: 0;
}
/* 消息类型切换 */
.message-tabs {
display: flex;
background-color: #ffffff;
border-bottom: 1rpx solid #eeeeee;
width: 100%;
box-sizing: border-box;
}
.tab-item {
flex: 1;
text-align: center;
padding: 28rpx 0;
font-size: 32rpx;
color: #666666;
position: relative;
}
.tab-item.active {
color: #07c160;
font-weight: 500;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 40%;
width: 20%;
height: 4rpx;
background-color: #07c160;
}
/* 清除未读提示 */
.clear-unread {
display: flex;
justify-content: flex-end;
padding: 20rpx 30rpx;
background-color: #ffffff;
box-sizing: border-box;
width: 100%;
}
.clear-btn {
font-size: 28rpx;
color: #1677ff;
}
/* 消息列表 */
.message-list {
flex: 1;
padding-bottom: 30rpx;
overflow-y: auto;
}
/* 提示消息 */
.message-tips {
text-align: center;
padding: 20rpx 0;
margin-bottom: 20rpx;
color: #999999;
font-size: 28rpx;
}
/* 消息项 */
.message-item {
display: flex;
padding: 24rpx 30rpx;
background-color: #ffffff;
position: relative;
}
/* 添加底部边框线,模仿微信分隔线 */
.message-item::after {
content: '';
position: absolute;
left: 150rpx;
right: 0;
bottom: 0;
height: 1rpx;
background-color: #f0f0f0;
}
/* 头像 */
.message-avatar {
width: 100rpx;
height: 100rpx;
border-radius: 8rpx;
background-color: #07c160;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
position: relative;
overflow: hidden;
}
/* 未读消息红点 */
.unread-dot {
position: absolute;
top: -6rpx;
right: -6rpx;
width: 28rpx;
height: 28rpx;
border-radius: 14rpx;
background-color: #ff3b30;
border: 2rpx solid #ffffff;
}
.avatar-icon {
font-size: 40rpx;
color: #ffffff;
font-weight: 500;
}
/* 消息内容 */
.message-content {
flex: 1;
display: flex;
flex-direction: column;
padding: 6rpx 0;
}
.message-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
}
.message-name {
font-size: 32rpx;
color: #000000;
font-weight: 500;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-time {
font-size: 24rpx;
color: #999999;
margin-left: 12rpx;
}
.message-text {
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 未读消息文本样式 */
.message-text.unread {
color: #000000;
font-weight: 500;
}
/* 空状态样式 */
.empty-state {
display: flex;
justify-content: center;
align-items: center;
padding: 100rpx 0;
color: #999999;
}
.empty-text {
font-size: 32rpx;
color: #999999;
}