vg-print 1.0.224 → 1.0.225
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 +148 -0
- package/dist/style.css +1 -1
- package/dist/vg-print.es.js +44 -6
- package/dist/vg-print.umd.js +4 -4
- package/package.json +1 -1
package/dist/vg-print.es.js
CHANGED
|
@@ -65480,7 +65480,7 @@ ${i18n$1.__("转大小写")}
|
|
|
65480
65480
|
}
|
|
65481
65481
|
};
|
|
65482
65482
|
})();
|
|
65483
|
-
const version = "1.0.
|
|
65483
|
+
const version = "1.0.225";
|
|
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() {
|
|
@@ -65511,6 +65511,34 @@ let autoConnect = function(Ie) {
|
|
|
65511
65511
|
};
|
|
65512
65512
|
hiprint.version = version;
|
|
65513
65513
|
window.hiprint = hiprint;
|
|
65514
|
+
function createTemplate(Ie, Ae = {}) {
|
|
65515
|
+
return hiprint.init({ providers: [new defaultElementTypeProvider()] }), new hiprint.PrintTemplate({ template: Ie, ...Ae });
|
|
65516
|
+
}
|
|
65517
|
+
function getHtml(Ie, Ae) {
|
|
65518
|
+
return (Ie && typeof Ie.getHtml == "function" ? Ie : createTemplate(Ie)).getHtml(Ae);
|
|
65519
|
+
}
|
|
65520
|
+
function printBrowser(Ie, Ae, je = {}, Be = {}) {
|
|
65521
|
+
return (Ie && typeof Ie.print == "function" ? Ie : createTemplate(Ie)).print(Ae, je, Be);
|
|
65522
|
+
}
|
|
65523
|
+
function exportPdf(Ie, Ae, je = "打印预览pdf", Be = {}) {
|
|
65524
|
+
return (Ie && typeof Ie.toPdf == "function" ? Ie : createTemplate(Ie)).toPdf(Ae, je, Be);
|
|
65525
|
+
}
|
|
65526
|
+
function exportImage(Ie, Ae, je = {}) {
|
|
65527
|
+
return (Ie && typeof Ie.toImage == "function" ? Ie : createTemplate(Ie)).toImage(Ae, je);
|
|
65528
|
+
}
|
|
65529
|
+
function getPrinterList(Ie) {
|
|
65530
|
+
const Ae = Ie && Ie.getPrinterList ? Ie : createTemplate(Ie), je = Ae.getPrinterList && Ae.getPrinterList();
|
|
65531
|
+
return Array.isArray(je) ? je : [];
|
|
65532
|
+
}
|
|
65533
|
+
function setHiwebSocket(Ie, Ae, je) {
|
|
65534
|
+
return hiprint.hiwebSocket.setHost(Ie, Ae, je);
|
|
65535
|
+
}
|
|
65536
|
+
function connect(Ie) {
|
|
65537
|
+
return hiprint.hiwebSocket.start(Ie);
|
|
65538
|
+
}
|
|
65539
|
+
function disconnect() {
|
|
65540
|
+
return hiprint.hiwebSocket.stop();
|
|
65541
|
+
}
|
|
65514
65542
|
let ls$1 = {};
|
|
65515
65543
|
class MemoryStorageInterface {
|
|
65516
65544
|
constructor() {
|
|
@@ -86570,7 +86598,7 @@ const _sfc_main = {
|
|
|
86570
86598
|
emits: ["save"],
|
|
86571
86599
|
data() {
|
|
86572
86600
|
return {
|
|
86573
|
-
template:
|
|
86601
|
+
template: null,
|
|
86574
86602
|
// 仅使用一个模板缓存,不区分多个键
|
|
86575
86603
|
// (页面关闭或离开时会清空该缓存)
|
|
86576
86604
|
// 组件内维护的可编辑打印数据变量(避免直接依赖模块常量)
|
|
@@ -87737,12 +87765,13 @@ function _sfc_render(Ie, Ae, je, Be, Ee, Se) {
|
|
|
87737
87765
|
]),
|
|
87738
87766
|
_: 1
|
|
87739
87767
|
}),
|
|
87740
|
-
|
|
87768
|
+
Ee.template ? (openBlock(), createBlock(St, {
|
|
87769
|
+
key: 0,
|
|
87741
87770
|
template: Ee.template,
|
|
87742
87771
|
onToggleStructure: Ae[6] || (Ae[6] = (nr) => Ee.showStructureList = !Ee.showStructureList),
|
|
87743
87772
|
onToggleHistory: Ae[7] || (Ae[7] = (nr) => Ee.showHistory = !Ee.showHistory),
|
|
87744
87773
|
onTogglePalette: Ae[8] || (Ae[8] = (nr) => Ee.propVisible = !Ee.propVisible)
|
|
87745
|
-
}, null, 8, ["template"]),
|
|
87774
|
+
}, null, 8, ["template"])) : createCommentVNode("", !0),
|
|
87746
87775
|
withDirectives(createElementVNode("div", {
|
|
87747
87776
|
class: "prop-floating",
|
|
87748
87777
|
style: normalizeStyle(Se.propStyle)
|
|
@@ -87875,7 +87904,7 @@ function _sfc_render(Ie, Ae, je, Be, Ee, Se) {
|
|
|
87875
87904
|
}, null, 8, ["template", "onApply"])
|
|
87876
87905
|
], 64);
|
|
87877
87906
|
}
|
|
87878
|
-
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
87907
|
+
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6aa35a08"]]), index = {
|
|
87879
87908
|
install(Ie) {
|
|
87880
87909
|
Ie.component("FullDesigner", FullDesigner);
|
|
87881
87910
|
try {
|
|
@@ -87887,9 +87916,18 @@ const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_ren
|
|
|
87887
87916
|
export {
|
|
87888
87917
|
FullDesigner,
|
|
87889
87918
|
autoConnect,
|
|
87919
|
+
connect,
|
|
87920
|
+
createTemplate,
|
|
87890
87921
|
index as default,
|
|
87891
87922
|
defaultElementTypeProvider,
|
|
87892
87923
|
disAutoConnect,
|
|
87924
|
+
disconnect,
|
|
87925
|
+
exportImage,
|
|
87926
|
+
exportPdf,
|
|
87927
|
+
getHtml,
|
|
87928
|
+
getPrinterList,
|
|
87893
87929
|
hiPrintPlugin,
|
|
87894
|
-
hiprint
|
|
87930
|
+
hiprint,
|
|
87931
|
+
printBrowser,
|
|
87932
|
+
setHiwebSocket
|
|
87895
87933
|
};
|