props.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { IBaseProps } from '../_util/base';
  2. /**
  3. * @description 步进器,用作增加或者减少当前数值。
  4. */
  5. export interface IStepperProps extends IBaseProps {
  6. /**
  7. * @description 输入框的值
  8. */
  9. value: number;
  10. /**
  11. * @description 最小值
  12. */
  13. min: number;
  14. /**
  15. * @description 最大值
  16. */
  17. max: number;
  18. /**
  19. * @description 每次加减的值
  20. * @default 1
  21. */
  22. step: number;
  23. /**
  24. * @description 输入框唤起键盘类型
  25. */
  26. type: 'number' | 'digit';
  27. /**
  28. * @description 计算精度,保留几位小数
  29. * https://github.com/ant-design/ant-design/issues/5998
  30. */
  31. precision: number;
  32. /**
  33. * @description 输入框类名
  34. */
  35. inputClassName: string;
  36. /**
  37. * @description 输入框样式
  38. */
  39. inputStyle: string;
  40. /**
  41. * @description 是否禁用
  42. * @default false
  43. */
  44. disabled: boolean;
  45. /**
  46. * @description 输入框初始值
  47. */
  48. defaultValue: number;
  49. /**
  50. *
  51. * @description onChange
  52. */
  53. onChange?: (value: number, e: any) => void;
  54. /**
  55. *
  56. * @description onConfirm
  57. */
  58. onConfirm?: (value: number, e: any) => void;
  59. /**
  60. * @description onFocus
  61. */
  62. onFocus?: (value: number, e: any) => void;
  63. /**
  64. * @description onBlur
  65. */
  66. onBlur?: (value: number, e: any) => void;
  67. }
  68. export declare const StepperDefaultProps: Partial<IStepperProps>;