v-qrcode

a qrcode component for vue
11,139
Install
npm install v-qrcode
Latest Version:1.0.3
Vue:2
License:ISC
Last Updated:Feb 2, 2017
Links: npm
Maintainer: atwxp

v-qrcode

A QRCode Component For Vue 2

demo

demo

Install

$ npm i v-qrcode --save

Usage

ES6

<template>
    <div>
        <qrcode :cls="qrCls" :value="qrText"></qrcode>
    </div>
</template>

<script>
import Qrcode from 'v-qrcode'

export default {
    data () {
        return {
            qrCls: 'qrcode',

            qrText: 'hello world'
        }
    },

    components: {
        Qrcode
    }
}
</script>

Browser Globals

The dist folder contains v-qrcode.js and v-qrcode.min.js with all components exported in the window.VQrcode object.

<script src="path/to/vue.js"></script>
<script src="path/to/v-qrcode.min.js"></script>
<script>
    var qrcode = VQrcode.qrcode;
</script>

Options

prop type default value desc
value string "" the string to generate QR Code
cls string "" the classname of wrapper
size number 100 size of qrcode
level string "L" level of qrcode (L, Q, M, H)
background string "#fff" background color
foreground string "#000" foreground color
mime string "image/png" the mime type of image
padding number 0 the padding between qrcode and wrapper
type string "canvas" the output type can be either canvas or image

Related Packages

vue-qrcode

🤳 A Vue component for QR code generation with `qrcode`

1,342,346 285
qrcanvas-vue

QRCanvas component for Vue.js

40,633 73
qrcode-vue

a vue qrcode base on qr.js

33,873 13
vue-barcode-reader

Vue barcodes and QR codes scanner

512,790 231

Version History

Version Released Vue License
1.0.3 ^2.1.10 ISC
1.0.1 ISC
1.0.0 ISC