From b3c7dde44f3d0bb215e41761cf2442f4ec2f4b0f Mon Sep 17 00:00:00 2001 From: yanran200830 Date: Thu, 31 Oct 2024 18:06:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/print/Print.vue | 8 ++++++-- src/view/lables/Template.vue | 27 ++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/components/print/Print.vue b/src/components/print/Print.vue index 73628be..5b035d1 100644 --- a/src/components/print/Print.vue +++ b/src/components/print/Print.vue @@ -627,8 +627,12 @@ this.isShowPreview = true }, - getHtml() { - return this.elementToString(this.hiprintTemplate.getHtml(this.printData)) + getHtml(template, printData) { + this.hiprintTemplate = newHiprintPrintTemplate('temulables') + + this.hiprintTemplate.update(template) + const html = this.elementToString(this.hiprintTemplate.getHtml(printData)) + return html }, clearPaper() { diff --git a/src/view/lables/Template.vue b/src/view/lables/Template.vue index 254a909..4226e13 100644 --- a/src/view/lables/Template.vue +++ b/src/view/lables/Template.vue @@ -64,24 +64,31 @@ style="margin-top: 8px;" @getList="getList" :loading="isLoading"> - + +