Skip to content

Commit

Permalink
Chore: bump verstion to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Miaonster committed Dec 11, 2019
1 parent 5c5dbc3 commit ae1f9ef
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 16 deletions.
55 changes: 40 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Taro Code
=========
# Taro Code

> QRCode & Barcode component for [Taro.js](https://taro.js.org), inspired by [wx-mini-qrcode](https://github.com/flyingsouthwind/wx-mini-qrcode) and [wxbarcode](https://github.com/alsey/wxbarcode).
Expand All @@ -20,11 +19,17 @@ import Taro from '@tarojs/taro'
import { Barcode, QRCode } from 'taro-code'

class Code extends Taro.Component {
render () {
render() {
return (
<View>
<Barcode text='hello' width={305} height={68} />
<QRCode text='world' size={130} />
<Barcode text='hello' width={305} height={68} scale={4} />
<QRCode
text='world'
size={130}
scale={4}
errorCorrectLevel='M'
typeNumber={2}
/>
</View>
)
}
Expand All @@ -37,27 +42,47 @@ class Code extends Taro.Component {

#### text

* Type: `string`
* Default: `''`
- Type: `string`
- Default: `''`

#### width

* Type: `number`
* Default: `375`
- Type: `number`
- Default: `375`

#### height

* Type: `number`
* Default: `80`
- Type: `number`
- Default: `80`

#### scale

- Type: `number`
- Default: `4`

### QRCode

#### text

* Type: `string`
* Default: `''`
- Type: `string`
- Default: `''`

#### size

* Type: `number`
* Default: `300`
- Type: `number`
- Default: `300`

#### scale

- Type: `number`
- Default: `4`

#### typeNumber

- Type: `number`
- Default: `2`

#### errorCorrectLevel

- Type: `string`
- Default: `'M'`
2 changes: 1 addition & 1 deletion src/components/Qrcode/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function QRCode({ text, size, scale, typeNumber, errorCorrectLevel }) {
QRCode.defaultProps = {
text: '',
size: 100,
scale: 3,
scale: 4,
errorCorrectLevel: 'M',
typeNumber: 2,
}
Expand Down

0 comments on commit ae1f9ef

Please sign in to comment.