1.2.9 react 二维码生成
react 二维码组件
Installation
npm install qrcode.react
or
yarn add qrcode.react
1
2
3
4
5
6
2
3
4
5
6
Usage
var React = require('react');
var QRCode = require('qrcode.react');
React.render(
<QRCode value="http://facebook.github.io/react/" />,
mountNode
);
1
2
3
4
5
6
7
2
3
4
5
6
7
props
prop | type | default value |
---|---|---|
value | string | |
renderAs | string ('canvas' 'svg' ) | 'canvas' |
size | number | 128 |
bgColor | string (CSS color) | "#FFFFFF" |
fgColor | string (CSS color) | "#000000" |
level | string ('L' 'M' 'Q' 'H' ) | 'L' |
includeMargin | boolean | false |
- demo: http://zpao.github.io/qrcode.react/