[Vuejs]-Vue nuxt qrcode reader installation

7πŸ‘

βœ…

i test your code and it works for me by the way i explain my steps for you, maybe you forget one step:

  1. install package with npm install vue-qrcode-reader
  2. make file named qr.js in my plugin folder
  3. then put this code on it:
import Vue from 'vue'
import VueQrcodeReader from 'vue-qrcode-reader'

Vue.use(VueQrcodeReader)
  1. add plugin to my nuxt.config.js file :
  plugins: ['~/plugins/qr']

NOTE:qr is the name of my file(qr.js)

  1. 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

Leave a comment