Other
打印当前页面内容生成PDF或图片
<lcap-printPage></lcap-printPage>
<lcap-printPage :download=true></lcap-printPage>
<lcap-printPage :download=true fileType="png"></lcap-printPage>
<lcap-printPage :download=true printDOM="body"></lcap-printPage>
<lcap-printPage :download=true canvasWidth="auto" canvasHeight="auto" :isNotFullPage=true></lcap-printPage>
<lcap-printPage :download=true fileName="自定义文件名"></lcap-printPage>
<lcap-printPage :hidden=true></lcap-printPage>
<lcap-printPage :download=true :canvasWidth=1200></lcap-printPage>
<lcap-printPage :download=true canvasWidth="auto" canvasHeight="auto"></lcap-printPage>
Prop/Attr | Type | Options | Default | Description |
---|---|---|---|---|
hidden | boolean | false |
是否显示打印按钮 | |
fileName | string | '文件导出' |
设置打印的文件名称 | |
printDOM | string | 'body' |
设置打印的DOM节点 | |
isNotFullPage | boolean | false |
打印的PDF是否分页 | |
canvasWidth | number|string | 1000 |
设置打印文件的宽度 | |
canvasHeight | number|string | 800 |
设置打印文件的高度 | |
download | boolean | false |
是否自动下载打印的文件 | |
fileType | string |
[object Object] [object Object]
|
'pdf' |
设置打印的文件类型 |
打印时触发
Param | Type | Description |
---|---|---|
$event.file | any | 返还打印的文件流 |
Methods
打印当前页面
Param | Type | Default | Description |
---|