0.0.1 • Published 8 years ago
vue-qrcode2 v0.0.1
vue-qrcode
Install
npm install vue-qrcode2 -S
yarn add vue-qrcode2QuickStart
require('vue-qrcode/dist/vue-qrcode.css');
// in ES6 modules
import qrcode from 'vue-qrcode';
// in CommonJS
const qrcode = require('vue-qrcode');
// in Global variable
const qrcode = VueQrcode.default;
Vue.use(qrcode);<qrcode :value="qrCode" :size="300"/>Params
props
background: Background color of the QR codebackgroundAlpha: Background alpha of the QR codeforeground: Foreground color of the QR codeforegroundAlpha: Foreground alpha of the QR codelevel: Error correction level of the QR code (L, M, Q, H)mime: MIME type used to render the image for the QR codepadding: Padding for the QR code (pixels)size: Size of the QR code (pixels)value: Value encoded within the QR code
You may use all of these props to change the format of your QR code.
Preview

0.0.1
8 years ago