1.0.0 • Published 4 years ago
@layson/vue-create-qrcode v1.0.0
@layson/vue-create-qrcode
插件库简述
适用于vue框架,根据url链接生成二维码图片(可以通过canvas或者img标签生成)
安装
npm install @layson/vue-create-qrcode
使用方法
可以全局组件注册使用,也可以局部组件使用,下面以全局组件方式实现Demo
import Vue from 'vue';
import VueCreateQrCode from '@layson/vue-create-qrcode';
Vue.component(VueCreateQrCode.name, VueCreateQrCode);
<qrcode value="Hello, World!" :options="{ width: 200, height: 200,margin: 0 }"></qrcode>
属性值
该库是对qrcode库进行的二次封装,所以对于配置都可以看 node-qrcode's options.
value(二维码的url链接)
- 类型:
String
- 默认:
undefined
options
- 类型:
Object
- 默认:
undefined
tag
- 类型:
String
- 默认:
'canvas'
- 可选配置:
'canvas'
,'img'
.
1.0.0
4 years ago