12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import { defineProps } from '../../libs/util/props';
- export default defineProps('barcode', {
- // 条形码内容
- value: {
- type: String,
- default: ''
- },
- // 条形码类型
- format: {
- type: String,
- default: 'CODE128'
- },
- // 条形码宽度
- width: {
- type: [String, Number],
- default: 2
- },
- // 条形码高度
- height: {
- type: [String, Number],
- default: 80
- },
- // 条形码颜色
- color: {
- type: String,
- default: '#000000'
- },
- // 背景颜色
- backgroundColor: {
- type: String,
- default: 'transparent'
- },
- // 是否显示文本
- displayValue: {
- type: Boolean,
- default: true
- },
- // 文本位置
- textPosition: {
- type: String,
- default: 'bottom'
- },
- // 画布类型
- canvasType: {
- type: String,
- default: '2d'
- },
- // 字体选项
- fontOptions: {
- type: String,
- default: ''
- },
- // 字体
- font: {
- type: String,
- default: 'monospace'
- },
- // 文本对齐方式
- textAlign: {
- type: String,
- default: 'center'
- },
- // 文本边距
- textMargin: {
- type: Number,
- default: 2
- },
- // 字体大小
- fontSize: {
- type: Number,
- default: 20
- },
- // 显示模式 (image/canvas)
- mode: {
- type: String,
- default: 'image'
- }
- })
|