npm.io
0.0.2 • Published 6 years ago

vue-barcode-free

Licence
MIT
Version
0.0.2
Deps
1
Size
1.2 MB
Vulns
0
Weekly
0
Stars
212

vue-barcode

Build Status Coverage Status Downloads Version Dependencies

Bar code component for Vue.js, bases on JsBarcode.

Table of contents

Main

dist/
├── vue-barcode.js        (UMD)
├── vue-barcode.min.js    (UMD, compressed)
├── vue-barcode.common.js (CommonJS)
└── vue-barcode.esm.js    (ES Module)

Getting started

Install
npm install @chenfengyuan/vue-barcode vue

In browser:

<script src="/path/to/vue.js"></script>
<script src="/path/to/vue-barcode.js"></script>
<script>Vue.component(VueBarcode.name, VueBarcode);</script>
Usage
import Vue from 'vue';
import VueBarcode from '@chenfengyuan/vue-barcode';

Vue.component(VueBarcode.name, VueBarcode);
<barcode value="Hello, World!" :options="{ displayValue: false }"></barcode>

back to top

Props

value
  • Type: String

The value of the bar code.

options
  • Type: Object

The options for the bar code generator. References the JsBarcode's options.

tag
  • Type: String
  • Default: 'canvas'
  • Options: 'canvas', 'svg' and 'img'

The tag name of the component's root element.

Browser support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Opera (latest)
  • Edge (latest)
  • Internet Explorer 9+

Versioning

Maintained under the Semantic Versioning guidelines.

License

MIT Chen Fengyuan

back to top

Keywords