0.1.0 • Published 1 year ago

@browser-print/vue v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@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;
}
OptionDescription
shouldToPrint是否需要打印的回调
shouldToPrintAsync是否需要打印的异步回调

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

0.1.0

1 year ago