props.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import defprops from '../../libs/config/props';
  2. export default {
  3. props: {
  4. // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘
  5. mode: {
  6. type: String,
  7. default: defprops.keyboard.mode
  8. },
  9. // 是否显示键盘的"."符号
  10. dotDisabled: {
  11. type: Boolean,
  12. default: defprops.keyboard.dotDisabled
  13. },
  14. // 是否显示顶部工具条
  15. tooltip: {
  16. type: Boolean,
  17. default: defprops.keyboard.tooltip
  18. },
  19. // 是否显示工具条中间的提示
  20. showTips: {
  21. type: Boolean,
  22. default: defprops.keyboard.showTips
  23. },
  24. // 工具条中间的提示文字
  25. tips: {
  26. type: String,
  27. default: defprops.keyboard.tips
  28. },
  29. // 是否显示工具条左边的"取消"按钮
  30. showCancel: {
  31. type: Boolean,
  32. default: defprops.keyboard.showCancel
  33. },
  34. // 是否显示工具条右边的"完成"按钮
  35. showConfirm: {
  36. type: Boolean,
  37. default: defprops.keyboard.showConfirm
  38. },
  39. // 是否打乱键盘按键的顺序
  40. random: {
  41. type: Boolean,
  42. default: defprops.keyboard.random
  43. },
  44. // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
  45. safeAreaInsetBottom: {
  46. type: Boolean,
  47. default: defprops.keyboard.safeAreaInsetBottom
  48. },
  49. // 是否允许通过点击遮罩关闭键盘
  50. closeOnClickOverlay: {
  51. type: Boolean,
  52. default: defprops.keyboard.closeOnClickOverlay
  53. },
  54. // 控制键盘的弹出与收起
  55. show: {
  56. type: Boolean,
  57. default: defprops.keyboard.show
  58. },
  59. // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩
  60. overlay: {
  61. type: Boolean,
  62. default: defprops.keyboard.overlay
  63. },
  64. // z-index值
  65. zIndex: {
  66. type: [String, Number],
  67. default: defprops.keyboard.zIndex
  68. },
  69. // 取消按钮的文字
  70. cancelText: {
  71. type: String,
  72. default: defprops.keyboard.cancelText
  73. },
  74. // 确认按钮的文字
  75. confirmText: {
  76. type: String,
  77. default: defprops.keyboard.confirmText
  78. },
  79. // 输入一个中文后,是否自动切换到英文
  80. autoChange: {
  81. type: Boolean,
  82. default: defprops.keyboard.autoChange
  83. }
  84. }
  85. }