Skip to content

tinper-acs/ac-qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ac-qrcode

npm version Build Status Coverage Status devDependency Status NPM downloads Average time to resolve an issue Percentage of issues still open

react ac-qrcode component for tinper-bee

some description...

依赖

  • react >= 15.3.0
  • react-dom >= 15.3.0
  • prop-types >= 15.6.0

使用方法

npm install ac-qrcodes --save


import AcQrcode from "ac-qrcodes";

render(){
    return (<div>
                <AcQrcode
                    value={"http://tinper.org/"}
                    size={128}
                    bgColor={"#ffffff"}
                    fgColor={"#000000"}
                    level={"L"}
                    includeMargin={false}
                    renderAs={"svg"}
                />
    </div>)
}

API

参数 类型 默认值
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

开发调试

$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/ac-qrcode
$ cd ac-qrcode
$ npm install
$ npm run dev