react-qrcode-component
Version:
react qrcode qr.js
33 lines (27 loc) • 576 B
Markdown
```bash
npm install react-qrcode-component
```
```bash
yarn add react-qrcode-component
```
```javascript
import React from 'react'
import ReactDOM from 'react-dom'
import QRCode from 'react-qrcode-component';
ReactDOM.render(
<QRCode value="https://github.com/liuyang1106/react-qrcode.git" />,
mountNode
);
```
```javascript
value: '', // 需要转换的参数
size: 128, // 二维码大小
style: {}, // canvas样式
level: 'L',
bgColor: 'white',
fgColor: 'black',
scale: window.devicePixelRatio || 1, // 比例
```