Nanoseconds Produce Minutes

    vue-qr-print

    1.5.1 • Public • Published

    vue-qr-print

    Software License Latest Version on NPM npm

    Installation

    Using NPM:

    $ npm i vue-qr-print

    Usage

    In your main.js file:

    import VueQrPrint from 'vue-qr-print'
    
    Vue.use(VueQrPrint);

    In your components template:

    <template>
        <button @click="onStartPrint">Print</button>
        ...
        <qr-print :isStartPrint="isStartPrint"
                  :qrCodeId="qrCodeId"
                  :qrCodeIdText="qrCodeIdText"
                  :isShowQrCodeId="true"
                  :headerSvg="qrHeaderSvg"
                  :logoSvg="qrLogoSvg"
                  :qrSize="qrSize"
                  :title="qrTitle"
                  :subtitle="qrSubtitle"
                  @endPrint="onEndPrint">
        </qr-print>
    </template>
    <script>
      export default {
        data() {
          return {
            isStartPrint: false,
            qrCodeId: 'qrId',
            qrCodeIdText: 'qrIdText',
            qrHeaderSvg: '<svg>...</svg>',
            qrLogoSvg: '<svg>...</svg>',
            qrSize: 's',
            qrTitle: 'This is QR Code Title',
            qrSubtitle: 'This is QR Code Subtitle'
          }
        },
        methods: {
          onStartPrint() {
            this.isStartPrint = true;
          },
          onEndPrint() {
            this.isStartPrint = false;
          }, 
        }
      }
    </script>

    Props

    Prop Type (Range) Default Required
    isStartPrint Boolean true
    qrCodeId String true
    qrCodeIdText String false
    isShowQrCodeId Boolean false false
    headerSvg String false
    logoSvg String false
    qrSize String (s, m, l) m false
    title String false
    subtitle String false

    License

    MIT


    Install

    npm i vue-qr-print

    DownloadsWeekly Downloads

    11

    Version

    1.5.1

    License

    MIT

    Unpacked Size

    1.37 MB

    Total Files

    17

    Last publish

    Collaborators

    • jess2