# xprint

> ## install ``` npm install --save xprint ``` ```js import XPrint from 'xprint' import 'xprint/dist/vue-print.css' Vue.use(XPrint) ```

Latest version **0.2.4** (published 2019-01-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install xprint
pnpm add xprint
yarn add xprint
bun add xprint
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2019-01-27 |
| First published | 2019-01-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 678.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | sincerity |

## Links

- npm: https://www.npmjs.com/package/xprint
- npm.io page: https://npm.io/package/xprint

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.21

## Recent versions

- 0.2.4 (latest) — 2019-01-27
- 0.2.3 — 2019-01-27
- 0.2.2 — 2019-01-27
- 0.2.1 — 2019-01-27
- 0.2.0 — 2019-01-27
- 0.1.1 — 2019-01-27
- 0.1.0 — 2019-01-27

## README

# xprint

## install
```
npm install --save xprint
```
```js
import XPrint from 'xprint'
import 'xprint/dist/vue-print.css'
Vue.use(XPrint)
```

## config
```js
import XPrint from 'xprint'
import 'xprint/dist/vue-print.css'
Vue.use(XPrint, {
  beforePrint() { // 打印前
    document.body.style.backgroundColor = '#f00'
  },
  afterPrint() { // 打印后
    document.body.style.backgroundColor = '#0ff'
  }
})
```
## use
```html
  <xpage class="page"></xpage>
  <xpage class="page" white></xpage>
```
## methods
```js
// vue prototype $xprint methods(window.print())
vm.$xprint()
```
*******

## demo
[github](https://github.com/ChaoLeer/xprint-demo)
[npm](https://www.npmjs.com/package/xprint)

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

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