ztxkutils 2.6.1 → 2.6.2
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/print.d.ts +2 -1
- package/dist/print.js +2 -2
- package/package.json +1 -1
package/dist/print.d.ts
CHANGED
@@ -16,9 +16,10 @@ interface IParams {
|
|
16
16
|
hiddenClassNames?: string[];
|
17
17
|
}
|
18
18
|
export declare function printCurrentDom({ hiddenClassNames }?: IParams): void;
|
19
|
-
export declare function htmlToPdf({ pageClassName, dom, pdfName, }: {
|
19
|
+
export declare function htmlToPdf({ pageClassName, dom, pdfName, isShowPage, }: {
|
20
20
|
pageClassName?: string;
|
21
21
|
dom: HTMLElement;
|
22
22
|
pdfName: string;
|
23
|
+
isShowPage?: boolean;
|
23
24
|
}): Promise<void>;
|
24
25
|
export {};
|
package/dist/print.js
CHANGED
@@ -102,10 +102,10 @@ function createPdf(canvas, pdf) {
|
|
102
102
|
}
|
103
103
|
}
|
104
104
|
function htmlToPdf(_a) {
|
105
|
-
var pageClassName = _a.pageClassName, dom = _a.dom, pdfName = _a.pdfName;
|
105
|
+
var pageClassName = _a.pageClassName, dom = _a.dom, pdfName = _a.pdfName, isShowPage = _a.isShowPage;
|
106
106
|
var pdf = new jsPDF(undefined, 'pt', 'a4');
|
107
107
|
var allDom = document.querySelectorAll(pageClassName ? pageClassName : '.html2canvas-container-page');
|
108
|
-
if (allDom.length > 0) {
|
108
|
+
if (allDom.length > 0 && isShowPage) {
|
109
109
|
var allDomArray = Array.prototype.slice.call(allDom);
|
110
110
|
var promiseAllDomArray_1 = allDomArray.map(function (dom) { return html2canvas(dom); });
|
111
111
|
return (function () {
|