debugger
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 8s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s

This commit is contained in:
孙诚
2026-01-12 17:56:58 +08:00
parent a41c2b79af
commit c07c9dd07d
2 changed files with 32 additions and 19 deletions

View File

@@ -564,13 +564,13 @@ public class BudgetService(
else else
{ {
description.Append(""" description.Append("""
<table style="width: 100%; table-layout: fixed;"> <table>
<thead> <thead>
<tr> <tr>
<th style="width: 40%;"></th> <th">名称</th>
<th style="width: 20%;"></th> <th">金额</th>
<th style="width: 20%;"></th> <th">折算</th>
<th style="width: 20%;"></th> <th">合计</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -579,10 +579,10 @@ public class BudgetService(
{ {
description.Append($""" description.Append($"""
<tr> <tr>
<td style="width: 40%;">{item.Name}</td> <td>{item.Name}</td>
<td style="width: 20%;">{item.Limit:N0}</td> <td>{item.Limit:N0}</td>
<td style="width: 20%;">{item.Factor:0.##}</td> <td>{item.Factor:0.##}</td>
<td style="width: 20%;"><span class='income-value'>{item.Total:N0}</span></td> <td><span class='income-value'>{item.Total:N0}</span></td>
</tr> </tr>
"""); """);
} }
@@ -595,13 +595,13 @@ public class BudgetService(
else else
{ {
description.Append(""" description.Append("""
<table style="width: 100%; table-layout: fixed;"> <table>
<thead> <thead>
<tr> <tr>
<th style="width: 40%;"></th> <th></th>
<th style="width: 20%;"></th> <th></th>
<th style="width: 20%;"></th> <th></th>
<th style="width: 20%;"></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -610,10 +610,10 @@ public class BudgetService(
{ {
description.Append($""" description.Append($"""
<tr> <tr>
<td style="width: 40%;">{item.Name}</td> <td>{item.Name}</td>
<td style="width: 20%;">{item.Limit:N0}</td> <td>{item.Limit:N0}</td>
<td style="width: 20%;">{item.Factor:0.##}</td> <td>{item.Factor:0.##}</td>
<td style="width: 20%;"><span class='expense-value'>{item.Total:N0}</span></td> <td><span class='expense-value'>{item.Total:N0}</span></td>
</tr> </tr>
"""); """);
} }

View File

@@ -72,7 +72,6 @@
.rich-html-content tbody { .rich-html-content tbody {
display: table; display: table;
width: 100%; width: 100%;
min-width: 400px; /* 确保窄屏下有足够宽度触发滚动 */
table-layout: fixed; /* 核心:强制列宽分配逻辑一致 */ table-layout: fixed; /* 核心:强制列宽分配逻辑一致 */
} }
@@ -99,6 +98,20 @@
font-weight: 600; font-weight: 600;
} }
.rich-html-content th:nth-child(1),
.rich-html-content td:nth-child(1) {
width: 40%;
}
.rich-html-content th:nth-child(2),
.rich-html-content td:nth-child(2),
.rich-html-content th:nth-child(3),
.rich-html-content td:nth-child(3),
.rich-html-content th:nth-child(4),
.rich-html-content td:nth-child(4) {
width: 20%;
}
/* 业务特定样式:收入、支出、高亮 */ /* 业务特定样式:收入、支出、高亮 */
.rich-html-content .income-value { .rich-html-content .income-value {
color: #07c160 !important; color: #07c160 !important;