1.4.3 • Published 4 years ago
@gaohan/taro-code v1.4.3
Taro Code
QRCode & Barcode component for Taro.js, inspired by wx-mini-qrcode and wxbarcode.
Getting Started
Install
yarn add taro-code
# or
npm install taro-code
Usage
import Taro from '@tarojs/taro'
import { Barcode, QRCode } from 'taro-code'
class Code extends Taro.Component {
render () {
return (
<View>
<Barcode text='hello' width={305} height={68} />
<QRCode text='world' size={130} />
</View>
)
}
}
Props
Barcode
text
- Type:
string
- Default:
''
width
- Type:
number
- Default:
375
height
- Type:
number
- Default:
80
QRCode
text
- Type:
string
- Default:
''
size
- Type:
number
- Default:
300