1.2.18 • Published 4 years ago

dj_print v1.2.18

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

dj-print-fe

####自定义打印前端组件使用配置

第一步安装组件

npm install dj_print --save

第二步 配置入口APP.vue

<template>
  <div>
    <router-view id="app"/>
    <print-check :showError="false" :store="$store"></print-check>
  </div>
</template>
<script>
import { PrintCheck } from 'dj_print'
export default {
  name: '',
  components: { PrintCheck }
}
</script>

第三步 配置打印需要的store

import { PrintStore } from 'dj_print'
export default new Vuex.Store({
  modules: {
    PrintStore
  }
})

到这,配置完成,可以使用了,组件包括以下功能 1.打印功能 (点"打印"按钮,完成打印功能操作)

// 引用组件
import { PrintDialog } from 'dj_print'
// 调用组件
// printmenuId取值  1:运单  2:调度单 3:客户账单 4:司机账单 5:承运商账单
// api/platform/print/getprintmenu 详细可以查看这个接口  
<print-dialog 
    ref="PrintDialogRef"
    title="承运商打印"
    :store="$store"
    @success=""
    :printmenuId="5">
</print-dialog>     
// Api方法, 只需要将要打印的数据传给API方法即可
// @param rows Array  例如:[{waybillId:1111},{waybillId:2222}]
this.$refs.PrintDialogRef.print(rows)

1.打印模板配置 (就是模板编辑,自定义拖拽操作组件)

// 引用组件
import { PrintEditTemplate } from 'dj_print'
// 调用组件 printtemplateId:模板id
<print-edit-template
    :store="$store"
    ref="PrintEditTemplateRef"
    :printtemplateId="printtemplateId"></print-edit-template>
1.2.18

4 years ago

1.2.16

4 years ago

1.2.17

4 years ago

1.2.15

4 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago