Files
leaudit-platform-frontend/app/styles/components/result-stats.css
T

238 lines
4.0 KiB
CSS

/**
* 结果统计组件样式
* 用于显示文档评审结果的多维度统计信息
*/
.result-stats-wrapper {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
}
.result-stat-item {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 8px;
border-radius: 4px;
font-size: 12px;
line-height: 1.5;
white-space: nowrap;
background-color: #f3f4f6;
border: 1px solid #e5e7eb;
}
.result-stat-item i {
font-size: 13px;
flex-shrink: 0;
}
.result-stat-item .stat-label {
font-weight: 500;
flex-shrink: 0;
color: #6b7280;
}
.result-stat-item .stat-content {
display: inline-flex;
align-items: center;
gap: 3px;
}
.result-stat-item .stat-value {
font-size: 13px;
font-weight: 600;
min-width: 16px;
text-align: center;
color: #374151;
}
.result-stat-item .stat-diff {
display: inline-flex;
align-items: center;
gap: 1px;
font-size: 11px;
padding: 1px 3px;
border-radius: 3px;
font-weight: 500;
}
.result-stat-item .stat-diff i {
font-size: 11px;
}
/* 可点击状态 */
.result-stat-item.clickable {
cursor: pointer;
transition: all 0.2s ease;
}
.result-stat-item.clickable:hover {
background-color: #e5e7eb;
border-color: #d1d5db;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 气泡框样式 */
.stat-popover {
min-width: 280px;
max-width: 400px;
background: white;
border: 1px solid #e5e7eb;
border-radius: 6px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
animation: popoverFadeIn 0.2s ease;
pointer-events: auto;
}
@keyframes popoverFadeIn {
from {
opacity: 0;
transform: translateX(-50%) translateY(-8px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
/* 箭头指示 */
.stat-popover::before {
content: '';
position: absolute;
top: -6px;
left: 50%;
width: 12px;
height: 12px;
background: white;
border-left: 1px solid #e5e7eb;
border-top: 1px solid #e5e7eb;
transform: translateX(-50%) rotate(45deg);
z-index: 1;
}
.stat-popover-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 2px 16px;
border-bottom: 1px solid #e5e7eb;
font-weight: 600;
font-size: 14px;
color: #374151;
position: relative;
z-index: 2;
background: white;
border-radius: 6px 6px 0 0;
}
.stat-popover-close {
background: none;
border: none;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
color: #9ca3af;
transition: color 0.2s;
}
.stat-popover-close:hover {
color: #374151;
}
.stat-popover-close i {
font-size: 16px;
}
.stat-popover-content {
padding: 8px;
max-height: 300px;
overflow-y: auto;
position: relative;
z-index: 2;
background: white;
border-radius: 0 0 6px 6px;
}
.stat-popover-item {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 8px;
font-size: 13px;
color: #4b5563;
line-height: 1.5;
border-radius: 4px;
transition: background-color 0.2s;
}
.stat-popover-item:hover {
background-color: #f9fafb;
}
.stat-popover-item i {
color: #9ca3af;
flex-shrink: 0;
margin-top: 2px;
font-size: 8px;
}
.stat-popover-item span {
flex: 1;
word-break: break-word;
}
.stat-popover-item .message-count {
color: #9ca3af;
font-size: 11px;
font-weight: 500;
margin-left: 4px;
}
/* 气泡框滚动条样式 */
.stat-popover-content::-webkit-scrollbar {
width: 6px;
}
.stat-popover-content::-webkit-scrollbar-track {
background: #f3f4f6;
border-radius: 3px;
}
.stat-popover-content::-webkit-scrollbar-thumb {
background: #d1d5db;
border-radius: 3px;
}
.stat-popover-content::-webkit-scrollbar-thumb:hover {
background: #9ca3af;
}
/* 响应式布局 */
@media (max-width: 768px) {
.result-stats-wrapper {
gap: 4px;
}
.result-stat-item {
padding: 2px 6px;
font-size: 11px;
}
.result-stat-item i {
font-size: 12px;
}
.result-stat-item .stat-value {
font-size: 12px;
}
.result-stat-item .stat-diff {
font-size: 10px;
}
}