BOM零件打印纸张 大小调整

This commit is contained in:
Ledo 2025-08-04 15:31:18 +08:00
parent 762641d122
commit 5bab5bb12f

View File

@ -47,7 +47,7 @@ const onPrint = () => {
<head> <head>
<style> <style>
@page { @page {
size: 45mm 30mm; size: 60mm 40mm;
margin: 0; margin: 0;
} }
body { body {
@ -59,8 +59,8 @@ const onPrint = () => {
print-color-adjust: exact; print-color-adjust: exact;
} }
.qr-page { .qr-page {
width: 45mm; width: 60mm;
height: 30mm; height: 40mm;
padding: 2mm; padding: 2mm;
box-sizing: border-box; box-sizing: border-box;
font-family: monospace; font-family: monospace;
@ -69,7 +69,7 @@ const onPrint = () => {
color: black !important; color: black !important;
} }
.code-line, .name-line { .code-line, .name-line {
font-size: 11px; font-size: 14px;
margin-bottom: 1mm; margin-bottom: 1mm;
} }
@ -99,11 +99,11 @@ const onPrint = () => {
bottom: 2mm; bottom: 2mm;
left: 2mm; left: 2mm;
right: 2mm; right: 2mm;
height: 17mm; height: 22mm;
} }
.qr-container { .qr-container {
width: 17mm; width: 22mm;
height: 17mm; height: 22mm;
margin-left: auto; margin-left: auto;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
@ -122,13 +122,13 @@ const onPrint = () => {
margin-right: 1mm; margin-right: 1mm;
} }
.quantity { .quantity {
font-size: 11px; font-size: 14px;
margin-bottom: 0.5mm; margin-bottom: 0.5mm;
margin-top:2mm; margin-top:2mm;
white-space: nowrap; white-space: nowrap;
} }
.timestamp { .timestamp {
font-size: 5px; font-size: 6px;
line-height: 1; line-height: 1;
margin-top: auto; margin-top: auto;
white-space: nowrap; white-space: nowrap;
@ -226,8 +226,8 @@ defineExpose({ open })
<style scoped lang="scss"> <style scoped lang="scss">
/* 预览样式 - 仅用于屏幕显示 */ /* 预览样式 - 仅用于屏幕显示 */
.page { .page {
width: 45mm; width: 60mm;
min-height: 30mm; min-height: 40mm;
margin: auto; margin: auto;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
background-color: white; background-color: white;