样式调整
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 9s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-12 16:58:51 +08:00
parent a8da1c6a70
commit 5cac4d6dde
3 changed files with 29 additions and 15 deletions

View File

@@ -563,10 +563,28 @@ public class BudgetService(
if (incomeItems.Count == 0) description.Append("<p>无收入预算</p>");
else
{
description.Append("<table><thead><tr><th>名称</th><th>金额</th><th>折算</th><th>合计</th></tr></thead><tbody>");
description.Append("""
<table>
<thead>
<tr>
<th style="width: 40%;"></th>
<th style="width: 20%;"></th>
<th style="width: 20%;"></th>
<th style="width: 20%;"></th>
</tr>
</thead>
<tbody>
""");
foreach (var item in incomeItems)
{
description.Append($"<tr><td>{item.Name}</td><td>{item.Limit:N0}</td><td>x{item.Factor:0.##}</td><td><span class='income-value'>{item.Total:N0}</span></td></tr>");
description.Append($"""
<tr>
<td style="width: 40%;">{item.Name}</td>
<td style="width: 20%;">{item.Limit:N0}</td>
<td style="width: 20%;">{item.Factor:0.##}</td>
<td style="width: 20%;"><span class='income-value'>{item.Total:N0}</span></td>
</tr>
""");
}
description.Append("</tbody></table>");
}
@@ -590,7 +608,14 @@ public class BudgetService(
""");
foreach (var item in expenseItems)
{
description.Append($"<tr><td>{item.Name}</td><td>{item.Limit:N0}</td><td>x{item.Factor:0.##}</td><td><span class='expense-value'>{item.Total:N0}</span></td></tr>");
description.Append($"""
<tr>
<td style="width: 40%;">{item.Name}</td>
<td style="width: 20%;">{item.Limit:N0}</td>
<td style="width: 20%;">{item.Factor:0.##}</td>
<td style="width: 20%;"><span class='expense-value'>{item.Total:N0}</span></td>
</tr>
""");
}
description.Append("</tbody></table>");
}

View File

@@ -93,17 +93,6 @@
text-overflow: ellipsis;
}
/* 针对第一列“名称”分配更多空间,其余平分 */
.rich-html-content th:first-child,
.rich-html-content td:first-child {
width: 30%;
}
.rich-html-content th:not(:first-child),
.rich-html-content td:not(:first-child) {
width: 20%;
}
.rich-html-content th {
background: var(--van-gray-1);
color: var(--van-text-color);

View File

@@ -111,7 +111,7 @@ var fsql = new FreeSqlBuilder()
.UseMonitorCommand(
cmd =>
{
Log.Debug("执行SQL: {Sql}", cmd.CommandText);
Log.Verbose("执行SQL: {Sql}", cmd.CommandText);
}
)
.Build();