Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
rax-barcode
Advanced tools
描述:
Barcode 用于显示条形码,基于 Canvas 实现
$ npm install rax-barcode --save
import Barcode from "rax-barcode";
注:
支持列表中的 代表 h5 代表 weex 代表阿里小程序 代表微信小程序
支持目前仅支持: CODE39,CODE128, CODE128A, CODE128B, CODE128C
options 除列出参数外,其余参数请参考 https://github.com/lindell/JsBarcode
属性 | 类型 | 默认值 | 必填 | 描述 | 支持 |
---|---|---|---|---|---|
data | string | - | ✔️ | 数据 | |
type | string | CODE128 | ✘ | 类型 | |
style | object | {width:500,height:200} | ✘ | 样式 | |
option | object | - | ✘ | 参数 |
属性 | 类型 | 默认值 | 必填 | 描述 |
---|---|---|---|---|
barWidth | number | 2 | ✘ | 单个条码的宽度 |
fillColor | string | - | ✘ | 数据块填充色 |
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 });
FAQs
barcode component for Rax.
We found that rax-barcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.