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

rax-barcode

Package Overview
Dependencies
Maintainers
6
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.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

npm

描述:

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

安装

$ npm install rax-barcode --save

引用

import Barcode from "rax-barcode";

属性

注: 1、支持列表中的 browser代表 h5 weex代表 weex miniApp代表小程序 2、支持目前仅支持: CODE39,CODE128, CODE128A, CODE128B, CODE128C 3、参数参考https://github.com/lindell/JsBarcode

属性类型默认值必填描述支持
datastring-true数据browserweexminiApp
typestringCODE128false类型browserweexminiApp
styleobject{width:500,height:200}false样式browserweexminiApp
optionobject-false参数browserweexminiApp

示例

import { createElement, render, Component } from "rax";
import DU 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: DU });

Keywords

FAQs

Package last updated on 01 Aug 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