vueqr-new

1.0.0 • Public • Published

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

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

参考代码

"node-qrcode"

License

MIT

/vueqr-new/

    Package Sidebar

    Install

    npm i vueqr-new

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • js-mark