props.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { IBaseProps } from '../_util/base';
  2. export type InputType = 'text' | 'number' | 'idcard' | 'digit'
  3. /**
  4. * 支付宝
  5. */
  6. | 'numberpad' | 'digitpad' | 'idcardpad'
  7. /**
  8. * 只支持微信
  9. */
  10. | 'safe-password' | 'nickname';
  11. /**
  12. * @description 输入框。
  13. */
  14. export interface InputProps extends IBaseProps {
  15. type?: InputType;
  16. value?: string;
  17. defaultValue: string;
  18. placeholder: string;
  19. placeholderClassName: string;
  20. placeholderStyle: string;
  21. allowClear: boolean;
  22. enableNative: boolean;
  23. confirmType: string;
  24. confirmHold: string;
  25. controlled: boolean;
  26. alwaysSystem: boolean;
  27. selectionStart: number;
  28. selectionEnd: number;
  29. cursor: number;
  30. maxLength?: number;
  31. inputClassName?: string;
  32. inputStyle: string;
  33. password?: boolean;
  34. prefix?: string;
  35. disabled?: boolean;
  36. focusClassName?: string;
  37. suffix?: string;
  38. focus?: boolean;
  39. /**
  40. * @description 组件名字,用于表单提交获取数据。
  41. */
  42. name?: string;
  43. focusStyle?: string;
  44. /**
  45. * @description 当 type 为 number, digit, idcard 数字键盘是否随机排列。
  46. * @default false
  47. */
  48. randomNumber?: boolean;
  49. onChange?: (value: string, e: any) => void;
  50. onBlur?: (value: string, e: any) => void;
  51. onFocus?: (value: string, e: any) => void;
  52. onConfirm?: (value: string, e: any) => void;
  53. }
  54. export declare const InputDefaultProps: InputProps;