import React from "react"; import { InputProps } from "../input"; import { ChangeContext } from "../form/controlled"; export interface SearchBoxProps extends InputProps { /** * 是否为多行搜索模式 * * @default false */ multiline?: boolean; /** * 是否为简洁模式 * * @default false */ simple?: boolean; /** * 点击搜索或输入回车时回调 * 如果自行绑定了 `onKeydown` 处理方法,则该回调不再提供 */ onSearch?: (keyword?: string, context?: ChangeContext) => void; /** * 用户清空搜索时回调 * */ onClear?: () => void; /** * 搜索框尺寸 */ size?: "full" | "l" | "m" | "s"; /** * 显示帮助按钮 * * @default false * @since 2.2.2 */ showHelp?: boolean; /** * 帮助按钮点击回调 * * @since 2.2.2 */ onHelp?: (e: React.MouseEvent) => void; /** * 搜索框容器 ref * * *组件 `ref` 指向了内部输入框* * * @since 2.7.0 */ searchBoxRef?: React.Ref; } export declare const SearchBox: React.FunctionComponent> & { defaultLabelAlign: string; };