优化调整bug与加密

This commit is contained in:
24kycj
2026-01-11 01:06:02 +08:00
parent f4aef8abaa
commit c26c4fa66e
19 changed files with 124 additions and 966 deletions
+5 -4
View File
@@ -54,7 +54,7 @@ window.display_func = function display_func(img1, img2, img3) {
$("#component_type").text(language_str("bg"));//"背景"
canvas1.discardActiveObject().renderAll();
canvas2.discardActiveObject().renderAll();
// 保存所有对象的 selectable 和 evented 状态,确保预览后能恢复
const objStates1 = [];
const objStates2 = [];
@@ -74,7 +74,7 @@ window.display_func = function display_func(img1, img2, img3) {
};
}
});
// 过滤掉辅助线
let _objs1 = canvas1.getObjects().filter(obj => !obj.isGuideLine);
let g1 = [];
@@ -399,7 +399,7 @@ window.display_func = function display_func(img1, img2, img3) {
// 只处理打印
printJS({ printable: printPath, type: 'image', style: 'img { width: 100%; height: auto; }' })
},
end: function() {
end: function () {
// 预览窗口关闭后,恢复所有对象的 selectable 和 evented 状态
canvas1.getObjects().forEach((obj, index) => {
if (!obj.isGuideLine && objStates1[index]) {
@@ -1033,7 +1033,8 @@ window.regenerateQrCodesAndBarcodes = function regenerateQrCodesAndBarcodes(canv
margin: 0,
lineColor: objMeta.color || '#000000',
fontSize: objMeta.fontSize || 18,
font: objMeta.font || 'Arial'
font: objMeta.font || 'Arial',
displayValue: !objMeta.show
});
const barcode = document.getElementById('barcode');
const bar = barcode.toDataURL("image/png");