多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 安装 `npm install --save qrcode.vue # yarn add qrcode.vue ` ## 使用 ``` <template> <div> <qrcode-vue :value="value" :size="size" level="H"></qrcode-vue> </div> </template> <script> import QrcodeVue from 'qrcode.vue'; export default { data() { return { value: 'https://example.com', size: 300 } }, components: { QrcodeVue } } </script> ``` ## 参数 | prop | type | default value | expain | | --- | --- | --- | --- | | `value` | `String` | `''` | qrcode value | | `className` | `String` | `''` | qrcode element className | | `size` | `Number` | `100` | qrcode element size | | `level` | `String` | `L` | Error correction level ('L', 'M', 'Q', 'H') | | `background` | `String` | `#fff` | qrcode background color | | `foreground` | `String` | `#000` | qrcode color |