Giter Site home page Giter Site logo

Comments (5)

gruhn avatar gruhn commented on May 19, 2024 2

Thanks for taking the time 😀 👍

I believe _events is a property also used internally by Vue. I'm not sure what the difference to $listeners is though.

I'd love to support quasar and find out why it's not working already but I hope there is a solution which is based on Vues official API.

from vue-qrcode-reader.

maclaine-san avatar maclaine-san commented on May 19, 2024 1

After hours of debugging I have found what was the reason why the vue instance property this.$listeners is undefined. It turned out quasar has a custom event handling instance property that handles the events called _events.
So in order for it to work with quasar-framework I updated your QrcodeReader.vue component a little bit, changed the this.$listeners to this._events on shouldScan() and shouldLocate() computed functions.

Looking forward for a full quasar-framework support in the future.
Nice work with the package btw.

from vue-qrcode-reader.

gruhn avatar gruhn commented on May 19, 2024

Hey, I haven't worked with quasar yet but I can't think of an obvious reason why it should be a problem.

vue-qrcode-reader checks if event handlers for locate and/or decode are registered by its parent component. This can be checked using the instance property vm.$listeners. If no handlers are registered, continuously locating and decoding (which is rather expensive) would be unecessary and is therefore omitted.

Now it seems like $listeners is not available in your component instance for some reason. Maybe this is a bug or quasar interferes here...

Could you share your source or provide detailed steps to reproduce?

from vue-qrcode-reader.

chameleonbr avatar chameleonbr commented on May 19, 2024

Hi @maclaine-san, you could send me sample code to use this module inside quasar framework? I have problems with postCSS or something like that.
Thanks.

from vue-qrcode-reader.

gruhn avatar gruhn commented on May 19, 2024

This might be fixed now. $listener is not used anymore.

from vue-qrcode-reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.