vg-print 1.0.302 → 1.0.303
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/README.md +16 -21
- package/dist/style.css +1 -1
- package/dist/vg-print.es.js +36 -12
- package/dist/vg-print.umd.js +4 -4
- package/package.json +1 -1
package/dist/vg-print.es.js
CHANGED
|
@@ -60346,7 +60346,7 @@ ${i18n$1.__("转大小写")}
|
|
|
60346
60346
|
watch: Ie,
|
|
60347
60347
|
container: Be.target[0]
|
|
60348
60348
|
});
|
|
60349
|
-
Ee.container && (Ee.content ? (Ie && watermark.destroyWatermark(Object.assign({}, Ee, {
|
|
60349
|
+
Ee.container && (Ee.content || (Ie || typeof window < "u" && window.hiprint && !window.hiprint._authKey) && (Ee.content = "vg-print", Ee.timestamp = Ee.timestamp == null ? !0 : Ee.timestamp), Ee.content ? (Ie && watermark.destroyWatermark(Object.assign({}, Ee, {
|
|
60350
60350
|
id: `${Be.templateId}_${Be.panelIdx}_${Ae || 1}_${Be.index}`
|
|
60351
60351
|
})), watermark.createWatermark(Ee)) : watermark.destroyWatermark(Ee));
|
|
60352
60352
|
}, t.prototype.displayHeight = function() {
|
|
@@ -65480,7 +65480,7 @@ ${i18n$1.__("转大小写")}
|
|
|
65480
65480
|
}
|
|
65481
65481
|
};
|
|
65482
65482
|
})();
|
|
65483
|
-
const version = "1.0.
|
|
65483
|
+
const version = "1.0.303";
|
|
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() {
|
|
@@ -65599,7 +65599,21 @@ function getPrinterList(Ie) {
|
|
|
65599
65599
|
return Array.isArray(je) ? je : [];
|
|
65600
65600
|
}
|
|
65601
65601
|
function setHiwebSocket(Ie, Ae, je) {
|
|
65602
|
-
|
|
65602
|
+
try {
|
|
65603
|
+
typeof Ae == "function" && (je = Ae, Ae = void 0), hiprint.hiwebSocket.host = Ie, hiprint.hiwebSocket.token = Ae;
|
|
65604
|
+
try {
|
|
65605
|
+
hiprint.hiwebSocket.stop();
|
|
65606
|
+
} catch {
|
|
65607
|
+
}
|
|
65608
|
+
if (window.autoConnect)
|
|
65609
|
+
try {
|
|
65610
|
+
hiprint.hiwebSocket.start(je);
|
|
65611
|
+
} catch {
|
|
65612
|
+
}
|
|
65613
|
+
return !0;
|
|
65614
|
+
} catch {
|
|
65615
|
+
return !1;
|
|
65616
|
+
}
|
|
65603
65617
|
}
|
|
65604
65618
|
function connect(Ie) {
|
|
65605
65619
|
return hiprint.hiwebSocket.start(Ie);
|
|
@@ -86815,7 +86829,11 @@ const _sfc_main = {
|
|
|
86815
86829
|
const Ie = !(typeof window < "u" && window.autoConnect === !1);
|
|
86816
86830
|
(this.hiAutoConnect === !1 ? !1 : Ie) ? autoConnect() : disAutoConnect();
|
|
86817
86831
|
const je = this.hiHost || hiprint.hiwebSocket.host, Be = this.hiToken || hiprint.hiwebSocket.token;
|
|
86818
|
-
(this.hiHost || this.hiToken)
|
|
86832
|
+
if (this.hiHost || this.hiToken)
|
|
86833
|
+
try {
|
|
86834
|
+
this.setHiwebSocket(je, Be);
|
|
86835
|
+
} catch {
|
|
86836
|
+
}
|
|
86819
86837
|
const Se = {
|
|
86820
86838
|
cn: "zh_CN",
|
|
86821
86839
|
cn_tw: "zh_TW",
|
|
@@ -86838,13 +86856,13 @@ const _sfc_main = {
|
|
|
86838
86856
|
watch: {
|
|
86839
86857
|
hiHost(Ie) {
|
|
86840
86858
|
try {
|
|
86841
|
-
|
|
86859
|
+
this.setHiwebSocket(Ie || hiprint.hiwebSocket.host, this.hiToken || hiprint.hiwebSocket.token);
|
|
86842
86860
|
} catch {
|
|
86843
86861
|
}
|
|
86844
86862
|
},
|
|
86845
86863
|
hiToken(Ie) {
|
|
86846
86864
|
try {
|
|
86847
|
-
|
|
86865
|
+
this.setHiwebSocket(this.hiHost || hiprint.hiwebSocket.host, Ie || hiprint.hiwebSocket.token);
|
|
86848
86866
|
} catch {
|
|
86849
86867
|
}
|
|
86850
86868
|
},
|
|
@@ -86997,10 +87015,7 @@ const _sfc_main = {
|
|
|
86997
87015
|
//fields: [{"text":'姓名1',"field":'name'},{"text":'性别1',"field":'gender'}],
|
|
86998
87016
|
// fontList: [{"title":'微软雅黑',"value":'Microsoft YaHei'}], // 自定义字体
|
|
86999
87017
|
defaultPanelName: i18n.global.t("hiprintMeta.defaultPanelName"),
|
|
87000
|
-
watermarkOptions:
|
|
87001
|
-
content: "vg-print",
|
|
87002
|
-
timestamp: !0
|
|
87003
|
-
}
|
|
87018
|
+
watermarkOptions: {}
|
|
87004
87019
|
/*onPanelAddClick: (panel, createPanel) => {
|
|
87005
87020
|
panel.name = '新面板' + (panel.index + 1);
|
|
87006
87021
|
that.$message.success('弹出个东西,让你们知道,在这里可以自定义面板名称');
|
|
@@ -87191,7 +87206,16 @@ const _sfc_main = {
|
|
|
87191
87206
|
},
|
|
87192
87207
|
setHiwebSocket(Ie, Ae, je) {
|
|
87193
87208
|
try {
|
|
87194
|
-
hiprint.hiwebSocket.
|
|
87209
|
+
typeof Ae == "function" && (je = Ae, Ae = void 0), hiprint.hiwebSocket.host = Ie, hiprint.hiwebSocket.token = Ae;
|
|
87210
|
+
try {
|
|
87211
|
+
hiprint.hiwebSocket.stop();
|
|
87212
|
+
} catch {
|
|
87213
|
+
}
|
|
87214
|
+
if (window.autoConnect)
|
|
87215
|
+
try {
|
|
87216
|
+
hiprint.hiwebSocket.start(je);
|
|
87217
|
+
} catch {
|
|
87218
|
+
}
|
|
87195
87219
|
} catch {
|
|
87196
87220
|
}
|
|
87197
87221
|
},
|
|
@@ -87978,7 +88002,7 @@ function _sfc_render(Ie, Ae, je, Be, Ee, Se) {
|
|
|
87978
88002
|
}, null, 8, ["template", "onApply"])
|
|
87979
88003
|
], 64);
|
|
87980
88004
|
}
|
|
87981
|
-
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
88005
|
+
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-76b9d8c5"]]), index = {
|
|
87982
88006
|
install(Ie) {
|
|
87983
88007
|
Ie.component("FullDesigner", FullDesigner);
|
|
87984
88008
|
try {
|