Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改两个地方 #85

Merged
merged 2 commits into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/hiprint/hiprint.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
// 默认自定义拖拽列表
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -3460,7 +3468,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 {
Expand Down Expand Up @@ -3488,9 +3496,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;
Expand Down