0.2.4 • Published 5 years ago

xprint v0.2.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

xprint

install

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

config

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

  <xpage class="page"></xpage>
  <xpage class="page" white></xpage>

methods

// vue prototype $xprint methods(window.print())
vm.$xprint()

demo

github npm

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.

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago