Skip to content

Commit

Permalink
Merge branch 'v17'
Browse files Browse the repository at this point in the history
  • Loading branch information
EnochGao committed May 28, 2024
2 parents 4a390be + 558c0e0 commit 25a5d03
Showing 1 changed file with 85 additions and 84 deletions.
169 changes: 85 additions & 84 deletions components/print/examples/print/print.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,94 +10,95 @@ import { GoodEvaluatePdfComponent } from './good-evaluate-pdf/good-evaluate-pdf.
import { GoodEvaluatePdfVComponent } from './good-evaluate-pdf-v/good-evaluate-pdf.component';

@Component({
standalone: true,
imports: [
CommonModule,
NzGridModule,
NzButtonModule,
GoodEvaluatePdfComponent,
standalone: true,
imports: [
CommonModule,
NzGridModule,
NzButtonModule,
GoodEvaluatePdfComponent,
GoodEvaluatePdfVComponent,
NzxPrintModule,
],
selector: 'nzx-print-example',
template: `
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>基于vivliostyle实现(支持分页,页眉页脚)</div>
<div nz-col>
<button nz-button nzType="primary" (click)="nzxPrintV.print()">
下载打印评价表
</button>
</div>
</div>
NzxPrintModule,
],
selector: 'nzx-print-example',
template: `
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>基于vivliostyle实现(支持分页,页眉页脚)</div>
<div nz-col>
<button nz-button nzType="primary" (click)="nzxPrintV.print()">
下载打印评价表
</button>
</div>
</div>
<div nz-row nzJustify="center">
<nzx-print-v
#nzxPrintV
[enablePreview]="true"
printTitle="HUAWEI Mate 60 Pro评价表"
>
<div nzxPrintHeader>
我是header不参与打印
<button nz-button nzType="primary" (click)="nzxPrintV.refresh()">
刷新
</button>
</div>
<div nzxPrintContent [identifierStr]="'.mate-pro-header'">
<nzx-good-evaluate-pdf-v></nzx-good-evaluate-pdf-v>
</div>
</nzx-print-v>
</div>
<div nz-row nzJustify="center">
<nzx-print-v
#nzxPrintV
[enablePreview]="true"
printTitle="HUAWEI Mate 60 Pro评价表"
>
<div nzxPrintHeader>
我是header不参与打印
<button nz-button nzType="primary" (click)="nzxPrintV.refresh()">
刷新
</button>
</div>
<div nzxPrintContent [identifierStr]="'.mate-pro-header'">
<nzx-good-evaluate-pdf-v></nzx-good-evaluate-pdf-v>
</div>
</nzx-print-v>
</div>
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>
基于paged.js实现(目前bug比较多推荐使用vivliostyle,支持分页,页眉页脚)
</div>
<div nz-col>
<button nz-button nzType="primary" (click)="nzxPrint.print()">
下载打印评价表
</button>
</div>
</div>
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>
基于paged.js实现(目前bug比较多推荐使用vivliostyle,支持分页,页眉页脚)
</div>
<div nz-col>
<button nz-button nzType="primary" (click)="nzxPrint.print()">
下载打印评价表
</button>
</div>
</div>
<div nz-row nzJustify="center">
<nzx-print
#nzxPrint
[enablePreview]="true"
[identifierStr]="'.mate-pro-header'"
[pagedCDN]="'https://unpkg.com/pagedjs/dist/paged.polyfill.js'"
printTitle="HUAWEI Mate 60 Pro评价表"
>
<div nzxPrintHeader>
我是header不参与打印
<button nz-button nzType="primary" (click)="nzxPrint.refresh()">
刷新
</button>
</div>
<div nzxPrintContent>
<nzx-good-evaluate-pdf></nzx-good-evaluate-pdf>
</div>
</nzx-print>
</div>
<div nz-row nzJustify="center">
<nzx-print
#nzxPrint
[enablePreview]="true"
[identifierStr]="'.mate-pro-header'"
[pagedCDN]="'https://unpkg.com/pagedjs/dist/paged.polyfill.js'"
printTitle="HUAWEI Mate 60 Pro评价表"
>
<div nzxPrintHeader>
我是header不参与打印
<button nz-button nzType="primary" (click)="nzxPrint.refresh()">
刷新
</button>
</div>
<div nzxPrintContent>
<nzx-good-evaluate-pdf></nzx-good-evaluate-pdf>
</div>
</nzx-print>
</div>
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>普通打印</div>
<div nz-col>
<button
nz-button
nzType="primary"
nzxPrint
[printEl]="printRef"
printTitle="评价表"
>
下载打印评价表
</button>
</div>
</div>
<div nz-row nzJustify="center">
<div #printRef>
<nzx-good-evaluate-pdf></nzx-good-evaluate-pdf>
</div>
</div>
`,
<div nz-row nzJustify="space-between" nzAlign="middle">
<div nz-col>普通打印</div>
<div nz-col>
<button
nz-button
nzType="primary"
nzxPrint
[printEl]="printRef"
printTitle="评价表"
identifierStr=".mate-pro"
>
下载打印评价表
</button>
</div>
</div>
<div nz-row nzJustify="center">
<div #printRef>
<nzx-good-evaluate-pdf></nzx-good-evaluate-pdf>
</div>
</div>
`,
})
export class NzxPrintExampleComponent {}

0 comments on commit 25a5d03

Please sign in to comment.