import React from 'react'; import {FormItem, FormControlProps, FormBaseControl} from './Item'; import cx from 'classnames'; import {filter} from '../../utils/tpl'; import NumberInput from '../../components/NumberInput'; import {FormOptionsControl} from './Options'; import Select, {normalizeOptions, Option} from '../../components/Select'; import {PlainObject} from '../../types'; /** * 数字输入框 * 文档:https://baidu.gitee.io/amis/docs/components/form/number */ export interface NumberControlSchema extends FormBaseControl { type: 'input-number'; /** * 最大值 */ max?: number; /** * 最小值 */ min?: number; /** * 步长 */ step?: number; /** * 精度 */ precision?: number; /** * 默认当然是 */ showSteps?: boolean; /** * 边框模式,全边框,还是半边框,或者没边框。 */ borderMode?: 'full' | 'half' | 'none'; /** * 前缀 */ prefix?: string; /** * 后缀 */ suffix?: string; /** * 单位列表 */ unitOptions?: string | Array