Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
qrcode.vue
Advanced tools
Changelog
[3.4.1] - 2023-08-05
Readme
⚠️ Now when you are using Vue 3.x, please upgrade qrcode.vue
to 3.x
🔒 if you are using Vue 2.x, please keep using version 1.x
;
A Vue.js component to generate QRCode.
the qrcode.vue
component can use in you Vue.js app.
npm install --save qrcode.vue # yarn add qrcode.vue
dist/
|--- qrcode.vue.cjs.js // CommonJS
|--- qrcode.vue.esm.js // ES module
|--- qrcode.vue.browser.js // UMD for browser or require.js or CommonJS
|--- qrcode.vue.browser.min.js // UMD Minimum size
e.g.
import { createApp } from 'vue'
import QrcodeVue from 'qrcode.vue'
createApp({
data: {
value: 'https://example.com',
},
template: '<qrcode-vue :value="value"></qrcode-vue>',
components: {
QrcodeVue,
},
}).mount('#root')
Or single-file components with a *.vue
extension:
<template>
<qrcode-vue :value="value" :size="size" level="H" />
</template>
<script>
import QrcodeVue from 'qrcode.vue'
export default {
data() {
return {
value: 'https://example.com',
size: 300,
}
},
components: {
QrcodeVue,
},
}
</script>
When you use the component with Vue 3 with TypeScript
:
<template>
<qrcode-vue :value="value" :level="level" :render-as="renderAs" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import QrcodeVue, { Level, RenderAs } from 'qrcode.vue'
const value = ref('qrcode')
const level = ref<Level>('M')
const renderAs = ref<RenderAs>('svg')
</script>
value
string
''
The value content of qrcode.
size
number
100
The size of qrcode element.
render-as
string('canvas' | 'svg')
canvas
Generate QRcode as canvas
or svg
. The prop svg
can work on SSR.
margin
number
0
Define how much wide the quiet zone should be.
level
string('L' | 'M' | 'Q' | 'H')
H
qrcode Error correction level (one of 'L', 'M', 'Q', 'H'). Know more, wikipedia: QR_code.
background
string
#ffffff
The background color of qrcode.
foreground
string
#000000
The foreground color of qrcode.
class
string
''
The class name of qrcode element.
copyright © 2021 @scopewu, license by MIT
FAQs
A Vue.js component to generate QRCode.
The npm package qrcode.vue receives a total of 99,991 weekly downloads. As such, qrcode.vue popularity was classified as popular.
We found that qrcode.vue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.