react-native-barcode-qrcode

1.0.0 • Public • Published

react-native-barCode

采用React Native WebView组件实现的BarCode(条形码)、QRCode(二维码),其中QRCode的代码是参考 qrcode,修复了qrcode图片会出现滚动条问题。

实现的原理:在WebView组件下,用canvas组件画出BarCode、QRCode。

效果如下:

条形码与二维码;

Install

安装包:

npm i react-native-barCode --save

通过引用import {BarCode,QRCode} from 'react-native-barCode'来使用

Usage

<BarCode    value={this.props.payCode}
            width="225"
            height="90"
            bgColor="#e7e7eb"
           />
    <QRCode value={this.props.payCode}
            bgColor="#fff"
            fgColor="#333"/>

Dependents (0)

Package Sidebar

Install

npm i react-native-barcode-qrcode

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • chenchunyong