From 2d4117f738d40d8ebb26e033ff61378a201c6c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=93=E8=8D=92?= Date: Sat, 30 Dec 2023 16:04:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=90=8Erefresh=E6=96=B9=E6=B3=95=E5=8F=82?= =?UTF-8?q?=E6=95=B0real=E5=B1=9E=E6=80=A7=E6=97=A0=E6=95=88=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=B8=8D=E4=BC=9A=E6=89=A7=E8=A1=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hiprint/hiprint.bundle.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hiprint/hiprint.bundle.js b/src/hiprint/hiprint.bundle.js index be847610..e485cdbb 100644 --- a/src/hiprint/hiprint.bundle.js +++ b/src/hiprint/hiprint.bundle.js @@ -54,7 +54,7 @@ import vImg from "./css/image/v_img.svg"; import {jsPDF} from "jspdf"; import html2canvas from "html2canvas"; // 数字转中文,大写,金额 -import Nzh from "nzh/dist/nzh.min.js" +import Nzh from "nzh/dist/nzh.min.js"; // 解析svg 到 canvas, 二维码条形码需要 import Canvg from 'canvg'; // 默认自定义拖拽列表 @@ -3460,7 +3460,7 @@ var hiprint = function (t) { }, t.prototype.updateEl = function (width, height, opt, cb) { if (opt) { var ratio, w, h; - if (opt || opt.auto) { + if (opt && opt.auto) { if (width >= height) { opt.width = true; } else { @@ -3488,9 +3488,8 @@ var hiprint = function (t) { this.el.designTarget.css('height', h + "pt"); } this.el.designTarget.children('.resize-panel').trigger($.Event('click')); - } else { - cb && cb(this.el, width, height); } + cb && cb(this.el, width, height); }, t.prototype.destroy = function () { this.target.remove(); }, t; From 2701a7606f63bacf307e1bbfc7e2f4578d8d330c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=93=E8=8D=92?= Date: Sat, 30 Dec 2023 16:06:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?updateOption=E6=96=B9=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=85=83=E7=B4=A0=E6=A0=B7=E5=BC=8F=E5=90=8E=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=E5=8F=B3=E4=BE=A7=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=AF=B9=E5=BA=94=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hiprint/hiprint.bundle.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hiprint/hiprint.bundle.js b/src/hiprint/hiprint.bundle.js index e485cdbb..2a92579a 100644 --- a/src/hiprint/hiprint.bundle.js +++ b/src/hiprint/hiprint.bundle.js @@ -881,6 +881,14 @@ var hiprint = function (t) { hinnn.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "参数修改"); } } + this._printElementOptionTabs.forEach(tab=>{ + tab.list.forEach(item=>{ + if(item.name === o){ + item.target.find('select')?.val(v.toString()) + item.target.find('input')?.val(v.toString()) + } + }) + }); } catch (e) { console.log('updateOption error', e) }