UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

34 lines (33 loc) 1.16 kB
import React from 'react'; import type { ActionObject, Option } from 'jamis-core'; import type { FormControlProps, NumberControlProps } from '../types'; interface NumberState { unit?: string; unitOptions?: Option[]; isFocused?: boolean; } declare class NumberControl extends React.Component<NumberControlProps, NumberState> { static defaultProps: Partial<NumberControlProps>; input?: HTMLInputElement; constructor(props: NumberControlProps); /** * 动作处理 */ doAction(action: ActionObject, args: any): void; getUnit(): any; getValue(inputValue: any): any; dispatchEvent(eventName: string): Promise<void>; handleChange(inputValue: any): Promise<void>; filterNum(value: number | string | undefined): number | undefined; handleChangeUnit(option: Option): void; componentDidUpdate(prevProps: NumberControlProps): void; inputRef(ref: any): void; focus(): void; handleFocus: () => void; handleBlur: () => void; render(): JSX.Element; } export declare class NumberControlRenderer extends NumberControl { static defaultProps: Partial<FormControlProps>; } export {};