@browser-print/vue
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@browser-print/vue

Vue2 打印工具

Usage

<template>
  <button v-print="'print-content'">打印</button>
  <button v-print="printObj">打印</button>
  <div id="print-content">
    <!-- print content -->
  </div>
</template>

<script setup>
const printObj = {
  id: 'print-content'
}
</script>

Options

interface PrinterConfig extends PrinterOptions {
  shouldToPrint?: () => boolean;
  shouldToPrintAsync?: (resolve: (shouldPrint: boolean) => void) => void;
}
Option Description
shouldToPrint 是否需要打印的回调
shouldToPrintAsync 是否需要打印的异步回调

更多属性请参考 @browser-print/core

Readme

Keywords

none

Package Sidebar

Install

npm i @browser-print/vue

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

7.62 kB

Total Files

10

Last publish

Collaborators

  • kennys_wang