Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Vapor-Team/vueQr-new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue components

npm npm npm

快速安装

install

快速添加 vueqr-new 组件到 app 中

npm install --save vueqr-new

components

<template>
  <div>
    <vue-qr :config="config" :text="text"></vue-qr>
  </div>
</template>
<script>
import vueQr from 'vueqr-new'
const config = {
  // 容错等级
  errorCorrectionLevel: 'H',
  // 图片类型
  type: 'image/png',
  rendererOpts: {
  quality: 0.3
  },
  // 边框与二维码之间的间距
  margin: 0,
  // 缩放倍数
  scale: 4,
  width: 500,
  maskPattern:1,
  color: {
  dark: '#000000',
  light : "#ffffff"
  },
  style: {
  width: '128px',
  border: '1px solid #ccc'
  }
}
export default {
  data() {
    return {
      text: 'https://example.com',
      config: config
    }
  },
  components: {
      vueQr
  }
}
</script>

Component props

| 属性 | 类型 | 属性描述 | |------|------|--------------|---------| | config | Object | qrcode option | | text | String | qrcode value |

参考代码

"node-qrcode"

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages