/* 用户头像组件样式 - 深色适配 */ .user-avatar { position: relative; display: inline-block; overflow: hidden; } /* 尺寸样式 */ .user-avatar.small { width: 60rpx; height: 60rpx; } .user-avatar.medium { width: 80rpx; height: 80rpx; } .user-avatar.large { width: 120rpx; height: 120rpx; } .user-avatar.xlarge { width: 160rpx; height: 160rpx; } /* 形状样式 */ .user-avatar.circle { border-radius: 50%; border: 3rpx solid rgba(22,119,255,0.35); } .user-avatar.rounded { border-radius: 12rpx; } .user-avatar.square { border-radius: 0; } /* 头像图片 */ .avatar-image { width: 100%; height: 100%; display: block; } /* 在线状态指示器 */ .status-indicator { position: absolute; bottom: 0; right: 0; width: 20rpx; height: 20rpx; border-radius: 50%; border: 3rpx solid #1a1a1a; z-index: 1; } .status-indicator.online { background-color: #52c41a; box-shadow: 0 0 6rpx rgba(82,196,26,0.5); } .status-indicator.offline { background-color: #555555; } .status-indicator.busy { background-color: #faad14; box-shadow: 0 0 6rpx rgba(250,173,20,0.5); } .status-indicator.away { background-color: #1677FF; box-shadow: 0 0 6rpx rgba(22,119,255,0.5); } /* 徽章 */ .badge { position: absolute; top: -10rpx; right: -10rpx; background: linear-gradient(135deg, #ff4d4f, #cf1322); color: white; border-radius: 50%; min-width: 32rpx; height: 32rpx; display: flex; align-items: center; justify-content: center; font-size: 20rpx; font-weight: bold; padding: 0 8rpx; z-index: 2; box-shadow: 0 4rpx 12rpx rgba(255,77,79,0.4); } .badge-text { font-size: 20rpx; line-height: 1; } /* 加载遮罩 - 深色 */ .loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(26,26,26,0.85); display: flex; align-items: center; justify-content: center; z-index: 3; } .loading-spinner { width: 40rpx; height: 40rpx; border: 4rpx solid #2a2a2a; border-top: 4rpx solid #1677FF; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 默认头像样式 */ .user-avatar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, #1677FF 0%, #0958d9 100%); z-index: -1; } .user-avatar.error::before { background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%); }