qrcanvas-vue
qrcanvas-vue
This a QRCode component for use with Vue.js, based on qrcanvas.
Usage
Note: qrcanvas-vue@2 works with vue@2, qrcanvas-vue@3 works with vue@3.
-
With bundlers:
# Installation $ npm i vue@next qrcanvas-vue -
In browser:
<script src="https://cdn.jsdelivr.net/combine/npm/qrcanvas@3,npm/qrcanvas-vue@3"></script> <div id="root"> <qr-canvas :options="options" @updated="onUpdated"></qr-canvas> </div>
See examples for more usage.
Props
-
optionsis passed to qrcanvas. For more details, see qrcanvas docs. -
Be sure to pass a new
optionsobject if data is updated:this.options = Object.assign({}, this.options, { data: 'new data', });
Events
-
beforeUpdateFired before the canvas is updated. The only parameter is the canvas.
-
updatedFired after the canvas is updated. The only parameter is the canvas.
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 3.1.0 | ISC | |
| 3.0.0 | ISC | |
| 2.1.1 | ISC | |
| 2.1.0 | ISC | |
| 2.0.5 | ISC | |
| 2.0.4 | ISC | |
| 2.0.3 | ISC | |
| 2.0.2 | ISC | |
| 2.0.1 | ISC | |
| 2.0.0 | ISC | |
| 1.2.1 | ISC | |
| 1.2.0 | ISC | |
| 1.1.0 | ISC | |
| 1.0.3 | ISC | |
| 1.0.2 | ISC | |
| 1.0.1 | ISC | |
| 1.0.0 | ISC |
Pre-releases (1)
| Version | Released | License |
|---|---|---|
| 1.2.0-0 | ISC |