You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue3-scan-qr

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

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

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

vue3-scan-qr

FAQs

Package last updated on 25 May 2023

Did you know?

Socket

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