You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.4 KiB

const codeInput = {
adjustPosition: true,
maxlength: 6,
dot: false,
mode: 'box',
hairline: false,
space: 10,
value: '',
focus: false,
bold: false,
color: '#606266',
fontSize: 18,
size: 35,
disabledKeyboard: false,
borderColor: '#c9cacc',
disabledDot: true
}
export default {
props: {
// 键盘弹起时,是否自动上推页面
adjustPosition: {
type: Boolean,
default: codeInput.adjustPosition
},
// 最大输入长度
maxlength: {
type: [String, Number],
default: codeInput.maxlength
},
// 是否用圆点填充
dot: {
type: Boolean,
default: codeInput.dot
},
// 显示模式box-盒子模式line-底部横线模式
mode: {
type: String,
default: codeInput.mode
},
// 是否细边框
hairline: {
type: Boolean,
default: codeInput.hairline
},
// 字符间的距离
space: {
type: [String, Number],
default: codeInput.space
},
// 预置值
value: {
type: [String, Number],
default: codeInput.value
},
// 是否自动获取焦点
focus: {
type: Boolean,
default: codeInput.focus
},
// 字体是否加粗
bold: {
type: Boolean,
default: codeInput.bold
},
// 字体颜色
color: {
type: String,
default: codeInput.color
},
// 字体大小
fontSize: {
type: [String, Number],
default: codeInput.fontSize
},
// 输入框的大小,宽等于高
size: {
type: [String, Number],
default: codeInput.size
},
// 是否隐藏原生键盘如果想用自定义键盘的话需设置此参数为true
disabledKeyboard: {
type: Boolean,
default: codeInput.disabledKeyboard
},
// 边框和线条颜色
borderColor: {
type: String,
default: codeInput.borderColor
},
// 是否禁止输入"."符号
disabledDot: {
type: Boolean,
default: codeInput.disabledDot
}
}
}