From ab82d2cc7f776b2f6fe9f7076bdbfda54e11b713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A4=A9?= Date: Thu, 21 Jul 2022 09:05:14 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20c54c594=20from=20https://gitee.com/CcSi?= =?UTF-8?q?mple/vue-plugin-hiprint/pulls/13=20=E4=BF=AE=E5=A4=8D=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=90=8E=E8=BE=85=E5=8A=A9=E5=85=83=E7=B4=A0=E9=94=99?= =?UTF-8?q?=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hiprint/hiprint.bundle.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hiprint/hiprint.bundle.js b/src/hiprint/hiprint.bundle.js index 2c98e2a..5173512 100644 --- a/src/hiprint/hiprint.bundle.js +++ b/src/hiprint/hiprint.bundle.js @@ -1454,7 +1454,8 @@ var hiprint = function (t) { } }, BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) { var e = this.options.getTop(); - return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height)); + var h = this.options.getHeight(); + return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e,h) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height)); }, BasePrintElement.prototype.css = function (t, e) { var n = this, i = [], @@ -2434,8 +2435,8 @@ var hiprint = function (t) { this.top = t.top, this.left = t.left, this.height = t.height, this.width = t.width, this.bottomInLastPaper = t.bottomInLastPaper, this.beginPrintPaperIndex = t.beginPrintPaperIndex, this.printTopInPaper = t.printTopInPaper, this.endPrintPaperIndex = t.endPrintPaperIndex; } - return t.prototype.isPositionLeftOrRight = function (t) { - return this.top <= t && this.top + this.height > t; + return t.prototype.isPositionLeftOrRight = function (t,h) { + return this.top <= t && this.top + h > t; }, t; }(); }, function (t, e, n) { -- Gitee