fix: 修复DetailedAnalysisReport中嵌套LazyColumn导致的崩溃
- 将DetailedAnalysisReport中的LazyColumn改为Column - 移除所有item{}包装,直接使用普通组件布局 - 解决'Vertically scrollable component was measured with an infinity maximum height constraints'错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
74cc6f36a9
commit
562617ca11
@ -54,12 +54,11 @@ fun DetailedAnalysisReport(
|
||||
val totalIncome = incomeRecords.sumOf { it.amount }
|
||||
val totalExpense = expenseRecords.sumOf { it.amount }
|
||||
|
||||
LazyColumn(
|
||||
Column(
|
||||
modifier = modifier,
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||
) {
|
||||
// 时间范围标题
|
||||
item {
|
||||
Card(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
|
||||
@ -76,11 +75,9 @@ fun DetailedAnalysisReport(
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 支出分类详情
|
||||
if (expenseByCategory.isNotEmpty()) {
|
||||
item {
|
||||
CategoryDetailCard(
|
||||
title = "支出分类明细",
|
||||
categoryData = expenseByCategory,
|
||||
@ -89,11 +86,9 @@ fun DetailedAnalysisReport(
|
||||
currencyFormatter = currencyFormatter
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 收入分类详情
|
||||
if (incomeByCategory.isNotEmpty()) {
|
||||
item {
|
||||
CategoryDetailCard(
|
||||
title = "收入分类明细",
|
||||
categoryData = incomeByCategory,
|
||||
@ -102,11 +97,9 @@ fun DetailedAnalysisReport(
|
||||
currencyFormatter = currencyFormatter
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 分类占比前5名
|
||||
if (expenseByCategory.isNotEmpty()) {
|
||||
item {
|
||||
TopCategoriesCard(
|
||||
title = "支出TOP5",
|
||||
categoryData = expenseByCategory.take(5),
|
||||
@ -117,7 +110,6 @@ fun DetailedAnalysisReport(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类详情卡片
|
||||
|
Loading…
Reference in New Issue
Block a user