vg-print 1.0.223 → 1.0.224
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/dist/style.css +1 -1
- package/dist/vg-print.es.js +122 -157
- package/dist/vg-print.umd.js +95 -95
- 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.224";
|
|
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() {
|
|
@@ -79091,117 +79091,120 @@ b`.split(/\n/).length != 3 ? function(Fe) {
|
|
|
79091
79091
|
});
|
|
79092
79092
|
}(codemirror)), codemirror.exports;
|
|
79093
79093
|
}
|
|
79094
|
-
|
|
79095
|
-
|
|
79096
|
-
|
|
79097
|
-
|
|
79098
|
-
|
|
79099
|
-
|
|
79100
|
-
|
|
79101
|
-
Ue
|
|
79102
|
-
|
|
79103
|
-
|
|
79104
|
-
|
|
79105
|
-
|
|
79106
|
-
|
|
79107
|
-
var
|
|
79108
|
-
|
|
79109
|
-
|
|
79110
|
-
|
|
79111
|
-
if (
|
|
79112
|
-
|
|
79113
|
-
|
|
79114
|
-
|
|
79115
|
-
|
|
79116
|
-
|
|
79117
|
-
|
|
79118
|
-
|
|
79119
|
-
|
|
79120
|
-
|
|
79121
|
-
|
|
79122
|
-
|
|
79123
|
-
|
|
79094
|
+
var hasRequiredFoldcode;
|
|
79095
|
+
function requireFoldcode() {
|
|
79096
|
+
return hasRequiredFoldcode || (hasRequiredFoldcode = 1, function(Ie, Ae) {
|
|
79097
|
+
(function(je) {
|
|
79098
|
+
je(requireCodemirror());
|
|
79099
|
+
})(function(je) {
|
|
79100
|
+
function Be(Pe, De, Ue, He) {
|
|
79101
|
+
if (Ue && Ue.call) {
|
|
79102
|
+
var Ge = Ue;
|
|
79103
|
+
Ue = null;
|
|
79104
|
+
} else
|
|
79105
|
+
var Ge = Te(Pe, Ue, "rangeFinder");
|
|
79106
|
+
typeof De == "number" && (De = je.Pos(De, 0));
|
|
79107
|
+
var Oe = Te(Pe, Ue, "minFoldSize");
|
|
79108
|
+
function Qe(Ke) {
|
|
79109
|
+
var rr = Ge(Pe, De);
|
|
79110
|
+
if (!rr || rr.to.line - rr.from.line < Oe) return null;
|
|
79111
|
+
if (He === "fold") return rr;
|
|
79112
|
+
for (var or = Pe.findMarksAt(rr.from), er = 0; er < or.length; ++er)
|
|
79113
|
+
if (or[er].__isFold) {
|
|
79114
|
+
if (!Ke) return null;
|
|
79115
|
+
rr.cleared = !0, or[er].clear();
|
|
79116
|
+
}
|
|
79117
|
+
return rr;
|
|
79118
|
+
}
|
|
79119
|
+
var Ye = Qe(!0);
|
|
79120
|
+
if (Te(Pe, Ue, "scanUp")) for (; !Ye && De.line > Pe.firstLine(); )
|
|
79121
|
+
De = je.Pos(De.line - 1, 0), Ye = Qe(!1);
|
|
79122
|
+
if (!(!Ye || Ye.cleared || He === "unfold")) {
|
|
79123
|
+
var Je = Ee(Pe, Ue, Ye);
|
|
79124
|
+
je.on(Je, "mousedown", function(Ke) {
|
|
79125
|
+
St.clear(), je.e_preventDefault(Ke);
|
|
79126
|
+
});
|
|
79127
|
+
var St = Pe.markText(Ye.from, Ye.to, {
|
|
79128
|
+
replacedWith: Je,
|
|
79129
|
+
clearOnEnter: Te(Pe, Ue, "clearOnEnter"),
|
|
79130
|
+
__isFold: !0
|
|
79131
|
+
});
|
|
79132
|
+
St.on("clear", function(Ke, rr) {
|
|
79133
|
+
je.signal(Pe, "unfold", Pe, Ke, rr);
|
|
79134
|
+
}), je.signal(Pe, "fold", Pe, Ye.from, Ye.to);
|
|
79135
|
+
}
|
|
79136
|
+
}
|
|
79137
|
+
function Ee(Pe, De, Ue) {
|
|
79138
|
+
var He = Te(Pe, De, "widget");
|
|
79139
|
+
if (typeof He == "function" && (He = He(Ue.from, Ue.to)), typeof He == "string") {
|
|
79140
|
+
var Ge = document.createTextNode(He);
|
|
79141
|
+
He = document.createElement("span"), He.appendChild(Ge), He.className = "CodeMirror-foldmarker";
|
|
79142
|
+
} else He && (He = He.cloneNode(!0));
|
|
79143
|
+
return He;
|
|
79144
|
+
}
|
|
79145
|
+
je.newFoldFunction = function(Pe, De) {
|
|
79146
|
+
return function(Ue, He) {
|
|
79147
|
+
Be(Ue, He, { rangeFinder: Pe, widget: De });
|
|
79148
|
+
};
|
|
79149
|
+
}, je.defineExtension("foldCode", function(Pe, De, Ue) {
|
|
79150
|
+
Be(this, Pe, De, Ue);
|
|
79151
|
+
}), je.defineExtension("isFolded", function(Pe) {
|
|
79152
|
+
for (var De = this.findMarksAt(Pe), Ue = 0; Ue < De.length; ++Ue)
|
|
79153
|
+
if (De[Ue].__isFold) return !0;
|
|
79154
|
+
}), je.commands.toggleFold = function(Pe) {
|
|
79155
|
+
Pe.foldCode(Pe.getCursor());
|
|
79156
|
+
}, je.commands.fold = function(Pe) {
|
|
79157
|
+
Pe.foldCode(Pe.getCursor(), null, "fold");
|
|
79158
|
+
}, je.commands.unfold = function(Pe) {
|
|
79159
|
+
Pe.foldCode(Pe.getCursor(), { scanUp: !1 }, "unfold");
|
|
79160
|
+
}, je.commands.foldAll = function(Pe) {
|
|
79161
|
+
Pe.operation(function() {
|
|
79162
|
+
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79163
|
+
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "fold");
|
|
79124
79164
|
});
|
|
79125
|
-
|
|
79126
|
-
|
|
79127
|
-
|
|
79128
|
-
|
|
79165
|
+
}, je.commands.unfoldAll = function(Pe) {
|
|
79166
|
+
Pe.operation(function() {
|
|
79167
|
+
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79168
|
+
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "unfold");
|
|
79129
79169
|
});
|
|
79130
|
-
|
|
79131
|
-
|
|
79132
|
-
|
|
79133
|
-
|
|
79134
|
-
|
|
79135
|
-
|
|
79136
|
-
|
|
79137
|
-
|
|
79138
|
-
|
|
79139
|
-
|
|
79140
|
-
|
|
79141
|
-
return He;
|
|
79142
|
-
}
|
|
79143
|
-
je.newFoldFunction = function(Pe, De) {
|
|
79144
|
-
return function(Ue, He) {
|
|
79145
|
-
Be(Ue, He, { rangeFinder: Pe, widget: De });
|
|
79146
|
-
};
|
|
79147
|
-
}, je.defineExtension("foldCode", function(Pe, De, Ue) {
|
|
79148
|
-
Be(this, Pe, De, Ue);
|
|
79149
|
-
}), je.defineExtension("isFolded", function(Pe) {
|
|
79150
|
-
for (var De = this.findMarksAt(Pe), Ue = 0; Ue < De.length; ++Ue)
|
|
79151
|
-
if (De[Ue].__isFold) return !0;
|
|
79152
|
-
}), je.commands.toggleFold = function(Pe) {
|
|
79153
|
-
Pe.foldCode(Pe.getCursor());
|
|
79154
|
-
}, je.commands.fold = function(Pe) {
|
|
79155
|
-
Pe.foldCode(Pe.getCursor(), null, "fold");
|
|
79156
|
-
}, je.commands.unfold = function(Pe) {
|
|
79157
|
-
Pe.foldCode(Pe.getCursor(), { scanUp: !1 }, "unfold");
|
|
79158
|
-
}, je.commands.foldAll = function(Pe) {
|
|
79159
|
-
Pe.operation(function() {
|
|
79160
|
-
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79161
|
-
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "fold");
|
|
79162
|
-
});
|
|
79163
|
-
}, je.commands.unfoldAll = function(Pe) {
|
|
79164
|
-
Pe.operation(function() {
|
|
79165
|
-
for (var De = Pe.firstLine(), Ue = Pe.lastLine(); De <= Ue; De++)
|
|
79166
|
-
Pe.foldCode(je.Pos(De, 0), { scanUp: !1 }, "unfold");
|
|
79167
|
-
});
|
|
79168
|
-
}, je.registerHelper("fold", "combine", function() {
|
|
79169
|
-
var Pe = Array.prototype.slice.call(arguments, 0);
|
|
79170
|
-
return function(De, Ue) {
|
|
79171
|
-
for (var He = 0; He < Pe.length; ++He) {
|
|
79172
|
-
var Ge = Pe[He](De, Ue);
|
|
79170
|
+
}, je.registerHelper("fold", "combine", function() {
|
|
79171
|
+
var Pe = Array.prototype.slice.call(arguments, 0);
|
|
79172
|
+
return function(De, Ue) {
|
|
79173
|
+
for (var He = 0; He < Pe.length; ++He) {
|
|
79174
|
+
var Ge = Pe[He](De, Ue);
|
|
79175
|
+
if (Ge) return Ge;
|
|
79176
|
+
}
|
|
79177
|
+
};
|
|
79178
|
+
}), je.registerHelper("fold", "auto", function(Pe, De) {
|
|
79179
|
+
for (var Ue = Pe.getHelpers(De, "fold"), He = 0; He < Ue.length; He++) {
|
|
79180
|
+
var Ge = Ue[He](Pe, De);
|
|
79173
79181
|
if (Ge) return Ge;
|
|
79174
79182
|
}
|
|
79183
|
+
});
|
|
79184
|
+
var Se = {
|
|
79185
|
+
rangeFinder: je.fold.auto,
|
|
79186
|
+
widget: "↔",
|
|
79187
|
+
minFoldSize: 0,
|
|
79188
|
+
scanUp: !1,
|
|
79189
|
+
clearOnEnter: !0
|
|
79175
79190
|
};
|
|
79176
|
-
|
|
79177
|
-
|
|
79178
|
-
|
|
79179
|
-
|
|
79180
|
-
|
|
79181
|
-
|
|
79182
|
-
|
|
79183
|
-
|
|
79184
|
-
|
|
79185
|
-
|
|
79186
|
-
scanUp: !1,
|
|
79187
|
-
clearOnEnter: !0
|
|
79188
|
-
};
|
|
79189
|
-
je.defineOption("foldOptions", null);
|
|
79190
|
-
function Te(Pe, De, Ue) {
|
|
79191
|
-
if (De && De[Ue] !== void 0)
|
|
79192
|
-
return De[Ue];
|
|
79193
|
-
var He = Pe.options.foldOptions;
|
|
79194
|
-
return He && He[Ue] !== void 0 ? He[Ue] : Se[Ue];
|
|
79195
|
-
}
|
|
79196
|
-
je.defineExtension("foldOption", function(Pe, De) {
|
|
79197
|
-
return Te(this, Pe, De);
|
|
79191
|
+
je.defineOption("foldOptions", null);
|
|
79192
|
+
function Te(Pe, De, Ue) {
|
|
79193
|
+
if (De && De[Ue] !== void 0)
|
|
79194
|
+
return De[Ue];
|
|
79195
|
+
var He = Pe.options.foldOptions;
|
|
79196
|
+
return He && He[Ue] !== void 0 ? He[Ue] : Se[Ue];
|
|
79197
|
+
}
|
|
79198
|
+
je.defineExtension("foldOption", function(Pe, De) {
|
|
79199
|
+
return Te(this, Pe, De);
|
|
79200
|
+
});
|
|
79198
79201
|
});
|
|
79199
|
-
});
|
|
79200
|
-
}
|
|
79201
|
-
|
|
79202
|
+
}()), foldcode.exports;
|
|
79203
|
+
}
|
|
79204
|
+
requireFoldcode();
|
|
79202
79205
|
(function(Ie, Ae) {
|
|
79203
79206
|
(function(je) {
|
|
79204
|
-
je(requireCodemirror(),
|
|
79207
|
+
je(requireCodemirror(), requireFoldcode());
|
|
79205
79208
|
})(function(je) {
|
|
79206
79209
|
je.defineOption("foldGutter", !1, function(St, Ke, rr) {
|
|
79207
79210
|
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));
|
|
@@ -86762,51 +86765,6 @@ const _sfc_main = {
|
|
|
86762
86765
|
this.handleLangChange(Ie);
|
|
86763
86766
|
} catch {
|
|
86764
86767
|
}
|
|
86765
|
-
},
|
|
86766
|
-
initialTemplate: {
|
|
86767
|
-
deep: !0,
|
|
86768
|
-
handler(Ie) {
|
|
86769
|
-
try {
|
|
86770
|
-
const je = Ie && typeof Ie == "object" && Object.keys(Ie).length > 0 ? Ie : template;
|
|
86771
|
-
if (hiprintTemplate && typeof hiprintTemplate.update == "function") {
|
|
86772
|
-
hiprintTemplate.update(je, 0), this.applyExpandCssLive(), this.loadInitialPrintData();
|
|
86773
|
-
try {
|
|
86774
|
-
const Be = window.hinnn && window.hinnn.event, Ee = hiprintTemplate && (hiprintTemplate.templateId || hiprintTemplate.id);
|
|
86775
|
-
Be && Ee && Be.trigger(`hiprintTemplateDataChanged_${Ee}`, "更新模板");
|
|
86776
|
-
} catch {
|
|
86777
|
-
}
|
|
86778
|
-
try {
|
|
86779
|
-
const Be = hiprintTemplate.getPaperType(), {
|
|
86780
|
-
width: Ee,
|
|
86781
|
-
height: Se
|
|
86782
|
-
} = hiprintTemplate.editingPanel;
|
|
86783
|
-
Be ? this.setPaper(Be, {
|
|
86784
|
-
width: Ee,
|
|
86785
|
-
height: Se
|
|
86786
|
-
}) : (this.paperWidth = Ee, this.paperHeight = Se, this.otherPaper());
|
|
86787
|
-
} catch {
|
|
86788
|
-
}
|
|
86789
|
-
}
|
|
86790
|
-
} catch {
|
|
86791
|
-
}
|
|
86792
|
-
}
|
|
86793
|
-
},
|
|
86794
|
-
initialPrintData: {
|
|
86795
|
-
deep: !0,
|
|
86796
|
-
handler(Ie) {
|
|
86797
|
-
try {
|
|
86798
|
-
const Ae = Array.isArray(rawPrintData) ? [...rawPrintData] : rawPrintData && typeof rawPrintData == "object" ? {
|
|
86799
|
-
...rawPrintData
|
|
86800
|
-
} : {}, je = Array.isArray(Ie) ? [...Ie] : Ie && typeof Ie == "object" ? {
|
|
86801
|
-
...Ie
|
|
86802
|
-
} : Ae;
|
|
86803
|
-
this.printDataVar = je, this.savePrintData(je);
|
|
86804
|
-
} catch {
|
|
86805
|
-
this.printDataVar = Array.isArray(rawPrintData) ? [...rawPrintData] : {
|
|
86806
|
-
...rawPrintData
|
|
86807
|
-
};
|
|
86808
|
-
}
|
|
86809
|
-
}
|
|
86810
86768
|
}
|
|
86811
86769
|
},
|
|
86812
86770
|
unmounted() {
|
|
@@ -86825,16 +86783,23 @@ const _sfc_main = {
|
|
|
86825
86783
|
},
|
|
86826
86784
|
loadInitialPrintData() {
|
|
86827
86785
|
try {
|
|
86828
|
-
const Ie = this.getPrintDataKey(), Ae = this.$ls && this.$ls.get ? this.$ls.get(Ie) : null,
|
|
86786
|
+
const Ie = this.getPrintDataKey(), Ae = this.initialPrintData, je = Array.isArray(Ae) || Ae && typeof Ae == "object" && Object.keys(Ae).length > 0, Be = this.$ls && this.$ls.get ? this.$ls.get(Ie) : null, Ee = Array.isArray(rawPrintData) ? [...rawPrintData] : rawPrintData && typeof rawPrintData == "object" ? {
|
|
86829
86787
|
...rawPrintData
|
|
86830
|
-
} : {}
|
|
86831
|
-
if (
|
|
86832
|
-
const
|
|
86833
|
-
Be !== Ee ? this.printDataVar = je : this.printDataVar = Ee ? [...Ae] : {
|
|
86788
|
+
} : {};
|
|
86789
|
+
if (je) {
|
|
86790
|
+
const Se = Array.isArray(Ae) ? [...Ae] : {
|
|
86834
86791
|
...Ae
|
|
86835
86792
|
};
|
|
86836
|
-
|
|
86837
|
-
|
|
86793
|
+
this.printDataVar = Se, this.savePrintData(Se);
|
|
86794
|
+
return;
|
|
86795
|
+
}
|
|
86796
|
+
if (Be && (Array.isArray(Be) || typeof Be == "object")) {
|
|
86797
|
+
this.printDataVar = Array.isArray(Be) ? [...Be] : {
|
|
86798
|
+
...Be
|
|
86799
|
+
};
|
|
86800
|
+
return;
|
|
86801
|
+
}
|
|
86802
|
+
this.printDataVar = Ee;
|
|
86838
86803
|
} catch {
|
|
86839
86804
|
this.printDataVar = Array.isArray(rawPrintData) ? [...rawPrintData] : {
|
|
86840
86805
|
...rawPrintData
|
|
@@ -87910,7 +87875,7 @@ function _sfc_render(Ie, Ae, je, Be, Ee, Se) {
|
|
|
87910
87875
|
}, null, 8, ["template", "onApply"])
|
|
87911
87876
|
], 64);
|
|
87912
87877
|
}
|
|
87913
|
-
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
87878
|
+
const FullDesigner = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-35d219bf"]]), index = {
|
|
87914
87879
|
install(Ie) {
|
|
87915
87880
|
Ie.component("FullDesigner", FullDesigner);
|
|
87916
87881
|
try {
|