Socket
Socket
Sign inDemoInstall

vue3-scan-qr

Package Overview
Dependencies
22
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue3-scan-qr

Javascript QR Code Scanner based on [Cosmo Wolfe's javascript port](https://github.com/cozmo/jsqr) and [Vue3](https://github.com/vuejs/core).


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vue3-scan-qr

Javascript QR Code Scanner based on Cosmo Wolfe's javascript port and Vue3.

Installation

To install via npm:

npm install --save vue3-scan-qr

To install via yarn:

yarn add vue3-scan-qr

Usage

main.js

import VScan from "vue3-scan-qr";
import "../node_modules/vue3-scan-qr/dist/style.css";

createApp(App).use(VScan).mount("#app");

app.vue

<script setup>
    import { ref } from "vue";

    const showScan = ref(false);

    function output(code) {
        console.log(code);
        showScan.value = false;
    }

    function errorCatch(error) {
        console.log(error);
    }
</script>

<template>
    <div>
        <button @click="showScan = true">Scan</button>
        <v-scan
            v-model:visible="showScan"
            @scanned="output"
            @error-catch="errorCatch"
            :head-tip="Tip messages"
        ></v-scan>
    </div>
</template>

Arguments

  • visible - Boolean
  • scanned - Function(code), code is the QR code scanned
  • error-catch - Function(error)
  • head-tip - String

Keywords

FAQs

Last updated on 25 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc