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

rax-barcode

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-barcode

barcode component for Rax.

  • 1.1.1-0
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
2
Weekly downloads
 
Created
Source

rax-barcode

npm

支持

Web / Weex / 阿里小程序 / 微信小程序

描述

Barcode 用于显示条形码,基于 Canvas 实现

安装

$ npm install rax-barcode --save

属性

  1. 支持目前仅支持: CODE39,CODE128, CODE128A, CODE128B, CODE128C

  2. options 除列出参数外,其余参数请参考 https://github.com/lindell/JsBarcode

属性类型默认值必填描述支持
datastring-✔️数据browserweexminiAppwechatMiniprogram
typestringCODE128类型browserweexminiAppwechatMiniprogram
styleobject{width:500,height:200}样式browserweexminiAppwechatMiniprogram
optionobject-参数browserweexminiAppwechatMiniprogram

options 详解

属性类型默认值必填描述
barWidthnumber2单个条码的宽度
fillColorstring-数据块填充色

示例

import { createElement, render, Component } from "rax";
import DriverUniversal from "driver-universal";
import View from "rax-view";
import BarCode from "rax-barcode";

class App extends Component {
  constructor() {
    super();
  }

  render() {
    return (
      <View style={{ flex: 1 }}>
        <BarCode
          data={"123456789"}
          options={{
            fillColor: "red"
          }}
        />
      </View>
    );
  }
}

render(<App />, document.body, { driver: DriverUniversal });

Keywords

FAQs

Package last updated on 25 Mar 2021

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