修复:StatCard 数值溢出问题

- 添加 title 属性,鼠标悬停时显示完整数值
- 添加 truncate 类防止数值溢出
- 优化长数值的显示效果
This commit is contained in:
wucm667
2026-02-13 15:59:30 +08:00
parent c7b42148a5
commit be56a282f2
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
<p class="stat-label truncate">{{ title }}</p> <p class="stat-label truncate">{{ title }}</p>
<div class="mt-1 flex items-baseline gap-2"> <div class="mt-1 flex items-baseline gap-2">
<p class="stat-value">{{ formattedValue }}</p> <p class="stat-value" :title="String(formattedValue)">{{ formattedValue }}</p>
<span v-if="change !== undefined" :class="['stat-trend', trendClass]"> <span v-if="change !== undefined" :class="['stat-trend', trendClass]">
<Icon <Icon
v-if="changeType !== 'neutral'" v-if="changeType !== 'neutral'"

View File

@@ -243,7 +243,7 @@
} }
.stat-value { .stat-value {
@apply text-2xl font-bold text-gray-900 dark:text-white; @apply text-2xl font-bold text-gray-900 dark:text-white truncate;
} }
.stat-label { .stat-label {