# vue-printjs

> 原生打印vue插件

Latest version **1.0.0** (published 2019-08-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-printjs
pnpm add vue-printjs
yarn add vue-printjs
bun add vue-printjs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-08-16 |
| First published | 2019-08-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 440 |
| Author | xyl666 |
| Maintainers | xyl666 |
| Keywords | 原生打印插件 |

## Links

- npm: https://www.npmjs.com/package/vue-printjs
- Repository: https://github.com/xyl66/vuePlugs_printjs
- Homepage: https://github.com/xyl66/vuePlugs_printjs#readme
- Issues: https://github.com/xyl66/vuePlugs_printjs/issues
- npm.io page: https://npm.io/package/vue-printjs

## Recent versions

- 1.0.0 (latest) — 2019-08-16

## README

# vuePlugs_printjs
vue打印插件
**使用方法**

```
import Print from 'vue-printjs'
Vue.use(Print) // 注册
<template>
<section ref="print">
	打印内容
	<div class="no-print">不要打印我</div>
</section>
</template>
this.$print(this.$refs.print) // 使用
```
<font color=#c00 >注意事项</font>
需使用ref获取dom节点，若直接通过id或class获取则webpack打包部署后打印内容为空
**指定不打印区域**
方法一. 添加no-print样式类
```
<div class="no-print">不要打印我</div>
```
方法二. 自定义类名
```
<div class="do-not-print-me-xxx">不要打印我</div>
this.$print(this.$refs.print,{'no-print':'.do-not-print-me-xxx'}) // 使用
```

---
_Source: https://npm.io/package/vue-printjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
