props.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import defprops from '../../libs/config/props';
  2. export default {
  3. props: {
  4. // 键盘弹起时,是否自动上推页面
  5. adjustPosition: {
  6. type: Boolean,
  7. default: defprops.codeInput.adjustPosition
  8. },
  9. // 最大输入长度
  10. maxlength: {
  11. type: [String, Number],
  12. default: defprops.codeInput.maxlength
  13. },
  14. // 是否用圆点填充
  15. dot: {
  16. type: Boolean,
  17. default: defprops.codeInput.dot
  18. },
  19. // 显示模式,box-盒子模式,line-底部横线模式
  20. mode: {
  21. type: String,
  22. default: defprops.codeInput.mode
  23. },
  24. // 是否细边框
  25. hairline: {
  26. type: Boolean,
  27. default: defprops.codeInput.hairline
  28. },
  29. // 字符间的距离
  30. space: {
  31. type: [String, Number],
  32. default: defprops.codeInput.space
  33. },
  34. // #ifdef VUE3
  35. // 预置值
  36. modelValue: {
  37. type: [String, Number],
  38. default: defprops.codeInput.value
  39. },
  40. // #endif
  41. // #ifdef VUE2
  42. // 预置值
  43. value: {
  44. type: [String, Number],
  45. default: defprops.codeInput.value
  46. },
  47. // #endif
  48. // 是否自动获取焦点
  49. focus: {
  50. type: Boolean,
  51. default: defprops.codeInput.focus
  52. },
  53. // 字体是否加粗
  54. bold: {
  55. type: Boolean,
  56. default: defprops.codeInput.bold
  57. },
  58. // 字体颜色
  59. color: {
  60. type: String,
  61. default: defprops.codeInput.color
  62. },
  63. // 字体大小
  64. fontSize: {
  65. type: [String, Number],
  66. default: defprops.codeInput.fontSize
  67. },
  68. // 输入框的大小,宽等于高
  69. size: {
  70. type: [String, Number],
  71. default: defprops.codeInput.size
  72. },
  73. // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true
  74. disabledKeyboard: {
  75. type: Boolean,
  76. default: defprops.codeInput.disabledKeyboard
  77. },
  78. // 边框和线条颜色
  79. borderColor: {
  80. type: String,
  81. default: defprops.codeInput.borderColor
  82. },
  83. // 是否禁止输入"."符号
  84. disabledDot: {
  85. type: Boolean,
  86. default: defprops.codeInput.disabledDot
  87. }
  88. }
  89. }