vg-print 1.0.232 → 1.0.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +86 -1
- package/dist/style.css +1 -1
- package/dist/vg-print.es.js +208 -129
- package/dist/vg-print.umd.js +6 -6
- package/package.json +1 -1
package/dist/vg-print.es.js
CHANGED
|
@@ -30624,7 +30624,7 @@ const defaultOption = {
|
|
|
30624
30624
|
id: "watermark",
|
|
30625
30625
|
// 水印id
|
|
30626
30626
|
watch: !1,
|
|
30627
|
-
content: "
|
|
30627
|
+
content: "vg-print",
|
|
30628
30628
|
// 水印内容
|
|
30629
30629
|
container: ".hiprint-printPaper",
|
|
30630
30630
|
// 水印容器
|
|
@@ -30644,7 +30644,7 @@ const defaultOption = {
|
|
|
30644
30644
|
// 水印文字颜色
|
|
30645
30645
|
rotate: 25,
|
|
30646
30646
|
// 水印文字旋转角度
|
|
30647
|
-
timestamp: !
|
|
30647
|
+
timestamp: !0,
|
|
30648
30648
|
// 是否显示时间戳
|
|
30649
30649
|
format: "YYYY-MM-DD HH:mm",
|
|
30650
30650
|
// 时间戳格式
|
|
@@ -55309,7 +55309,7 @@ var i18n$1 = {
|
|
|
55309
55309
|
}, gr.prototype.getValue = function() {
|
|
55310
55310
|
let ar = {
|
|
55311
55311
|
content: this.content.find("input").val(),
|
|
55312
|
-
fillStyle: this.fillStyle.find("input").val() || "rgba(
|
|
55312
|
+
fillStyle: this.fillStyle.find("input").val() || "rgba(87, 13, 248, 0.5)",
|
|
55313
55313
|
fontSize: parseInt(this.fontSize.find("input").val() || "14") + "px",
|
|
55314
55314
|
rotate: parseInt(this.rotate.find("input").val() || "25"),
|
|
55315
55315
|
width: parseInt(this.width.find("input").val() || "200"),
|
|
@@ -55319,7 +55319,7 @@ var i18n$1 = {
|
|
|
55319
55319
|
};
|
|
55320
55320
|
return Object.assign({}, this.options, ar);
|
|
55321
55321
|
}, gr.prototype.setValue = function(ar) {
|
|
55322
|
-
this.options = ar, this.content.find("input").val(ar.content || ""), this.fillStyle.find("input").val(ar.fillStyle || "rgba(
|
|
55322
|
+
this.options = ar, this.content.find("input").val(ar.content || ""), this.fillStyle.find("input").val(ar.fillStyle || "rgba(87, 13, 248, 0.5)"), this.fillStyle.find("input").minicolors({
|
|
55323
55323
|
format: "rgb",
|
|
55324
55324
|
opacity: !0,
|
|
55325
55325
|
theme: "bootstrap"
|
|
@@ -65480,7 +65480,7 @@ ${i18n$1.__("转大小写")}
|
|
|
65480
65480
|
}
|
|
65481
65481
|
};
|
|
65482
65482
|
})();
|
|
65483
|
-
const version = "1.0.
|
|
65483
|
+
const version = "1.0.301";
|
|
65484
65484
|
let autoConnect = function(Ie) {
|
|
65485
65485
|
console.log("autoConnect"), window.autoConnect = !0, window.hiwebSocket && window.hiwebSocket.hasIo() && window.hiwebSocket.start(Ie);
|
|
65486
65486
|
}, disAutoConnect = function() {
|
|
@@ -65491,28 +65491,95 @@ let autoConnect = function(Ie) {
|
|
|
65491
65491
|
je || disAutoConnect();
|
|
65492
65492
|
let Be = Ie.prototype || Ie.config.globalProperties;
|
|
65493
65493
|
Be[Ae] = hiprint, Be.$print = function(Ee = defaultElementTypeProvider, Se, ...Te) {
|
|
65494
|
-
hiprint.init({
|
|
65495
|
-
|
|
65496
|
-
});
|
|
65497
|
-
var Pe = new hiprint.PrintTemplate({
|
|
65498
|
-
template: Se
|
|
65499
|
-
});
|
|
65494
|
+
hiprint.init({ providers: [new Ee()] });
|
|
65495
|
+
const Pe = createTemplate(Se);
|
|
65500
65496
|
return Pe.print(...Te), Pe;
|
|
65501
65497
|
}, Be.$print2 = function(Ee = defaultElementTypeProvider, Se, ...Te) {
|
|
65502
|
-
hiprint.init({
|
|
65503
|
-
|
|
65504
|
-
});
|
|
65505
|
-
var Pe = new hiprint.PrintTemplate({
|
|
65506
|
-
template: Se
|
|
65507
|
-
});
|
|
65498
|
+
hiprint.init({ providers: [new Ee()] });
|
|
65499
|
+
const Pe = createTemplate(Se);
|
|
65508
65500
|
return Pe.print2(...Te), Pe;
|
|
65509
65501
|
};
|
|
65510
65502
|
}
|
|
65511
65503
|
};
|
|
65512
65504
|
hiprint.version = version;
|
|
65505
|
+
hiprint._authKey = "";
|
|
65506
|
+
function _b64ToBytes(Ie) {
|
|
65507
|
+
const Ae = String(Ie || ""), je = typeof atob == "function" ? atob(Ae) : Buffer.from(Ae, "base64").toString("binary"), Be = new Uint8Array(je.length);
|
|
65508
|
+
for (let Ee = 0; Ee < je.length; Ee++) Be[Ee] = je.charCodeAt(Ee);
|
|
65509
|
+
return Be;
|
|
65510
|
+
}
|
|
65511
|
+
function _strToBytes(Ie) {
|
|
65512
|
+
return new TextEncoder().encode(String(Ie || ""));
|
|
65513
|
+
}
|
|
65514
|
+
hiprint.decryptAuthKey = async function(Ie, Ae = {}, je = {}) {
|
|
65515
|
+
if (!(typeof window < "u" && window.crypto && window.crypto.subtle)) return null;
|
|
65516
|
+
try {
|
|
65517
|
+
const Be = Ae && Ae.b64 ? _b64ToBytes(Ae.b64) : _strToBytes(Ae.raw || ""), Ee = je && je.b64 ? _b64ToBytes(je.b64) : _strToBytes(je.raw || ""), Se = await window.crypto.subtle.importKey("raw", Be, { name: "AES-GCM" }, !1, ["decrypt"]), Te = _b64ToBytes(Ie), Pe = await window.crypto.subtle.decrypt({ name: "AES-GCM", iv: Ee }, Se, Te);
|
|
65518
|
+
return new TextDecoder().decode(Pe);
|
|
65519
|
+
} catch {
|
|
65520
|
+
return null;
|
|
65521
|
+
}
|
|
65522
|
+
};
|
|
65523
|
+
hiprint.register = async function(Ie = {}) {
|
|
65524
|
+
const Ae = Ie && Ie.authKey ? String(Ie.authKey) : "";
|
|
65525
|
+
let je = Ae;
|
|
65526
|
+
if (Ae)
|
|
65527
|
+
try {
|
|
65528
|
+
let Ee;
|
|
65529
|
+
try {
|
|
65530
|
+
const Se = _b64ToBytes(Ae);
|
|
65531
|
+
Ee = new TextDecoder().decode(Se);
|
|
65532
|
+
} catch {
|
|
65533
|
+
}
|
|
65534
|
+
if (Ee)
|
|
65535
|
+
try {
|
|
65536
|
+
const Se = JSON.parse(Ee);
|
|
65537
|
+
let Te = !0;
|
|
65538
|
+
if (Se && Se.exp && typeof Se.exp == "number" && Date.now() > Se.exp && (Te = !1), Se && Se.aud) {
|
|
65539
|
+
const Pe = String(Se.aud), De = typeof window < "u" && window.location && window.location.host ? window.location.host : "";
|
|
65540
|
+
Pe !== "*" && De && Pe && Pe !== De && (Te = !1);
|
|
65541
|
+
}
|
|
65542
|
+
je = Te ? Se.k ? String(Se.k) : "1" : "";
|
|
65543
|
+
} catch {
|
|
65544
|
+
je = Ee;
|
|
65545
|
+
}
|
|
65546
|
+
} catch {
|
|
65547
|
+
}
|
|
65548
|
+
if (hiprint._authKey = je, (Array.isArray(Ie.plugins) ? Ie.plugins : []).forEach(function(Ee) {
|
|
65549
|
+
try {
|
|
65550
|
+
if (!Ee) return;
|
|
65551
|
+
typeof Ee == "function" ? Ee(hiprint) : typeof Ee.install == "function" && Ee.install(hiprint);
|
|
65552
|
+
} catch {
|
|
65553
|
+
}
|
|
65554
|
+
}), Ie && Ie.authKeyEncrypted) {
|
|
65555
|
+
const Ee = Ie.aesKeyB64 ? { b64: Ie.aesKeyB64 } : { raw: Ie.aesKey || "" }, Se = Ie.aesIvB64 ? { b64: Ie.aesIvB64 } : { raw: Ie.aesIv || "" };
|
|
65556
|
+
let Te = await hiprint.decryptAuthKey(Ie.authKeyEncrypted, Ee, Se);
|
|
65557
|
+
if (!Te)
|
|
65558
|
+
try {
|
|
65559
|
+
const Pe = _b64ToBytes(Ie.authKeyEncrypted);
|
|
65560
|
+
Te = new TextDecoder().decode(Pe);
|
|
65561
|
+
} catch {
|
|
65562
|
+
}
|
|
65563
|
+
if (Te) {
|
|
65564
|
+
let Pe = !1;
|
|
65565
|
+
try {
|
|
65566
|
+
const De = JSON.parse(Te);
|
|
65567
|
+
if (De && De.exp && typeof De.exp == "number" && Date.now() <= De.exp && (Pe = !0), De && De.aud) {
|
|
65568
|
+
const Ue = String(De.aud), He = typeof window < "u" && window.location && window.location.host ? window.location.host : "";
|
|
65569
|
+
Ue !== "*" && He && Ue && Ue !== He && (Pe = !1);
|
|
65570
|
+
}
|
|
65571
|
+
Pe && (hiprint._authKey = De.k ? String(De.k) : "1");
|
|
65572
|
+
} catch {
|
|
65573
|
+
Te && Te.length && (hiprint._authKey = Te);
|
|
65574
|
+
}
|
|
65575
|
+
}
|
|
65576
|
+
}
|
|
65577
|
+
};
|
|
65513
65578
|
window.hiprint = hiprint;
|
|
65514
65579
|
function createTemplate(Ie, Ae = {}) {
|
|
65515
|
-
|
|
65580
|
+
hiprint.init({ providers: [new defaultElementTypeProvider()] });
|
|
65581
|
+
const je = hiprint._authKey ? void 0 : { content: "vg-print", timestamp: !0 }, Be = { ...Ae };
|
|
65582
|
+
return Be.watermarkOptions || (Be.watermarkOptions = je), new hiprint.PrintTemplate({ template: Ie, ...Be });
|
|
65516
65583
|
}
|
|
65517
65584
|
function getHtml(Ie, Ae) {
|
|
65518
65585
|
const Be = (Ie && typeof Ie.getHtml == "function" ? Ie : createTemplate(Ie)).getHtml(Ae);
|
|
@@ -79120,117 +79187,120 @@ b`.split(/\n/).length != 3 ? function(Fe) {
|
|
|
79120
79187
|
});
|
|
79121
79188
|
}(codemirror)), codemirror.exports;
|
|
79122
79189
|
}
|
|
79123
|
-
|
|
79124
|
-
|
|
79125
|
-
|
|
79126
|
-
|
|
79127
|
-
|
|
79128
|
-
|
|
79129
|
-
|
|
79130
|
-
Ue
|
|
79131
|
-
|
|
79132
|
-
|
|
79133
|
-
|
|
79134
|
-
|
|
79135
|
-
|
|
79136
|
-
var
|
|
79137
|
-
|
|
79138
|
-
|
|
79139
|
-
|
|
79140
|
-
if (
|
|
79141
|
-
|
|
79142
|
-
|
|
79143
|
-
|
|
79144
|
-
|
|
79145
|
-
|
|
79146
|
-
|
|
79147
|
-
|
|
79148
|
-
|
|
79149
|
-
|
|
79150
|
-
|
|
79151
|
-
|
|
79152
|
-
|
|
79190
|
+
var hasRequiredFoldcode;
|
|
79191
|
+
function requireFoldcode() {
|
|
79192
|
+
return hasRequiredFoldcode || (hasRequiredFoldcode = 1, function(Ie, Ae) {
|
|
79193
|
+
(function(je) {
|
|
79194
|
+
je(requireCodemirror());
|
|
79195
|
+
})(function(je) {
|
|
79196
|
+
function Be(Pe, De, Ue, He) {
|
|
79197
|
+
if (Ue && Ue.call) {
|
|
79198
|
+
var Ge = Ue;
|
|
79199
|
+
Ue = null;
|
|
79200
|
+
} else
|
|
79201
|
+
var Ge = Te(Pe, Ue, "rangeFinder");
|
|
79202
|
+
typeof De == "number" && (De = je.Pos(De, 0));
|
|
79203
|
+
var Oe = Te(Pe, Ue, "minFoldSize");
|
|
79204
|
+
function Qe(Ke) {
|
|
79205
|
+
var rr = Ge(Pe, De);
|
|
79206
|
+
if (!rr || rr.to.line - rr.from.line < Oe) return null;
|
|
79207
|
+
if (He === "fold") return rr;
|
|
79208
|
+
for (var or = Pe.findMarksAt(rr.from), er = 0; er < or.length; ++er)
|
|
79209
|
+
if (or[er].__isFold) {
|
|
79210
|
+
if (!Ke) return null;
|
|
79211
|
+
rr.cleared = !0, or[er].clear();
|
|
79212
|
+
}
|
|
79213
|
+
return rr;
|
|
79214
|
+
}
|
|
79215
|
+
var Ye = Qe(!0);
|
|
79216
|
+
if (Te(Pe, Ue, "scanUp")) for (; !Ye && De.line > Pe.firstLine(); )
|
|
79217
|
+
De = je.Pos(De.line - 1, 0), Ye = Qe(!1);
|
|
79218
|
+
if (!(!Ye || Ye.cleared || He === "unfold")) {
|
|
79219
|
+
var Je = Ee(Pe, Ue, Ye);
|
|
79220
|
+
je.on(Je, "mousedown", function(Ke) {
|
|
79221
|
+
St.clear(), je.e_preventDefault(Ke);
|
|
79222
|
+
});
|
|
79223
|
+
var St = Pe.markText(Ye.from, Ye.to, {
|
|
79224
|
+
replacedWith: Je,
|
|
79225
|
+
clearOnEnter: Te(Pe, Ue, "clearOnEnter"),
|
|
79226
|
+
__isFold: !0
|
|
79227
|
+
});
|
|
79228
|
+
St.on("clear", function(Ke, rr) {
|
|
79229
|
+
je.signal(Pe, "unfold", Pe, Ke, rr);
|
|
79230
|
+
}), je.signal(Pe, "fold", Pe, Ye.from, Ye.to);
|
|
79231
|
+
}
|
|
79232
|
+
}
|
|
79233
|
+
function Ee(Pe, De, Ue) {
|
|
79234
|
+
var He = Te(Pe, De, "widget");
|
|
79235
|
+
if (typeof He == "function" && (He = He(Ue.from, Ue.to)), typeof He == "string") {
|
|
79236
|
+
var Ge = document.createTextNode(He);
|
|
79237
|
+
He = document.createElement("span"), He.appendChild(Ge), He.className = "CodeMirror-foldmarker";
|
|
79238
|
+
} else He && (He = He.cloneNode(!0));
|
|
79239
|
+
return He;
|
|
79240
|
+
}
|
|
79241
|
+
je.newFoldFunction = function(Pe, De) {
|
|
79242
|
+
return function(Ue, He) {
|
|
79243
|
+
Be(Ue, He, { rangeFinder: Pe, widget: De });
|
|
79244
|
+
};
|
|
79245
|
+
}, je.defineExtension("foldCode", function(Pe, De, Ue) {
|
|
79246
|
+
Be(this, Pe, De, Ue);
|
|
79247
|
+
}), je.defineExtension("isFolded", function(Pe) {
|
|
79248
|
+
for (var De = this.findMarksAt(Pe), Ue = 0; Ue < De.length; ++Ue)
|
|
79249
|
+
if (De[Ue].__isFold) return !0;
|
|
79250
|
+
}), je.commands.toggleFold = function(Pe) {
|
|
79251
|
+
Pe.foldCode(Pe.getCursor());
|
|
79252
|
+
}, je.commands.fold = function(Pe) {
|
|
79253
|
+
Pe.foldCode(Pe.getCursor(), null, "fold");
|
|
79254
|
+
}, je.commands.unfold = function(Pe) {
|
|
79255
|
+
Pe.foldCode(Pe.getCursor(), { scanUp: !1 }, "unfold");
|
|
79256
|
+
}, je.commands.foldAll = function(Pe) {
|
|
79257
|
+
Pe.operation(function() {
|
|
79258
|
+
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79259
|
+
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "fold");
|
|
79153
79260
|
});
|
|
79154
|
-
|
|
79155
|
-
|
|
79156
|
-
|
|
79157
|
-
|
|
79261
|
+
}, je.commands.unfoldAll = function(Pe) {
|
|
79262
|
+
Pe.operation(function() {
|
|
79263
|
+
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79264
|
+
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "unfold");
|
|
79158
79265
|
});
|
|
79159
|
-
|
|
79160
|
-
|
|
79161
|
-
|
|
79162
|
-
|
|
79163
|
-
|
|
79164
|
-
|
|
79165
|
-
|
|
79166
|
-
|
|
79167
|
-
|
|
79168
|
-
|
|
79169
|
-
|
|
79170
|
-
return He;
|
|
79171
|
-
}
|
|
79172
|
-
je.newFoldFunction = function(Pe, De) {
|
|
79173
|
-
return function(Ue, He) {
|
|
79174
|
-
Be(Ue, He, { rangeFinder: Pe, widget: De });
|
|
79175
|
-
};
|
|
79176
|
-
}, je.defineExtension("foldCode", function(Pe, De, Ue) {
|
|
79177
|
-
Be(this, Pe, De, Ue);
|
|
79178
|
-
}), je.defineExtension("isFolded", function(Pe) {
|
|
79179
|
-
for (var De = this.findMarksAt(Pe), Ue = 0; Ue < De.length; ++Ue)
|
|
79180
|
-
if (De[Ue].__isFold) return !0;
|
|
79181
|
-
}), je.commands.toggleFold = function(Pe) {
|
|
79182
|
-
Pe.foldCode(Pe.getCursor());
|
|
79183
|
-
}, je.commands.fold = function(Pe) {
|
|
79184
|
-
Pe.foldCode(Pe.getCursor(), null, "fold");
|
|
79185
|
-
}, je.commands.unfold = function(Pe) {
|
|
79186
|
-
Pe.foldCode(Pe.getCursor(), { scanUp: !1 }, "unfold");
|
|
79187
|
-
}, je.commands.foldAll = function(Pe) {
|
|
79188
|
-
Pe.operation(function() {
|
|
79189
|
-
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79190
|
-
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "fold");
|
|
79191
|
-
});
|
|
79192
|
-
}, je.commands.unfoldAll = function(Pe) {
|
|
79193
|
-
Pe.operation(function() {
|
|
79194
|
-
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79195
|
-
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "unfold");
|
|
79196
|
-
});
|
|
79197
|
-
}, je.registerHelper("fold", "combine", function() {
|
|
79198
|
-
var Pe = Array.prototype.slice.call(arguments, 0);
|
|
79199
|
-
return function(De, Ue) {
|
|
79200
|
-
for (var He = 0; He < Pe.length; ++He) {
|
|
79201
|
-
var Ge = Pe[He](De, Ue);
|
|
79266
|
+
}, je.registerHelper("fold", "combine", function() {
|
|
79267
|
+
var Pe = Array.prototype.slice.call(arguments, 0);
|
|
79268
|
+
return function(De, Ue) {
|
|
79269
|
+
for (var He = 0; He < Pe.length; ++He) {
|
|
79270
|
+
var Ge = Pe[He](De, Ue);
|
|
79271
|
+
if (Ge) return Ge;
|
|
79272
|
+
}
|
|
79273
|
+
};
|
|
79274
|
+
}), je.registerHelper("fold", "auto", function(Pe, De) {
|
|
79275
|
+
for (var Ue = Pe.getHelpers(De, "fold"), He = 0; He < Ue.length; He++) {
|
|
79276
|
+
var Ge = Ue[He](Pe, De);
|
|
79202
79277
|
if (Ge) return Ge;
|
|
79203
79278
|
}
|
|
79279
|
+
});
|
|
79280
|
+
var Se = {
|
|
79281
|
+
rangeFinder: je.fold.auto,
|
|
79282
|
+
widget: "↔",
|
|
79283
|
+
minFoldSize: 0,
|
|
79284
|
+
scanUp: !1,
|
|
79285
|
+
clearOnEnter: !0
|
|
79204
79286
|
};
|
|
79205
|
-
|
|
79206
|
-
|
|
79207
|
-
|
|
79208
|
-
|
|
79209
|
-
|
|
79210
|
-
|
|
79211
|
-
|
|
79212
|
-
|
|
79213
|
-
|
|
79214
|
-
|
|
79215
|
-
scanUp: !1,
|
|
79216
|
-
clearOnEnter: !0
|
|
79217
|
-
};
|
|
79218
|
-
je.defineOption("foldOptions", null);
|
|
79219
|
-
function Te(Pe, De, Ue) {
|
|
79220
|
-
if (De && De[Ue] !== void 0)
|
|
79221
|
-
return De[Ue];
|
|
79222
|
-
var He = Pe.options.foldOptions;
|
|
79223
|
-
return He && He[Ue] !== void 0 ? He[Ue] : Se[Ue];
|
|
79224
|
-
}
|
|
79225
|
-
je.defineExtension("foldOption", function(Pe, De) {
|
|
79226
|
-
return Te(this, Pe, De);
|
|
79287
|
+
je.defineOption("foldOptions", null);
|
|
79288
|
+
function Te(Pe, De, Ue) {
|
|
79289
|
+
if (De && De[Ue] !== void 0)
|
|
79290
|
+
return De[Ue];
|
|
79291
|
+
var He = Pe.options.foldOptions;
|
|
79292
|
+
return He && He[Ue] !== void 0 ? He[Ue] : Se[Ue];
|
|
79293
|
+
}
|
|
79294
|
+
je.defineExtension("foldOption", function(Pe, De) {
|
|
79295
|
+
return Te(this, Pe, De);
|
|
79296
|
+
});
|
|
79227
79297
|
});
|
|
79228
|
-
});
|
|
79229
|
-
}
|
|
79230
|
-
|
|
79298
|
+
}()), foldcode.exports;
|
|
79299
|
+
}
|
|
79300
|
+
requireFoldcode();
|
|
79231
79301
|
(function(Ie, Ae) {
|
|
79232
79302
|
(function(je) {
|
|
79233
|
-
je(requireCodemirror(),
|
|
79303
|
+
je(requireCodemirror(), requireFoldcode());
|
|
79234
79304
|
})(function(je) {
|
|
79235
79305
|
je.defineOption("foldGutter", !1, function(St, Ke, rr) {
|
|
79236
79306
|
rr && rr != je.Init && (St.clearGutter(St.state.foldGutter.options.gutter), St.state.foldGutter = null, St.off("gutterClick", Ge), St.off("changes", Qe), St.off("viewportChange", Ye), St.off("fold", Je), St.off("unfold", Je), St.off("swapDoc", Qe), St.off("optionChange", Oe)), Ke && (St.state.foldGutter = new Ee(Se(Ke)), He(St), St.on("gutterClick", Ge), St.on("changes", Qe), St.on("viewportChange", Ye), St.on("fold", Je), St.on("unfold", Je), St.on("swapDoc", Qe), St.on("optionChange", Oe));
|
|
@@ -86745,10 +86815,11 @@ const _sfc_main = {
|
|
|
86745
86815
|
},
|
|
86746
86816
|
mounted() {
|
|
86747
86817
|
try {
|
|
86748
|
-
|
|
86749
|
-
|
|
86750
|
-
|
|
86751
|
-
|
|
86818
|
+
const Ie = !(typeof window < "u" && window.autoConnect === !1);
|
|
86819
|
+
(this.hiAutoConnect === !1 ? !1 : Ie) ? autoConnect() : disAutoConnect();
|
|
86820
|
+
const je = this.hiHost || hiprint.hiwebSocket.host, Be = this.hiToken || hiprint.hiwebSocket.token;
|
|
86821
|
+
(this.hiHost || this.hiToken) && hiprint.hiwebSocket.setHost(je, Be);
|
|
86822
|
+
const Se = {
|
|
86752
86823
|
cn: "zh_CN",
|
|
86753
86824
|
cn_tw: "zh_TW",
|
|
86754
86825
|
en: "en_US",
|
|
@@ -86760,7 +86831,7 @@ const _sfc_main = {
|
|
|
86760
86831
|
ru: "ru_RU"
|
|
86761
86832
|
}[this.lang] || "zh_CN";
|
|
86762
86833
|
try {
|
|
86763
|
-
i18n && i18n.global && i18n.global.locale && (typeof i18n.global.locale == "object" && "value" in i18n.global.locale ? i18n.global.locale.value =
|
|
86834
|
+
i18n && i18n.global && i18n.global.locale && (typeof i18n.global.locale == "object" && "value" in i18n.global.locale ? i18n.global.locale.value = Se : i18n.global.locale = Se), api.set("language", Se);
|
|
86764
86835
|
} catch {
|
|
86765
86836
|
}
|
|
86766
86837
|
} catch {
|
|
@@ -86928,7 +86999,11 @@ const _sfc_main = {
|
|
|
86928
86999
|
paginationContainer: ".hiprint-printPagination",
|
|
86929
87000
|
//fields: [{"text":'姓名1',"field":'name'},{"text":'性别1',"field":'gender'}],
|
|
86930
87001
|
// fontList: [{"title":'微软雅黑',"value":'Microsoft YaHei'}], // 自定义字体
|
|
86931
|
-
defaultPanelName: i18n.global.t("hiprintMeta.defaultPanelName")
|
|
87002
|
+
defaultPanelName: i18n.global.t("hiprintMeta.defaultPanelName"),
|
|
87003
|
+
watermarkOptions: hiprint._authKey ? void 0 : {
|
|
87004
|
+
content: "vg-print",
|
|
87005
|
+
timestamp: !0
|
|
87006
|
+
}
|
|
86932
87007
|
/*onPanelAddClick: (panel, createPanel) => {
|
|
86933
87008
|
panel.name = '新面板' + (panel.index + 1);
|
|
86934
87009
|
that.$message.success('弹出个东西,让你们知道,在这里可以自定义面板名称');
|
|
@@ -87195,7 +87270,11 @@ const _sfc_main = {
|
|
|
87195
87270
|
});
|
|
87196
87271
|
Te._notifRegistry[je] = Pe;
|
|
87197
87272
|
let De = new hiprint.PrintTemplate({
|
|
87198
|
-
template
|
|
87273
|
+
template,
|
|
87274
|
+
watermarkOptions: hiprint._authKey ? void 0 : {
|
|
87275
|
+
content: "vg-print",
|
|
87276
|
+
timestamp: !0
|
|
87277
|
+
}
|
|
87199
87278
|
});
|
|
87200
87279
|
De.print2(Ee, {
|
|
87201
87280
|
printer: this.printerName,
|
|
@@ -87902,7 +87981,7 @@ function _sfc_render(Ie, Ae, je, Be, Ee, Se) {
|
|
|
87902
87981
|
}, null, 8, ["template", "onApply"])
|
|
87903
87982
|
], 64);
|
|
87904
87983
|
}
|
|
87905
|
-
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
87984
|
+
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9c8237ca"]]), index = {
|
|
87906
87985
|
install(Ie) {
|
|
87907
87986
|
Ie.component("FullDesigner", FullDesigner);
|
|
87908
87987
|
try {
|