From 33d1553908b4fe6feea8d23024806c099f35f23a Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 6 Apr 2023 17:09:04 +0800 Subject: [PATCH] fix: qrcode size error, close #6418 --- components/qrcode/QRCodeCanvas.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {