uview-next
Version:
基于uView UI 2.0,110+高质量组件库,支持vue2和vue3,支持鸿蒙,支持多语言,搭配便捷工具助力,让开发更得心应手
80 lines (78 loc) • 1.48 kB
JavaScript
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'
}
})