Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ac-qrcodes

Package Overview
Dependencies
Maintainers
12
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-qrcodes

二维码组件

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
12
Weekly downloads
 
Created
Source

ac-qrcode

二维码组件

image

npm version NPM downloads

在线演示:https://tinper-acs.github.io/ac-qrcode/

代码演示

1. 简介

React二维码组件,使用底层核心算法qr.js进行组件封装,提供标准的功能展示,具有Level、前景、背景颜色设置、大小设置、边框间距设置、SVG和Canvas格式等

2. 安装

  1. 通过npm安装
    npm install ac-qrcodes --save
    
  2. 国内镜像通过cnpm安装
    cnpm install ac-qrcodes --save
    
  3. 用友内网通过ynpm安装
    ynpm install ac-qrcodes --save
    

3. 使用

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>)
}

4. API

参数类型默认值
valuestring
renderAsstring ('canvas' 'svg')'canvas'
sizenumber128
bgColorstring (CSS color)"#FFFFFF"
fgColorstring (CSS color)"#000000"
levelstring ('L' 'M' 'Q' 'H')'L'
includeMarginbooleanfalse

5. CHANGLOG

Keywords

FAQs

Package last updated on 04 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc