Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the method that Vue uses vue-qr to generate QR codes?

Shulou Source: shulou.com Published: 2022-06-02 07:23:23 10月05日 Update

The main content of this article is to explain "what is the method of Vue using vue-qr to generate QR code", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the method of generating QR codes using vue-qr by Vue?"

The English name of "QR Code" is "QR Code", and "QR" is the abbreviation of "Quick Response", which reflects that this kind of QR code has the characteristic of "ultra-high speed reading". "Quick Response Code" means "fast response code".

Download npm install vue-qr-- save from npm

Downloaded successfully:

Step (1) Import import VueQr from 'vue-qr' (2) vue-qr parameters

Text QR code, that is, the page that jumps after scanning the QR code

Size QR code size

The outer margin of the margin QR code image, default 20px

BgSrc embedded background image address

LogoSrc embedded into the LOGO address of the center of the QR code

The size of the middle diagram of logoScale

The size of the points of dotScale QR code

The color of the colorDark solid point (Note: it is only valid if set with colorLight)

The color of colorLight white space (Note: set with colorDark is valid)

If autoColor is true, the main color of the background image will be the color of the solid point, that is, colorDark. The default is true.

Example import VueQr from 'vue-qr'export default {name:'', components: {VueQr,}, data () {return {imgUrl:' https://baidu.com', logo: require ('@ / assets/tea_128.png'),}}, methods: {},} so far I believe that everyone has a deeper understanding of "what is the method of generating QR codes using vue-qr in Vue", so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: 2D QR code method color generation valid content address size background learning practical deeper successful that is interest parameters image practicality practicality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia MySQL Redmi vpn