From 2ce22f05383b324bf67497c85568145df97f0df1 Mon Sep 17 00:00:00 2001 From: "zhang.bin87@byd.com" Date: Thu, 4 Jan 2024 17:35:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E6=9D=A1=E5=BD=A2?= =?UTF-8?q?=E7=A0=81=E8=AE=BE=E7=BD=AE=E6=9D=A1=E7=A0=81=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hiprint/hiprint.bundle.js | 34 ++++++++++++++++++++++++++++++++-- src/hiprint/hiprint.config.js | 3 +++ src/i18n/cn.json | 3 ++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/hiprint/hiprint.bundle.js b/src/hiprint/hiprint.bundle.js index 21b53ec..8da8848 100644 --- a/src/hiprint/hiprint.bundle.js +++ b/src/hiprint/hiprint.bundle.js @@ -4270,6 +4270,34 @@ var hiprint = function (t) { this.target.remove(); }, t; }(), + + barColor = function () { + function t() { + this.name = "barColor"; + } + + return t.prototype.css = function (t, e) { + if (t && t.length) { + // if (e) return t.css("background-color", e), "background-color:" + e; + // t[0].style.backgroundColor = ""; + } + + return null; + }, t.prototype.createTarget = function () { + return this.target = $(`
\n
\n ${i18n.__('条码颜色')}\n
\n
\n \n
\n
`), this.target; + }, t.prototype.getValue = function () { + var t = this.target.find("input").val(); + if (t) return t.toString(); + }, t.prototype.setValue = function (t) { + this.target.find("input").minicolors({ + defaultValue: t || "", + theme: "bootstrap" + }), this.target.find("input").val(t); + }, t.prototype.destroy = function () { + this.target.remove(); + }, t; + }(), + it = function () { function t() { this.name = "orient"; @@ -5177,7 +5205,7 @@ var hiprint = function (t) { t.init(), t.printElementOptionItems[e.name] = e; }, t.getItem = function (e) { return t.init(), t.printElementOptionItems[e]; - }, t._printElementOptionItems = [new fontFamily(), new r(), new a(), new p(), new i(), new s(), new l(), new pt(), new u(), new d(), new c(), new h(), new f(), new g(), new m(), new d2(), new c2(), new v(), new y(), new b(), new E(), new qrCodeLevel(), new T(), new P(), new _(), new w(), new x(), new coordinate(), new widthHeight(), new C(), new imageFit(), new O(), new H(), new D(), new paperNumberContinue(), new watermarkOptions(), new I(), new R(), new pageBreak(), new M(), new M2(), new S(), new B(), new F(), new L(), new A(), new z(), new k(), new st(), new N(), new V(), new W(), new j(), new U(), new borderRadius(), new zIndex(), new K(), new G(), new q(), new X(), new Y(), new Q(), new J(), new Z(), new tt(), new et(), new nt(), new it(), new ot(),new textWrap(), new at(), new lt(), new panelLayoutOptions(), new ut(), new ith(), new dt(), new ct(), new ht(), new ft(), new gt(), new mt(), new rowcolumns(), new rowsColumnsMergeClean(), new groupFieldsFormatter(), new groupFormatter(), new groupFooterFormatter(), new vt(), new yt(), new bt(), new Tt(), new Et(), new Pt(), new stylerHeader(), new renderFormatter(), new _t(), new wt(), new maxRows(), new xt(), new tableColumnH(), new tableE(), new tableQRCodeLevel(), new tablept(), new tableSummaryTitle(), new tableSummaryText(), new tableSummaryColspan(), new tableSummary(), new tableSummaryAlign(), new tableSummaryNumFormat(), new tableSummaryFormatter(), new upperCase(), new barcodeType(), new qrcodeType()], t; + }, t._printElementOptionItems = [new fontFamily(), new r(), new a(), new p(), new i(), new s(), new l(), new pt(), new u(), new d(), new c(), new h(), new f(), new g(), new m(), new d2(), new c2(), new v(), new y(), new b(), new E(), new qrCodeLevel(), new T(), new P(), new _(), new w(), new x(), new coordinate(), new widthHeight(), new C(), new imageFit(), new O(), new H(), new D(), new paperNumberContinue(), new watermarkOptions(), new I(), new R(), new pageBreak(), new M(), new M2(), new S(), new B(), new F(), new L(), new A(), new z(), new k(), new st(), new N(), new V(), new W(), new j(), new U(), new borderRadius(), new zIndex(), new K(), new G(), new q(), new X(), new Y(), new Q(), new J(), new Z(), new tt(), new et(), new nt(), new it(), new ot(),new textWrap(), new at(), new lt(), new panelLayoutOptions(), new ut(), new ith(), new dt(), new ct(), new ht(), new ft(), new gt(), new mt(), new rowcolumns(), new rowsColumnsMergeClean(), new groupFieldsFormatter(), new groupFormatter(), new groupFooterFormatter(), new vt(), new yt(), new bt(), new Tt(), new Et(), new Pt(), new stylerHeader(), new renderFormatter(), new _t(), new wt(), new maxRows(), new xt(), new tableColumnH(), new tableE(), new tableQRCodeLevel(), new tablept(), new tableSummaryTitle(), new tableSummaryText(), new tableSummaryColspan(), new tableSummary(), new tableSummaryAlign(), new tableSummaryNumFormat(), new tableSummaryFormatter(), new upperCase(), new barcodeType(), new qrcodeType(),new barColor()], t; }(); }, function (t, e, n) { "use strict"; @@ -9058,7 +9086,8 @@ var hiprint = function (t) { scale: 1, width: parseInt(o.a.pt.toPx(this.options.getWidth()) / 2.835), height: parseInt(height / 2.835), - includetext: false + includetext: false, + barcolor: this.options.barColor || "#000", }) content.html($(barcode)) if (!this.options.hideTitle) { @@ -9997,6 +10026,7 @@ var hiprint = function (t) { o = t.customOptionsInput; var tabs = i.getPrintElementOptionTabs(); e.clearSettingContainer(); + var r; if (tabs.length) { r = $('
'); diff --git a/src/hiprint/hiprint.config.js b/src/hiprint/hiprint.config.js index 02676ac..49dc00f 100644 --- a/src/hiprint/hiprint.config.js +++ b/src/hiprint/hiprint.config.js @@ -1845,6 +1845,9 @@ }, { name: 'fixed', hidden: false + },{ + name: 'barColor', + hidden: false }] }, { name: '样式', diff --git a/src/i18n/cn.json b/src/i18n/cn.json index acbb561..6fb437e 100644 --- a/src/i18n/cn.json +++ b/src/i18n/cn.json @@ -246,5 +246,6 @@ "排列方式": "排列方式", "垂直间距%s": "垂直间距%s", "水平间距%s": "水平间距%s", - "边框圆角": "边框圆角" + "边框圆角": "边框圆角", + "条码颜色": "条码颜色" } -- Gitee