From a757b75163d77acc5111637fbe20ec61d895a72b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 11 八月 2021 23:15:29 +0800 Subject: [PATCH] 2021-08-11 --- src/components/qrcode/index.jsx | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/qrcode/index.jsx b/src/components/qrcode/index.jsx index da630b7..122a9b1 100644 --- a/src/components/qrcode/index.jsx +++ b/src/components/qrcode/index.jsx @@ -28,6 +28,7 @@ render() { const { value, card } = this.props let color = card.color + let size = card.qrWidth || 50 if (/rgb/ig.test(color)) { color = this.hexify(color) @@ -37,12 +38,12 @@ <div className="qrcode-box"> <QrCode value={value} - size={card.qrWidth || 50} + size={size} fgColor={color} imageSettings={card.url ? { src: card.url, - height: (card.qrWidth || 50) / 4, - width: (card.qrWidth || 50) / 4, + height: size / 5, + width: size / 5, excavate: true } : null}/> </div> -- Gitblit v1.8.0