安装依赖包

npm install jsbarcode --save ?

在使用页面引入依赖包

import JsBarcode from 'jsbarcode'

定义img标签和id

<img  />

在使用页面开始生成,可以写在方法中或者mounted中

  JsBarcode('#barcode', 'DY2020080400088', {
      format: 'CODE39',
      lineColor: '#000',
      background: '#EBEEF5',
      width: 2,
      height: 40,
      displayValue: false
    })

相关文章:

  • 1970-01-01
  • 2021-11-17
  • 2021-06-25
  • 2021-11-17
  • 2021-12-08
  • 2021-11-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2021-07-08
  • 2021-06-26
  • 2021-11-27
  • 2023-03-29
相关资源
相似解决方案