jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
42 lines (41 loc) • 979 B
TypeScript
import type { ReactPropsBase } from 'jamis-core';
export interface NumberProps extends ReactPropsBase {
placeholder?: string;
max?: number;
min?: number;
step?: number;
/** 是否显示加减按钮, 默认是显示 */
showSteps?: boolean;
precision?: number;
disabled?: boolean;
/**
* 只读
*/
readOnly?: boolean;
value?: number;
/**
* 边框模式,全边框或者没边框。
*/
borderMode?: 'full' | 'half' | 'none';
/**
* 指定输入框展示值的格式
*/
formatter?: Function;
/**
* 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用
*/
parser?: Function;
inputRef?: Function;
keyboard?: Boolean;
/** 是否有校验错误 */
hasError?: boolean;
/**
* 获取焦点事件
*/
onFocus?: Function;
/**
* 失去焦点事件
*/
onBlur?: Function;
onChange?: (value: number) => void;
}