From f77cc57cab0ef65ef344df5133e7a609009c8395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=AF=9A?= Date: Fri, 16 Jan 2026 12:27:00 +0800 Subject: [PATCH] 1 --- Web/src/views/StatisticsView.vue | 218 ++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 77 deletions(-) diff --git a/Web/src/views/StatisticsView.vue b/Web/src/views/StatisticsView.vue index c2dd97c..78844fc 100644 --- a/Web/src/views/StatisticsView.vue +++ b/Web/src/views/StatisticsView.vue @@ -228,95 +228,94 @@ image="search" /> - +
-
-

- 收入分类统计 -

- - {{ incomeCategoriesView.length }}类 - -
+ +
+
+

+ 收入 +

+ + {{ incomeCategoriesView.length }} + +
-
-
-
-
-
- {{ category.classify || '未分类' }} +
+
+
+
+
+ {{ category.classify || '未分类' }} +
+
+ {{ category.percent }}% +
+
+
+
+ ¥{{ formatMoney(category.amount) }} +
{{ category.count }}笔
-
-
- ¥{{ formatMoney(category.amount) }} -
-
- {{ category.percent }}% -
-
-
-
- -
-
-

- 不计收支分类统计 -

- - {{ noneCategoriesView.length }}类 - -
-
-
-
-
-
- {{ category.classify || '未分类' }} + +
+
+

+ 不计收支 +

+ + {{ noneCategoriesView.length }} + +
+ +
+
+
+
+
+ {{ category.classify || '未分类' }} +
+
+ {{ category.percent }}% +
+
+
+
+ ¥{{ formatMoney(category.amount) }} +
{{ category.count }}笔
-
-
- ¥{{ formatMoney(category.amount) }} -
-
- {{ category.percent }}% -
-
-
@@ -1805,4 +1804,69 @@ onBeforeUnmount(() => { :deep(.van-nav-bar) { background: transparent !important; } + +/* 并列显示卡片 */ +.side-by-side-cards { + display: flex; + gap: 12px; + margin: 0 12px 16px; +} + +.side-by-side-cards .common-card { + margin: 0; + flex: 1; + min-width: 0; /* 允许内部元素缩小 */ + padding: 12px; +} + +.side-by-side-cards .card-header { + margin-bottom: 12px; +} + +/* 紧凑模式列表项 */ +.category-item.compact { + flex-direction: column; + align-items: stretch; + gap: 6px; + padding: 10px 0; +} + +.compact-row { + display: flex; + justify-content: space-between; + align-items: center; + gap: 8px; +} + +.compact-row.top { + margin-bottom: 2px; +} + +.category-info-compact { + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + flex: 1; +} + +.text-ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 13px; +} + +/* 调整紧凑模式下的字体大小 */ +.compact-row .category-percent { + font-size: 12px; +} + +.compact-row .category-amount { + font-size: 14px; +} + +.compact-row .category-count { + font-size: 11px; +}