标签防御: height:fit-content+maxHeight物理切断+12px小字号防重叠

This commit is contained in:
2026-08-06 11:02:16 +08:00
parent 5f7b8e9394
commit 49c8707955

View File

@ -343,31 +343,35 @@ export default function CreateProductDialog({ open, onClose, onCreated }: Props)
/* ---- 成功页 ---- */
<div className="py-4">
<div id="label-print-area" style={{
display: "flex", flexDirection: "column", width: "100%", maxWidth: 360,
margin: "0 auto", padding: 12, boxSizing: "border-box", background: "#fff",
fontFamily: "'Helvetica Neue', Helvetica, Arial, sans-serif",
border: "1px solid #e5e7eb", borderRadius: 8
display: 'flex', flexDirection: 'column', width: '100%', maxWidth: '360px',
margin: '0 auto', padding: '12px', boxSizing: 'border-box', background: '#fff',
fontFamily: 'monospace, "Helvetica Neue", Helvetica, sans-serif',
border: '1px solid #e5e7eb', height: 'fit-content'
}}>
<div style={{ display: "flex", flexDirection: "row", alignItems: "flex-start", gap: 12, width: "100%" }}>
<div style={{ flex: "0 0 110px", width: 110, height: 110 }}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'flex-start', gap: '12px', width: '100%' }}>
<div style={{ flex: '0 0 110px', width: '110px', height: '110px' }}>
<img src={`/api/v1/products/qrcode/${createdSn}`} alt="QR"
style={{ width: "100%", height: "100%", objectFit: "contain", display: "block" }} />
style={{ width: '100%', height: '100%', objectFit: 'contain', display: 'block' }} />
</div>
<div style={{ flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 6 }}>
<div style={{ fontSize: 14, fontWeight: 900, color: "#000", lineHeight: 1.2, wordBreak: "break-all",
display: "-webkit-box", WebkitBoxOrient: "vertical", WebkitLineClamp: 3, overflow: "hidden" }}>
<div style={{ flex: 1, minWidth: 0, display: 'flex', flexDirection: 'column', gap: '6px' }}>
<div style={{ fontSize: '12px', fontWeight: 900, color: '#000', lineHeight: '1.4',
wordBreak: 'break-all', display: '-webkit-box', WebkitLineClamp: 3,
WebkitBoxOrient: 'vertical', overflow: 'hidden', maxHeight: '50px' }}>
: {selected?.material_name ?? ""}
</div>
<div style={{ fontSize: 14, fontWeight: 900, color: "#000", lineHeight: 1.2, wordBreak: "break-all" }}>
<div style={{ fontSize: '12px', fontWeight: 900, color: '#000', lineHeight: '1.2',
wordBreak: 'break-all', overflow: 'hidden', maxHeight: '30px' }}>
: {selected?.spec_model ?? ""}
</div>
<div style={{ fontSize: 14, fontWeight: 900, color: "#000", lineHeight: 1.2, wordBreak: "break-all" }}>
<div style={{ fontSize: '12px', fontWeight: 900, color: '#000', lineHeight: '1.2',
wordBreak: 'break-all', overflow: 'hidden', maxHeight: '30px' }}>
: {orderNo || "—"}
</div>
</div>
</div>
<div style={{ width: "100%", marginTop: 12, paddingTop: 8, borderTop: "2px solid #000",
textAlign: "center", fontSize: 18, fontWeight: 900, color: "#000", letterSpacing: 1 }}>
<div style={{ width: '100%', marginTop: '12px', paddingTop: '8px',
borderTop: '2px solid #000', textAlign: 'center', fontSize: '16px',
fontWeight: 900, color: '#000', letterSpacing: '1px' }}>
: {createdSn}
</div>
</div>