@mamcharger/mam-print
为了便于将预览和打印功能集成到开发平台,把打印设计器封装成了便于安装的 vue 组件包
750
| Install | |
|---|---|
npm install @mamcharger/mam-print |
|
| Latest Version: | 1.9.10 |
| Vue: | 2 |
| License: | ISC |
| Last Updated: | Jul 22, 2021 |
| Links: | Repository · npm |
Maintainer: calvin_qi
Print-editor vue 组件
为了便于将预览和打印功能集成到开发平台,把打印设计器封装成了便于安装的 vue 组件包
安装
npm install mc-print --save//安装
使用
<!--yourComponent.vue-->
<template>
<div>
<!--your html elements-->
<PrintEditor
:domain="domain"
:tableId="tableId"
:recordId="recordId"
:token="token"
:showPreview="showPreview"
:handler="switchStatus"
/>
</div>
</template>
<script>
import PrintEditor from 'mc-print-editor';
export default {
components: {
PrintEditor,
},
data() {
// 组件接收的props(均为必传)
// 预览所需数据需根据domain和tokenId
// recordId,token进行请求获取
return {
showPreview: false,
domain: 'http://118.31.117.243/api/',
tableId: 'c6e07234f91a488a98f2542c841911d8',
recordId: 'd86c72addeff4acd8bf0155e79ba706d',
token: 'f622123854494c5a8784719a38e65c96',
};
},
methods: {
// 显示和隐藏预览窗口
switchVisible(visible) {
this.showPreview = visible;
},
},
};
</script>
data内声明的属性除showPreview默认值为false外,其他值需自定义
ToDo
- 集成后的本地测试
- 提测后的bug修复
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.9.10 | ^2.6.11 | ISC | |
| 1.9.9 | ^2.6.11 | ISC | |
| 1.2.15 | ^2.6.11 | ISC | |
| 1.2.14 | ^2.6.11 | ISC | |
| 1.2.13 | ^2.6.11 | ISC | |
| 1.2.12 | ^2.6.11 | ISC | |
| 1.2.11 | ^2.6.11 | ISC | |
| 1.2.10 | ^2.6.11 | ISC | |
| 1.2.9 | ^2.6.11 | ISC | |
| 1.2.8 | ^2.6.11 | ISC | |
| 1.2.7 | ^2.6.11 | ISC | |
| 1.2.6 | ^2.6.11 | ISC | |
| 1.2.5 | ^2.6.11 | ISC | |
| 1.2.4 | ^2.6.11 | ISC | |
| 1.2.3 | ^2.6.11 | ISC | |
| 1.2.2 | ^2.6.11 | ISC | |
| 1.2.1 | ^2.6.11 | ISC | |
| 1.1.9 | ^2.6.11 | ISC | |
| 1.1.8 | ^2.6.11 | ISC | |
| 1.1.7 | ^2.6.11 | ISC | |
| 1.1.6 | ^2.6.11 | ISC | |
| 1.1.5 | ^2.6.11 | ISC | |
| 1.1.4 | ^2.6.11 | ISC | |
| 1.1.2 | ^2.6.11 | ISC | |
| 1.1.1 | ^2.6.11 | ISC | |
| 1.1.0 | ^2.6.11 |