From 441510a4e48eca9883bad7c147c29fc8cf2f6959 Mon Sep 17 00:00:00 2001 From: yanran200830 Date: Mon, 21 Oct 2024 18:10:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=B7=E5=BC=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/print-lock.css | 25 ++++++++++++++++++++++++- public/index.html | 1 + src/components/print/customProvider.js | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/public/css/print-lock.css b/public/css/print-lock.css index fb55568..2523ed9 100644 --- a/public/css/print-lock.css +++ b/public/css/print-lock.css @@ -351,5 +351,28 @@ table.hiprint-printElement-tableTarget { .temuBarCode { display: flex; flex-direction: column; - padding: 1pt 3pt; + justify-content: space-between; + align-items: center; + width: 100%; + height: 100%; + padding: 10pt 10pt; + border: 1pt solid #000; +} + +.temuBarCode-code { + width: 100%; + height: 100%; +} + +.temuBarCode-top, +.temuBarCode-bottom { + display: flex; + align-items: center; + justify-content: space-between; + width: 90%; +} + +.temuBarCode-middle { + width: 80%; + height: 60%; } diff --git a/public/index.html b/public/index.html index f3256a9..afdd596 100644 --- a/public/index.html +++ b/public/index.html @@ -21,6 +21,7 @@ } .temuBarCode-code { + width: 100%; height: 100%; } diff --git a/src/components/print/customProvider.js b/src/components/print/customProvider.js index d29ce14..3c061dd 100644 --- a/src/components/print/customProvider.js +++ b/src/components/print/customProvider.js @@ -15,8 +15,8 @@ export const customProvider = function (options) { $('body').append('') console.log(options.width * 0.8) - JsBarcode('#'+ elId, '1234567890', { - format: "code128", + JsBarcode('#'+ elId, '96778555251', { + format: "CODE128", width: 2, height: options.height * 0.6, margin: 0,