Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

90 строки
2.9 KiB

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