/* 聊天容器 */ .chat-container { width: 100%; height: 100vh; display: flex; background-color: #f5f5f5; } /* 左侧聊天列表 */ .chat-list { width: 100%; height: 100%; display: flex; flex-direction: column; } /* 搜索框 */ .search-bar { padding: 10rpx 20rpx; background-color: #fff; border-bottom: 1rpx solid #e5e5e5; } .search-input { width: 100%; height: 60rpx; background-color: #f5f5f5; border-radius: 30rpx; padding: 0 30rpx; font-size: 28rpx; color: #333; } /* 聊天列表滚动区域 */ .chat-scroll-view { flex: 1; overflow-y: auto; } /* 聊天项 */ .chat-item { display: flex; align-items: flex-start; padding: 20rpx; background-color: #fff; border-bottom: 1rpx solid #f0f0f0; transition: background-color 0.2s; } .chat-item:active { background-color: #f8f8f8; } /* 头像容器 */ .avatar-container { position: relative; margin-right: 20rpx; } /* 头像 */ .avatar { width: 80rpx; height: 80rpx; border-radius: 50%; border: 2rpx solid #eee; } /* 未读消息提示 */ .unread-dot { position: absolute; top: 0; right: 0; width: 24rpx; height: 24rpx; background-color: #ff4444; border-radius: 50%; border: 4rpx solid #fff; } /* 聊天信息 */ .chat-info { flex: 1; min-width: 0; } /* 聊天头部信息 */ .chat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8rpx; } /* 名称 */ .name { font-size: 32rpx; font-weight: 500; color: #333; } /* 时间 */ .time { font-size: 24rpx; color: #999; } /* 聊天内容 */ .chat-content { display: flex; align-items: center; } /* 最后一条消息 */ .last-message { font-size: 28rpx; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } /* 空状态 */ .empty-state { display: flex; justify-content: center; align-items: center; height: 100vh; padding: 0 40rpx; } .empty-text { font-size: 28rpx; color: #999; text-align: center; }