1.5.1 • Published 3 years ago

vue-qr-print v1.5.1

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

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

PropType (Range)DefaultRequired
isStartPrintBooleantrue
qrCodeIdStringtrue
qrCodeIdTextStringfalse
isShowQrCodeIdBooleanfalsefalse
headerSvgStringfalse
logoSvgStringfalse
qrSizeString (s, m, l)mfalse
titleStringfalse
subtitleStringfalse

License

MIT

1.5.1

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.2.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago