fengyuanchen

@chenfengyuan/vue qrcode

QR code component for Vue 3.

Version: 2.0.0 Updated: 04/04/2022 By: fengyuanchen License: MIT

Downloads Last 30 Days: 90.1k

https://github.com/fengyuanchen/vue-qrcode

npm i @chenfengyuan/vue-qrcode
yarn add @chenfengyuan/vue-qrcode

vue-qrcode

Coverage Status Downloads Version Gzip Size

QR code component for Vue 3, bases on node-qrcode. For Vue 2, check out the v1 branch.

Main files

dist/
├── vue-qrcode.js         (UMD, default)
├── vue-qrcode.min.js     (UMD, compressed)
├── vue-qrcode.esm.js     (ECMAScript Module)
├── vue-qrcode.esm.min.js (ECMAScript Module, compressed)
└── vue-qrcode.d.ts       (TypeScript Declaration File)

Getting started

Installation

Using npm:

npm install [email protected]3 [email protected]1 @chenfengyuan/vue-[email protected]2

Using pnpm:

pnpm add [email protected]3 [email protected]1 @chenfengyuan/vue-[email protected]2

Using Yarn:

yarn add [email protected]3 [email protected]1 @chenfengyuan/vue-[email protected]2

Using CDN:

<script src="https://unpkg.com/[email protected]"></script><!-- Vue.js is required -->
<script src="https://unpkg.com/[email protected]/build/qrcode.js"></script><!-- qrocde is required -->
<script src="https://unpkg.com/@chenfengyuan/[email protected]"></script>

Usage

import { createApp } from 'vue';
import VueQrcode from '@chenfengyuan/vue-qrcode';

const app = createApp({});

app.component(VueQrcode.name, VueQrcode);
<vue-qrcode value="Hello, World!" :options="{ width: 200 }"></vue-qrcode>

Browser support

Same as Vue 3.

Versioning

Maintained under the Semantic Versioning guidelines.

License

MIT © Chen Fengyuan

Copyright © 2020 vuejscomponent.com