更正前端内容

This commit is contained in:
2026-01-09 11:58:09 +08:00
parent db263f21c6
commit 40a4f381c7
2 changed files with 158 additions and 4 deletions

View File

@@ -235,10 +235,6 @@ export default {
font-weight: bold;
}
.label-cell {
/* font-weight: bold; */
}
/* 生产日期跨3列 */
.date-colspan {
grid-column: span 3; /* 占据3列 */
@@ -275,4 +271,99 @@ export default {
background: transparent;
text-align: center;
}
/* 打印样式 - 强制单页适配180mm x 100mm纸张 */
@media print {
@page {
size: 180mm 100mm;
margin: 0;
padding: 0;
}
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
body {
margin: 0;
padding: 0;
}
.label-container {
width: 180mm;
height: 100mm;
max-width: 180mm;
max-height: 100mm;
padding: 2mm;
margin: 0;
page-break-inside: avoid;
break-inside: avoid;
page-break-after: avoid;
break-after: avoid;
page-break-before: avoid;
break-before: avoid;
overflow: hidden;
box-sizing: border-box;
font-size: 10px;
transform-origin: top left;
}
.company-header {
margin-bottom: 1mm;
}
.company-logo {
width: 12mm;
height: 12mm;
margin-right: 2mm;
}
.company-name {
font-size: 2.5mm;
}
.title {
font-size: 5mm;
}
.english-name {
font-size: 1.5mm;
}
.info-grid {
margin-bottom: 1mm;
}
.info-grid-item {
padding: 0.5mm;
font-size: 2.2mm;
height: 5mm;
min-height: 5mm;
}
.footer-info {
font-size: 1.8mm;
margin-top: 1mm;
}
.address {
font-size: 1.8mm;
}
.english-address {
font-size: 1.6mm;
}
.contact-timestamp {
font-size: 1.8mm;
}
/* 确保二维码在打印时正确显示 */
.contact-timestamp img,
.contact-timestamp canvas {
max-width: 15mm;
max-height: 15mm;
}
}
</style>

View File

@@ -133,4 +133,67 @@ export default {
background: transparent;
text-align: center;
}
/* 打印样式 - 强制单页适配180mm x 100mm纸张 */
@media print {
@page {
size: 180mm 100mm;
margin: 0;
padding: 0;
}
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
body {
margin: 0;
padding: 0;
}
.material-label-container {
width: 180mm;
height: 100mm;
max-width: 180mm;
max-height: 100mm;
padding: 2mm;
margin: 0;
page-break-inside: avoid;
break-inside: avoid;
page-break-after: avoid;
break-after: avoid;
page-break-before: avoid;
break-before: avoid;
overflow: hidden;
box-sizing: border-box;
font-size: 10px;
transform-origin: top left;
}
.material-label-table {
width: 100%;
height: 100%;
font-size: 2.5mm;
}
.material-label-table td {
padding: 1mm;
font-size: 2.5mm;
height: auto;
min-height: 8mm;
}
.label-cell {
background-color: #f5f5f5 !important;
font-weight: bold;
}
/* 确保二维码在打印时正确显示 */
.value-cell img,
.value-cell canvas {
max-width: 10mm;
max-height: 10mm;
}
}
</style>