vue-barcode

Barcode generator for Vue.js

Github星跟踪图

VueBarcode

Add barcodes to your Vue application super easily with VueBarcode! Try it out!

Supported barcode formats:
CODE128
EAN
EAN-13
EAN-8
EAN-5
EAN-2
UPC (A)
CODE39
ITF-14
MSI
Pharmacode
Codabar

It is a light wrapper for the JsBarcode barcode library.

Install

npm install vue-barcode

Use

1. Add VueBarcode as a component

import VueBarcode from 'vue-barcode';

new Vue({
  components: {
    'barcode': VueBarcode
  }
})

2. Use it

<barcode value="value-to-render" format="barcode-format" ...more options>
  Show this if the rendering fails.
</barcode>

Example

Simple example with input binding. Try it out with this JsFiddle!

<div id="app">
  <input v-model="barcodeValue" /><br>
  <barcode v-bind:value="barcodeValue">
    Show this if the rendering fails.
  </barcode>
</div>
import VueBarcode from 'vue-barcode';

var app = new Vue({
  el: '#app',
  data: {
    barcodeValue: 'test',
  },
  components: {
    'barcode': VueBarcode
  }
})

Options

All options:

format
width
height
text
font-options
font
text-align
text-position
text-margin
font-size
background
lineColor
margin
margin-top
margin-bottom
margin-left
margin-right
display-value

For more information, see the JsBarcode documentation.

主要指标

概览
名称与所有者lindell/vue-barcode
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2017-03-14 16:49:16
推送于2020-09-28 16:50:38
最后一次提交2020-09-28 18:48:59
发布数2
最新版本名称v1.2.0 (发布于 2019-01-30 07:07:28)
第一版名称v1.1.1 (发布于 2019-01-29 21:51:04)
用户参与
星数221
关注者数6
派生数25
提交数28
已启用问题?
问题数28
打开的问题数15
拉请求数6
打开的拉请求数0
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?