你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

SendBoxProps interface

SendBox 的 Props。

属性

autoFocus

可枚举,用于确定输入框是否焦点位于呈现上。 当未定义时,呈现上没有任何内容具有焦点

disabled

禁用文本框的可选布尔值

onRenderIcon

用于呈现 SendBox 右侧的发送按钮图标的可选回调。

onRenderSystemMessage

用于在 SendBox 下方呈现系统消息的可选回调。

onSendMessage

发送消息时调用的可选回调

onTyping

用户键入时调用的可选回调

strings

在组件中要替代的可选字符串

styles

允许用户传入包含自定义 CSS 样式的对象。

supportNewline

可选布尔值,以支持 SendBox 中的新行。

systemMessage

文本框下方系统消息的可选文本

属性详细信息

autoFocus

可枚举,用于确定输入框是否焦点位于呈现上。 当未定义时,呈现上没有任何内容具有焦点

autoFocus?: "sendBoxTextField"

属性值

"sendBoxTextField"

disabled

禁用文本框的可选布尔值

disabled?: boolean

属性值

boolean

onRenderIcon

用于呈现 SendBox 右侧的发送按钮图标的可选回调。

onRenderIcon?: (isHover: boolean) => Element

属性值

(isHover: boolean) => Element

onRenderSystemMessage

用于在 SendBox 下方呈现系统消息的可选回调。

onRenderSystemMessage?: (systemMessage: undefined | string) => ReactElement<any, string | JSXElementConstructor<any>>

属性值

(systemMessage: undefined | string) => ReactElement<any, string | JSXElementConstructor<any>>

onSendMessage

发送消息时调用的可选回调

onSendMessage?: (content: string) => Promise<void>

属性值

(content: string) => Promise<void>

onTyping

用户键入时调用的可选回调

onTyping?: () => Promise<void>

属性值

() => Promise<void>

strings

在组件中要替代的可选字符串

strings?: Partial<SendBoxStrings>

属性值

Partial<SendBoxStrings>

styles

允许用户传入包含自定义 CSS 样式的对象。

styles?: SendBoxStylesProps

属性值

supportNewline

可选布尔值,以支持 SendBox 中的新行。

supportNewline?: boolean

属性值

boolean

systemMessage

文本框下方系统消息的可选文本

systemMessage?: string

属性值

string