Update App.jsx via upload script - 2026-08-31 15:12:53

This commit is contained in:
mike 2026-08-31 15:13:03 +08:00
parent f68261869d
commit 86cf280c9a
1 changed files with 7 additions and 1 deletions

View File

@ -1789,6 +1789,10 @@ const Styles = () => (
.doc-table th { background: #2d2d2d; color: #fff; text-align: left; padding: 9px 12px; font-size: 12.5px; font-weight: 600; }
.doc-table th.num, .doc-table td.num { text-align: right; }
.doc-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 13px; vertical-align: top; }
/* PDFhtml2canvas
排版分页引擎光靠CSS的page-break-inside在它身上不完全可靠所以这里的CSS规则要配合下面
html2pdf调用里显式的 pagebreak: { avoid: ['tr'] } 一起生效两边双保险 */
.doc-table tr { break-inside: avoid; page-break-inside: avoid; }
.doc-totals { width: 240px; margin-left: auto; font-size: 13px; }
.doc-totals-row { display: flex; justify-content: space-between; padding: 4px 0; color: #666; }
.doc-totals-row.total { font-weight: 700; color: #222; border-top: 1px solid #ddd; margin-top: 4px; padding-top: 8px; }
@ -2737,7 +2741,7 @@ function MainApp({ username, onLogout }) {
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
pagebreak: { mode: ['css'], before: '.spec-sheet-page-break' },
pagebreak: { mode: ['css'], before: '.spec-sheet-page-break', avoid: ['tr', 'img'] },
}).from(el).save();
} catch (e) {
notify('导出PDF失败请重试');
@ -3055,6 +3059,7 @@ function MainApp({ username, onLogout }) {
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
pagebreak: { mode: ['css'], avoid: ['tr', 'img'] },
}).from(el).save();
} catch (e) {
notify('导出PDF失败请重试');
@ -3158,6 +3163,7 @@ function MainApp({ username, onLogout }) {
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
pagebreak: { mode: ['css'], avoid: ['tr', 'img'] },
}).from(el).save();
} catch (e) {
notify('导出PDF失败请重试');