How to generate barcode with vue.js
This article mainly shares with you the method of generating barcodes with vue.js, mainly in the form of code. I hope it can help you.
1. Download the plug-in
npm install @xkeshi/vue-barcode //下载条形码插件
2. Introduce the plug-in into main.js
import VueBarcode from '@xkeshi/vue-barcode'; //导入条形码插件ue.component('barcode', VueBarcode); //声明条形码组件
<p class="printOrder" v-for="(v,k) in list"> <barcode :value="v.barcodes" :options="barcode_option" tag="svg" ></barcode> </p>//注意,要答应的内容不能出现汉字,否则显示不出来,可以有空格特殊字符等data(){ return{ barcode_option:{ displayValue: true, //是否默认显示条形码数据 //textPosition :'top', //条形码数据显示的位置 background: '#fff', //条形码背景颜色 valid: function (valid) { console.log(valid) }, width:'1px', height: '55px', fontSize: '22px' //字体大小 }, list:[{barcodes:'A01-01-01'},{barcodes:'A01-01-01'}] } },
Related recommendations:
php generate code128 barcode example Share
How to use PHP to generate barcode images
The above is the detailed content of How to generate barcode with vue.js. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to implement an online speech recognition system using WebSocket and JavaScript

WebSocket and JavaScript: key technologies for implementing real-time monitoring systems

How to implement an online reservation system using WebSocket and JavaScript

How to use JavaScript and WebSocket to implement a real-time online ordering system

Simple JavaScript Tutorial: How to Get HTTP Status Code

JavaScript and WebSocket: Building an efficient real-time weather forecasting system

How to get HTTP status code in JavaScript the easy way

How to use insertBefore in javascript
