From 72dd57581dedcb2a11b3d025e1c46afe3bcf8a15 Mon Sep 17 00:00:00 2001 From: Ilia Miheev Date: Sun, 21 Jun 2026 00:51:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BC=D0=B5=D0=BD=D1=8C=D1=88=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=82=D1=81=D1=82=D1=83=D0=BF=D1=8B=20=D1=83=20?= =?UTF-8?q?qr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/composables/useQrCode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/useQrCode.js b/src/composables/useQrCode.js index 53a5137..6996b61 100644 --- a/src/composables/useQrCode.js +++ b/src/composables/useQrCode.js @@ -2,6 +2,7 @@ import { ref, nextTick } from 'vue' import QRCode from 'qrcode' const BASE_QR_SIZE = 256 +const QR_MARGIN = 1 const MAX_WIDTH_RATIO = 0.8 const MIN_SCALE = 0.5 const SCALE_STEP = 0.1 @@ -40,7 +41,7 @@ export function useQrCode() { if (!canvas || !userText) return const width = Math.round(BASE_QR_SIZE * scale.value) - await QRCode.toCanvas(canvas, userText, { width }) + await QRCode.toCanvas(canvas, userText, { width, margin: QR_MARGIN }) qrDataUrl.value = canvas.toDataURL('image/png') }