1.0.0 • Published 7 years ago

vueqr-new v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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>
// 入口文件
  使用Vue.use()来注册该组件库
  import JackUI from 'vueqr-new'
  Vue.use(JackUI)
<script>
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
    }
  }
}
</script>

Component props

属性类型属性描述
configObjectqrcode option
textStringqrcode value

参考代码

"node-qrcode"

License

MIT

1.0.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago