UNPKG

@flatbiz/antd

Version:
20 lines (17 loc) 895 B
import { TextAreaProps } from 'antd/lib/input'; export type InputTextAreaWrapperProps = Omit<TextAreaProps, "defaultValue"> & { debounceDuration?: number; }; /** * ``` * 1. 在输入框内输入拼音的时候,在拼音尚未输入完成时,字母会触发Input的onChange事件;导致以上效果的原因是input事件没办法知道我们在使用中文输入法 * 2. 此处封装可以解决此问题,在输入拼音未完成时不会触达onChange,选择拼音结果触发onChange * * 3. 设置value时,内部可将受控操作转为非受控操作(具体实现逻辑,自行查看源码) * 4. 适用场景:需要通过onChange事件处理业务逻辑,例如:在onChange中调用接口数据 * 5. defaultValue不可使用 * * ``` */ export declare const InputTextAreaWrapper: (props: InputTextAreaWrapperProps) => import("react").JSX.Element; export {};