le-print
le-print
描述: A print edit control based on Vue3, Element-Plus,Lodop
安装:
npm i le-print
使用
//main.ts
import { usePrint } from 'le-print'
import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
usePrint(app)
app.mount('#app', true)
<template>
<print
:component-options="OutStockOptions"
:paper-size-options="paperSizeOptions"
:print-data="data"
:template="template"
/>
</template>
<script lang="ts" setup>
import print from 'le-print'
import 'le-print/dist/style.css'
import { OutStockOptions, paperSizeOptions, data, template } from './data'
</script>
| 属性 | 说明 | 类型 |
|---|---|---|
| ComponentOptions | 可选项组件 | Array |
| PaperSizeOptions | 纸张选项 | Object |
| PrintData | 打印的数据 | Object |
| template | 默认打开的模板 | Object |
ComponentOptions [ ]
| 属性 | 说明 | 类型 |
|---|---|---|
| type | ddedit:自定义文本, html:分页, LdTable:表格 | 'ddedit' | 'html' | 'LdTable' |
| isEdit | 是否允许编辑 | Boolean |
| title | 选项中的文字 | String |
| value | 显示值,打印的缺省value | String |
| defaultValue | 打印的缺省value | String |
| width | 默认宽度 | String |
| height | 默认高度 | String |
| left | 默认left值 | String |
| top | 默认top值 | String |
| style | 默认样式 | { FontSize:number } |
PaperSizeOptions[]
| 属性 | 说明 | 类型 |
|---|---|---|
| name | 选项中的name | String |
| width | 纸张宽度 | Number |
| height | 纸张高度 | Number |
| id | 纸张id,唯一值(id为0已经被使用,从id为1开始) | Number |
template[]
默认模板
事件
| 事件名 | 描述 | 类型 |
|---|---|---|
| saveTemalmte | 点击保存模板时触发,返回模板数据 | - |
Related Packages
vue-easy-print
Use the vue component slot for template printing Use iframe to copy the print ar...
25,269
86
@afwenming123/vue-plugin-hiprint
hiprint for Vue2.x / Vue3.x 支持拖拽(分页(不分页)、表头表脚、样式设置、复制粘贴...
6,197
1,739
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.3.5 | ^3.2.25 | MIT | |
| 0.3.4 | ^3.2.25 | MIT | |
| 0.3.3 | ^3.2.25 | MIT | |
| 0.3.2 | ^3.2.25 | MIT | |
| 0.3.1 | ^3.2.25 | MIT | |
| 0.3.0 | ^3.2.25 | MIT | |
| 0.2.997 | ^2.0.0 || | MIT | |
| 0.2.996 | ^2.0.0 || | MIT | |
| 0.2.995 | ^3.2.25 | MIT | |
| 0.2.994 | ^3.2.25 | MIT | |
| 0.2.993 | ^3.2.25 | MIT | |
| 0.2.992 | ^3.2.25 | MIT | |
| 0.2.991 | ^3.2.25 | MIT | |
| 0.2.971 | ^3.2.25 | MIT | |
| 0.2.97 | ^3.2.25 | MIT | |
| 0.2.96 | ^3.2.25 | MIT | |
| 0.2.95 | ^3.2.25 | MIT | |
| 0.2.94 | ^3.2.25 | MIT | |
| 0.2.93 | ^3.2.25 | MIT | |
| 0.2.92 | ^3.2.25 | MIT | |
| 0.2.91 | ^3.2.25 | MIT | |
| 0.2.9 | ^3.2.25 | MIT | |
| 0.2.8 | ^3.2.25 | MIT | |
| 0.2.7 | ^3.2.25 | MIT | |
| 0.2.6 | ^3.2.25 | MIT | |
| 0.2.5 | ^3.2.25 | MIT | |
| 0.2.4 | ^3.2.25 | MIT | |
| 0.2.3 | ^3.2.25 | MIT | |
| 0.2.2 | ^3.2.25 | MIT | |
| 0.2.1 | ^3.2.25 | MIT |
Showing the latest 30 of 41. See every release on npm