Git Product home page Git Product logo

rax-barcode's Introduction

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

属性 类型 默认值 必填 描述 支持
data string - true 数据 browserweexminiApp
type string CODE128 false 类型 browserweexminiApp
style object {width:500,height:200} false 样式 browserweexminiApp
option object - 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 });

rax-barcode's People

Contributors

yacheng avatar yuanyan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.