diff --git a/components/qrcode/QRCodeCanvas.tsx b/components/qrcode/QRCodeCanvas.tsx index 6ef45fe17..787c89946 100644 --- a/components/qrcode/QRCodeCanvas.tsx +++ b/components/qrcode/QRCodeCanvas.tsx @@ -240,7 +240,7 @@ export const QRCodeCanvas = defineComponent({ return () => { const size = props.size ?? DEFAULT_SIZE; - const canvasStyle = { height: size, width: size }; + const canvasStyle = { height: `${size}px`, width: `${size}px` }; let img = null; if (imgSrc.value != null) {