@tarojsx/ui
Version:
We reinvents the UI for Taro3+
27 lines (26 loc) • 1.12 kB
TypeScript
import React from 'react';
import { CommonEventFunction } from '@tarojs/components';
import { InputProps } from '@tarojs/components/types/Input';
import { AtInputNumberProps } from 'taro-ui/types/input-number';
import '../style/InputNumber.scss';
export interface InputNumberProps extends Omit<Partial<AtInputNumberProps>, 'style' | 'customStyle' | 'onChange' | 'onBlur' | 'onErrorInput'>, Omit<InputProps, 'value' | 'type' | 'password' | 'children'> {
style?: React.CSSProperties;
customStyle?: React.CSSProperties;
/**
* 输入框值改变时触发的事件
* @param {number} value 输入框当前值
* @description 开发者需要通过 onChange 事件来更新 value 值变化,onChange 函数必填
*/
onChange?: CommonEventFunction<{
value: number | string;
delta?: number;
}>;
}
/**
* 数字输入框
*
* - 按 "+" 和 "-" 按 step 加减数字.
* - 手动输入数字时调起数字(number)或小数(digit)键盘, 默认距离键盘50px.
* - 失去光标时强制格式化数字.
*/
export declare const InputNumber: React.FC<InputNumberProps>;