7π
β
i test your code and it works for me by the way i explain my steps for you, maybe you forget one step:
- install package with
npm install vue-qrcode-reader
- make file named
qr.js
in myplugin
folder - then put this code on it:
import Vue from 'vue'
import VueQrcodeReader from 'vue-qrcode-reader'
Vue.use(VueQrcodeReader)
- add plugin to my
nuxt.config.js
file :
plugins: ['~/plugins/qr']
NOTE:qr
is the name of my file(qr.js)
- use the plugin in my vue page with adding following code in itβs place:
<qrcode-stream></qrcode-stream>
<qrcode-drop-zone></qrcode-drop-zone>
<qrcode-capture></qrcode-capture>
π€Ali Hosseini
Source:stackexchange.com