fix:修复统计组件icon 移动端和桌面端布局不合理
This commit is contained in:
1 parent
6d363ae64e
commit
d10ae77fd3
1 file changed
+22
-10
@@ -14,7 +14,16 @@
|
||||
<div class="stats-section">
|
||||
<div class="stats-card" v-for="stat in statsData" :key="stat.id">
|
||||
<div class="stat-icon">
|
||||
<div class="icon-circle"></div>
|
||||
<div class="icon-circle">
|
||||
<svg class="stat-icon-svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path v-if="stat.id === 1" d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z" fill="currentColor"/>
|
||||
<path v-else-if="stat.id === 2" d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="currentColor"/>
|
||||
<path v-else-if="stat.id === 3" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/>
|
||||
<path v-else-if="stat.id === 4" d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" fill="currentColor"/>
|
||||
<path v-else-if="stat.id === 5" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" fill="currentColor"/>
|
||||
<path v-else="stat.id === 6" d="M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zM4 18v-1c0-1.1.9-2 2-2h2.5c.91 0 1.73.35 2.35.95C11.85 15.35 12.09 15 12.5 15H15c1.1 0 2 .9 2 2v1h3v-6H4v6z" fill="currentColor"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-value">{{ stat.value }}</div>
|
||||
@@ -270,6 +279,12 @@ const recentData = [
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.stat-icon-svg {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,10 +321,10 @@ const recentData = [
|
||||
}
|
||||
}
|
||||
|
||||
// 内容区域
|
||||
// 内容区域 - 默认上下布局,充满屏幕宽度
|
||||
.content-section {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
@@ -408,12 +423,7 @@ const recentData = [
|
||||
}
|
||||
}
|
||||
|
||||
// 响应式设计
|
||||
@media (max-width: 1200px) {
|
||||
.content-section {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
// 响应式设计已在默认样式中设置为上下布局
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.stats-section {
|
||||
@@ -438,11 +448,13 @@ const recentData = [
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
// 图表和表格区域保持上下布局(已在默认样式中设置)
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.stats-section {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.recent-table {
|
||||
|
||||
Reference in new issue
Block a user