Skip to content

neilzhengzx/react-native-barCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-qrcode'来使用

Usage

import {BarCode,QRCode} from 'react-native-barcode-qrcode'
<BarCode    value={this.props.payCode}
            width="225"
            height="90"
            bgColor="#e7e7eb"
           />
    <QRCode value={this.props.payCode}
            bgColor="#fff"
            fgColor="#333"/>

效果如下:

About

采用React Native WebView组件实现的BarCode(条形码)、(QRCode)二维码

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%